query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Get arguments form route attributes | private function extractAttributes(Route $route): array
{
$arguments = [
'namespace' => null,
'controller' => null,
'action' => null,
'args' => []
];
foreach (array_keys($arguments) as $name) {
$arguments[$name] = array_key_exists($name, $route->attributes)
? $route->attributes[$name]
: $arguments[$name];
}
return $arguments;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getArgs(){\n\t\t\treturn $this->matchingRoute->getParam($this->url->getLastPartOfUrl());\n\t\t}",
"public function getRouteParams();",
"protected function getViewArgumentsFromRoute() {\n // The code of this function is taken in part from the view page controller\n // method (Drupal\\views\\Routing\\ViewPageController::handle()).\n $route = $this->routeMatch->getRouteObject();\n $map = $route->hasOption('_view_argument_map') ? $route->getOption('_view_argument_map') : [];\n\n $args = [];\n foreach ($map as $attribute => $parameter_name) {\n $parameter_name = isset($parameter_name) ? $parameter_name : $attribute;\n if (($arg = $this->routeMatch->getRawParameter($parameter_name)) !== NULL) {\n $args[] = $arg;\n }\n }\n return $args;\n }",
"function getRouteParameters();",
"public function getArguments()\n\t{\n\t\treturn $this->router->getArguments();\n\t}",
"public function getArguments() {\n return $_GET;\n }",
"public function get_request_arguments();",
"function current_route_args()\n {\n return array_values(RouteController::getCurrentRoute()['args']) ?? [];\n }",
"public function getRouteParameters()\n {\n return $this->routeParameters;\n }",
"public function getRouteParameters()\n {\n return $this->routeParameters;\n }",
"public function getParams()\n {\n return $this->getEvent()->getRouteMatch()->getParams();\n }",
"function getAdditionalParams() {\n return array(\n 'route' => $this->getRouteName(),\n ); // array\n }",
"public function getArguments() {}",
"public function getArguments() {}",
"public function getArguments() {}",
"public function getArguments() {}",
"public function getArguments();",
"public function getArguments();",
"public function getArguments();",
"public function getArguments();",
"function get_args($request)\n {\n }",
"function get_args($request)\n {\n }",
"public function urlArguments()\n {\n return [\n 'id' => $this->id,\n ];\n }",
"public function routerParams()\n {\n /* @var Router $router */\n $router = $this->container->get('router');\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n $routeName = $request->attributes->get('_route');\n $routeParams = $request->query->all();\n $routeCollection = $router->getRouteCollection();\n /* @var CompiledRoute $compiledRouteConnection */\n $compiledRouteConnection = $routeCollection->get($routeName)->compile();\n foreach ($compiledRouteConnection->getVariables() as $variable) {\n $routeParams[$variable] = $request->attributes->get($variable);\n }\n\n return $routeParams;\n }",
"public static function getRouteVariables() {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__);\n\n\t\t$data = self::$route_parameters;\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $data);\n\t\t$data = self::_applyFilter(get_class(), __FUNCTION__, $data, array('event' => 'return'));\n\n\t\treturn $data;\n\n\t}",
"public function getArguments()\n {\n if (empty($this->_arguments)) {\n $base = [];\n if (isset($this->_params['trailing'])) {\n $base = explode('/', $this->_params['trailing']);\n }\n $names = ['controller', 'action', 'namespace', 'trailing'];\n foreach ($this->_params as $key => $value) {\n if (in_array($key, $names)) {\n continue;\n }\n $this->_arguments[$key] = $value;\n }\n\n $this->_arguments = array_merge($this->_arguments, $base);\n }\n return $this->_arguments;\n }",
"protected function getUrlParameters() {\n return $this->getAttributes();\n }",
"private function setArguments()\n {\n $args = $this->data;\n $match = explode(\"/\", $this->routeMatch);\n\n // remove the domain part.\n foreach ($this->domains as $value) {\n // search for domain on url array.\n // array_search(needle, haystack)\n $index = array_search($value, $args);\n unset($args[$index]);\n\n // search for domain on matched route.\n $index = array_search($value, $match);\n unset($match[$index]);\n }\n\n // find the action part in url data and the matched route string.\n // preg_grep(pattern, input)\n $this->action = preg_grep(\"/^{$this->wildcards[':action']}$/\", $args);\n $matchAction = preg_grep(\"/^{$this->wildcards[':action']}$/\", $match);\n if ( !empty($this->action) )\n {\n // convert action from array to string.\n // find action in url data.\n // remove from url data.\n $this->action = array_shift($this->action);\n $index = array_search($this->action, $args);\n unset($args[$index]);\n\n $matchAction = array_shift($matchAction);\n $index = array_search($matchAction, $match);\n unset($match[$index]);\n }\n\n // get the arguments from url data\n // get the key from the wildcard. :id, :yyyy, :dd, etc.\n foreach ($args as $arg) {\n $key = $this->matchWildcard($match, $arg);\n $this->arguments[$key] = $arg;\n }\n }",
"public function parameters(): array\n {\n return $this->route->parameters();\n }",
"protected function getAllArgs()\n {\n $this->methodExpectsRequest(__METHOD__);\n $params = [];\n foreach ($this->getRequest()->getAllArgs() as $index => $value) {\n if (isset($this->argument_position_name[$index])) {\n $param_name = $this->argument_position_name[$index];\n $params[$param_name] = $value;\n }\n }\n return $params;\n }",
"protected function getUrlArguments()\n {\n $url = $this->getRequest()->getServer('REDIRECT_SCRIPT_URL');\n if (empty($url)) {\n $url = $this->getRequest()->getServer('SCRIPT_URL');\n }\n\n // mother of all strtolower, don't strtolower again or I get ya\n $url = strtolower($url);\n // strip trailing slash, if any\n $url = trim($url, '/');\n\n // create mvc like class name\n $arguments = explode('/', $url);\n $arguments = array_filter($arguments);\n return $arguments;\n }",
"private function extractRouteParams()\n {\n // Extract params\n $params = array_filter(explode('/', $_GET['url']));\n\n // First parameter is the controller\n $this->_controller = $params[0];\n\n // Second parameter is the action method\n\t\tif (isset($params[1]) && !empty($params[1])) {\n\t\t\t$this->_action = $params[1];\n\t\t}\n\n // Set additional parameters\n\t\tif (isset($params[2]) && !empty($params[2])) {\n\t\t\t$this->_urlParams = $params[2];\n\t\t}\n }",
"function route_params(): array\n{\n return RouteController::getCurrentRoute()['params'] ?? [];\n}",
"public function getRouteAttributes($name = null, $default = null);",
"protected function getArguments()\n {\n\n return [\n ['bot-id', InputArgument::REQUIRED, 'Bot ID'],\n ['destination', InputArgument::REQUIRED, 'Destination Address'],\n ];\n }",
"public abstract function get_query_args();",
"public function getRouteAndParams()\n {\n $request = $this->get('request_stack')->getCurrentRequest();\n $routing = $request->attributes->all();\n\n $ret = new \\stdClass();\n\n $ret->route = $routing['_route'];\n $ret->params = array_merge($routing['_route_params'], $request->query->all());\n\n return $ret;\n }",
"public function args()\n {\n return $this->arguments->get();\n }",
"public function getExtraArguments();",
"protected function getArguments()\n {\n return array(//\t\t\tarray('email', InputArgument::REQUIRED), //, 'An example argument.'),\n );\n }",
"protected function getArguments()\n {\n return array(\n array('name', InputArgument::REQUIRED, 'The name of the permission.')\n );\n }",
"protected function getArguments()\n {\n return array(\n //array('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n//\t\t\t['query', InputArgument::REQUIRED, 'Query word you want to search for.'],\n\t\t];\n\t}",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The name of the context.'],\n ];\n }",
"function getArguments() ;",
"protected function getRouteParams(): array {\n return [];\n }",
"protected function getArguments() {\n return [\n ['name', InputArgument::REQUIRED, 'Name of the Blueprint.'],\n ];\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"public function getArguments() : array {\n return $this->customAttrs;\n }",
"public static function params()\n\t{\n\t\treturn self::$router->getParams();\n\t}",
"protected function getArguments()\n {\n return array(//\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"public function getArguments ($reset = FALSE) {\n if ($reset == FALSE && is_array($this->_arguments) == TRUE) {\n return $this->_arguments;\n }\n\n $routeRequest = new Event_Data;\n $routeRequest->path = Request::path();\n\n Event_Dispatcher::notifyObservers(Cmf_Route_Table_Event::rewriteRequestPath, $routeRequest);\n\n if (preg_match($this->getUrlMask(), $routeRequest->path, $matches) == FALSE) {\n $this->_arguments = array();\n return $this->_arguments;\n }\n\n foreach ($matches as $name => $value) {\n if (is_int($name) == TRUE) {\n // Skip all unnamed keys\n continue;\n }\n\n // Set the value for all matched keys\n $this->_arguments[$name] = $value;\n }\n\n foreach ($this->_defaultValues as $name => $value) {\n if (isset($this->_arguments[$name]) == FALSE || $this->_arguments[$name] === '') {\n // Set default values for any key that was not matched\n $this->_arguments[$name] = $value;\n }\n }\n\n return $this->_arguments;\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n {\n\n }",
"public function getArgs();",
"public function getArgs();",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t//\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n {\n return [\n ['path', InputArgument::REQUIRED, 'path'],\n ];\n }",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'Name of the user'],\n ['email', InputArgument::REQUIRED, 'Email of the user'],\n ['role', InputArgument::REQUIRED, 'Role of the user'],\n ['account', InputArgument::REQUIRED, 'Accessed account of the user'],\n ['password', InputArgument::OPTIONAL, 'Password of the user, will generate a random password if not given'],\n ];\n }",
"protected function getArguments() {\n return array(\n// array('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments() { return isset($this->_arguments) ? $this->_arguments : array();\n }",
"protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'Controller name'],\n ];\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('class', InputArgument::REQUIRED, 'The name of the class you want to have scraped.'),\n\t\t);\n\t}",
"protected function getArgs()\n {\n $uri = $_SERVER['REQUEST_URI'];\n $name = $_SERVER['SCRIPT_NAME'];\n\n if (substr($uri,0,strlen($name)) == $name) $args = substr($uri,strlen($name)+1);\n else $args = substr($uri,strlen(dirname($name)) + 1);\n\n // Need to pull out any thing after ?\n // $tmp = explode('?',$args);\n // $args = $tmp[0];\n\n // Convert to array\n $args = explode('/',$args);\n\n return $args;\n }",
"public function getArguments()\n\t{\n\t\treturn [\n\t\t\t['request', InputArgument::REQUIRED, 'The Request\\'s name.'],\n\t\t\t['service', InputArgument::REQUIRED, 'The Service\\'s name.'],\n\t\t];\n\t}",
"public function get_query_args()\n {\n }",
"public function get_query_args()\n {\n }",
"public function get_query_args()\n {\n }",
"public function get_query_args()\n {\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n {\n return array(\n array('action', InputArgument::REQUIRED, 'Keystone action (get, put, pluck, range...)'),\n array('key', InputArgument::OPTIONAL, 'Keystone key (namespace optional)'),\n );\n }",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The class name of the form.'],\n ];\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\n\t\treturn array(\n\t\t\tarray('target', InputArgument::REQUIRED, 'Target number without + before number.'),\n\t\t);\n\t}",
"protected function getFeesRouteParams()\n {\n return [\n 'licence' => $this->getFromRoute('licence'),\n 'busRegId' => $this->getFromRoute('busRegId'),\n ];\n }",
"public function arguments() : array\n {\n return $this->input->getArguments();\n }",
"public function args(){\n return $this->args;\n }",
"public function argumentsForPostProcessUriArgumentsForRequestHash() {}",
"public function parameters(): array\n {\n $requestRoute = request()->route()->getName();\n $requestValues = Str::of($requestRoute)\n ->explode('.')\n ->toArray();\n\n return is_null($requestValues)\n ? []\n : $requestValues;\n }",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The name of the controller'],\n ];\n }",
"public function getArguments() {\n return $this->args;\n }",
"protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The Theme name'],\n ];\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['required', null, InputArgument::REQUIRED, 'A required argument.'],\n\t\t\t['optional', null, InputArgument::OPTIONAL, 'An Optional argument.']\n\t\t];\n\t}",
"protected function getArguments()\n {\n return array(\n array('name', InputArgument::REQUIRED, false),\n array('type', InputArgument::OPTIONAL, false),\n array('folder', InputArgument::OPTIONAL, false),\n );\n }",
"protected function getArguments()\n {\n return [\n//\t\t\t['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }"
] | [
"0.74414504",
"0.7331408",
"0.7162782",
"0.71134603",
"0.69666344",
"0.6838794",
"0.6723102",
"0.64822227",
"0.64280057",
"0.64280057",
"0.63545305",
"0.6306821",
"0.6284238",
"0.6284238",
"0.6284238",
"0.6284238",
"0.6283856",
"0.6283856",
"0.6283856",
"0.6283856",
"0.62622505",
"0.62622505",
"0.6242301",
"0.62417215",
"0.6234179",
"0.62130314",
"0.6211353",
"0.6173525",
"0.6150754",
"0.61494774",
"0.6132934",
"0.6119949",
"0.6119191",
"0.6104259",
"0.60989887",
"0.6066429",
"0.6065611",
"0.60634863",
"0.60615844",
"0.6060031",
"0.6052405",
"0.603257",
"0.6028364",
"0.6025994",
"0.6014188",
"0.60130686",
"0.60103995",
"0.600932",
"0.600932",
"0.600932",
"0.600932",
"0.5999613",
"0.5982773",
"0.5980655",
"0.59754753",
"0.5971195",
"0.5971195",
"0.5971195",
"0.5969665",
"0.5966839",
"0.5966839",
"0.59570616",
"0.59569335",
"0.5956749",
"0.59552765",
"0.5948106",
"0.59459543",
"0.59459543",
"0.5941173",
"0.5939689",
"0.59323126",
"0.59307003",
"0.59165794",
"0.59165794",
"0.59165794",
"0.59165794",
"0.5916573",
"0.5916573",
"0.59083843",
"0.5905748",
"0.5900982",
"0.5900982",
"0.5900982",
"0.5900982",
"0.5900982",
"0.5900982",
"0.5900982",
"0.5900982",
"0.58931255",
"0.5891099",
"0.5888783",
"0.5888494",
"0.58860826",
"0.5884392",
"0.58838797",
"0.5878327",
"0.586755",
"0.5866719",
"0.58641607",
"0.58605283"
] | 0.6741904 | 6 |
Create a controller dispatch with provided arguments | private function createDispatch(array $arguments): ControllerDispatch
{
$arguments['controller'] = $this->filterName($arguments['controller']);
$data = [
'controllerClassName' => ltrim(
"{$arguments['namespace']}"."\\"."{$arguments['controller']}",
"\\"
),
'method' => lcfirst($this->filterName($arguments['action'])),
'arguments' => $arguments['args']
];
$reflection = new ReflectionClass(ControllerDispatch::class);
return $reflection->newInstanceArgs($data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function controller()\r\n {\r\n $collector = $this->getControllerCollector();\r\n \r\n foreach (func_get_args() as $controller) {\r\n call_user_func([$collector, 'controller'], $controller);\r\n }\r\n }",
"public function createController( ezcMvcRequest $request );",
"public function dispatch()\n {\n $data = $this->router->getData();;\n $c = $data->controller;\n $ref = new $c($data->params);\n $a = $data->action;\n if (!is_null($a) && !empty($a)) call_user_func(array($ref, $a));\n return;\n }",
"public function __call( $controllername, $args = array() )\n {\n $controllername = ucfirst($controllername);\n\n if(isset($args[0]['action']))\n {\n $controller_action = $args[0]['action'];\n }\n else\n { // default action method name\n $controller_action = 'perform';\n }\n\n if(isset($args[0]['constructorData']))\n {\n $constructor_data = $args[0]['constructorData'];\n }\n else\n {\n $constructor_data = null;\n }\n\n if(isset($args[0]['controllerMustExsists']))\n {\n $controller_must_exsists = $args[0]['controllerMustExsists'];\n }\n else\n {\n $controller_must_exsists = null;\n }\n\n // create page controller instance\n if(false === ($controller = $this->getControllerInstance( $controllername, $constructor_data , $controller_must_exsists )))\n {\n return false;\n }\n\n // Aggregate model object\n $controller->model = $this->model;\n\n // Aggregate debug object\n $controller->debug = $this->debug;\n\n // Aggregate router object\n $controller->router = $this->router;\n\n // Aggregate httpRequest object\n $controller->httpRequest = $this->httpRequest;\n\n // Aggregate httpResponse object\n $controller->httpResponse = $this->httpResponse;\n\n // Aggregate session object\n $controller->session = $this->model->session;\n\n // Aggregate the main configuration object\n $controller->config = $this->model->config;\n\n // aggregate this object for create nested controllers\n $controller->controllerLoader = $this;\n\n // use this to pass variables inside (nested) controller\n $controller->controllerVar = & $this->controllerVars;\n\n // set render view flag\n $controller->setRenderView( $controllername );\n // set return view flag\n $controller->setReturnView( $controllername );\n // set view folder flag\n $controller->setViewFolder( $controllername );\n\n if ( true == $controller->renderView )\n {\n // set view folder flag\n $controller->setViewEngine( $controllername );\n // set view engine type\n $controller->viewEngine = $this->setViewEngine( $controller, $controllername );\n $this->startViewEngine( $controller, $controllername );\n }\n\n // set expire time of cache of a related controller\n $controller->setCacheExpire( $controllername );\n\n // run authentication\n $controller->auth();\n\n // run controller prepended filters\n $controller->prependFilterChain();\n\n // dont render a view\n if ( true === $controller->getRenderView( $controllername ) )\n {\n if($this->disable_cache == 0)\n {\n // start caching\n if( false !== ($cache_flag = $this->startControllerCache( $controller, $controllername )) )\n {\n // echo the context in simple views\n if( $controller->getReturnView( $controllername ) === false )\n {\n // echo the context\n $this->httpResponse->flush();\n }\n // return the context in nested views\n else\n {\n return $this->httpResponse->flushBodyChunk( 'view.' . $controllername );\n }\n return;\n }\n }\n }\n\n // check if the main action methode of the page controller exists\n if(method_exists ( $controller, $controller_action ))\n {\n // check if the permission methode exists\n $controller_permission_methode = $controller_action . 'Permission';\n if(method_exists ( $controller, $controller_permission_methode ))\n {\n // validate permission\n if(true !== $controller->$controller_permission_methode())\n {\n // check if the permission methode exists\n $controller_action = $controller_permission_methode . 'Error';\n if(!method_exists ( $controller, $controller_action ))\n {\n $error_message = 'no permission to execute \"' .$controller_action. '\" action methode';\n $controller->error( array('messages' => array($error_message),\n 'view' => 'Error') );\n\n trigger_error( $error_message, E_USER_WARNING );\n }\n }\n }\n // execute on the main controller action methode\n $controller->$controller_action( $constructor_data );\n }\n else\n {\n $error_message = 'controller action methode \"' .$controller_action. '\" of the page controller \"'.$controllername.'\" dosent exists';\n $controller->error( array('messages' => array($error_message),\n 'view' => 'Error') );\n\n trigger_error( $error_message, E_USER_WARNING );\n }\n\n // render a view if needed\n if ( true == $controller->getRenderView( $controllername ) )\n {\n $controller->setView( $controllername );\n\n // set view name\n // usually it is the same as the controller name\n // except if it is defined else in controller instance\n $_view = $controller->getView( $controllername );\n\n if(empty($_view))\n {\n $this->viewEngine->view = 'view.' . $controllername;\n }\n else\n {\n $this->viewEngine->view = 'view.' . $_view;\n }\n\n $this->viewEngine->viewFolder = $this->getViewPath( $controller, $controllername );\n\n // render the view\n $this->viewEngine->renderView();\n }\n else\n {\n $this->popControllerFromStack();\n return '';\n }\n\n // run append filters\n $body_chunk_ref = &$this->httpResponse->getBodyChunk( $this->viewEngine->view );\n $controller->appendFilterChain( $body_chunk_ref );\n\n if($this->disable_cache == 0)\n {\n // write view content to cache\n $this->writeControllerCache( $controller, $body_chunk_ref, $controllername );\n }\n\n // echo the context in simple views\n if( $controller->returnView == false )\n {\n // echo the context\n $this->httpResponse->flush();\n }\n // return the context in nested views\n else\n {\n return $this->httpResponse->flushBodyChunk( $this->viewEngine->view );\n }\n }",
"public static function dispatch()\n {\n // Melde alle Fehler außer E_NOTICE\n //error_reporting(E_ALL & ~E_NOTICE);\n\n $controllerName = UriParser::getControllerName().'Controller';\n $className = 'App\\\\Controller\\\\'.$controllerName;\n $methodName = UriParser::getMethodName();\n\n // Eine neue Instanz des Controllers wird erstellt und die gewünschte\n // Methode darauf aufgerufen.\n $controller = new $className();\n $controller->$methodName();\n }",
"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 }",
"protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }",
"public function run() \n\t{\n\t\tcall_user_func_array(array(new $this->controller, $this->action), $this->params);\t\t\n\t}",
"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\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 }",
"public function dispatch()\n {\n try {\n list($this->controller, $this->method) = $this->getRegisteredControllerAndMethod();\n\n\n $this->parameters = $this->matchedRoute->attributes;\n\n $this->getReflectionClass($this->controller)\n ->getMethod($this->method)\n ->invokeArgs(\n new $this->controller($this->container),\n $this->parameters\n );\n } catch (\\ReflectionException $e) {\n throw new CfarException(\n CfarException::INVALID_DECLARATION . \". \" . $e->getMessage()\n );\n }\n }",
"public function __construct(){\n\t\t$url = $this->processUrl();\n\n\t\t//this if statement unsets the defaultController so we can use the one that is being talked to.\n\t\tif(file_exists('../app/controllers/'.$url[0].'.php')){\n\t\t\t$this->defaultController = $url[0];\n\t\t\tunset($url[0]);\n\t\t}\n\n\t\trequire_once('../app/controllers/' .$this->defaultController.'.php');\n\n\t\t$this->defaultController = new $this->defaultController;//instantiate and make it an object\n\n\t\tif(isset($url[1])){\n\t\t\tif(method_exists($this->defaultController,$url[1])){\n\t\t\t$this->defaultMethod = $url[1];\n\t\t\tunset($url[1]);\n\t\t\t}\t\n\t\t}\n\n\t\t\n\t\t$this->parameters = $url ? array_values($url):[];\n\t\t// print_r($this->parameters);\n\n\t\tcall_user_func_array([$this->defaultController,$this->defaultMethod],$this->parameters);\n\t}",
"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 }",
"public function __invoke($controller) {\n }",
"public function __construct() {\n if (isset($_GET['rc'])) {\n $this->url = rtrim($_GET['rc'], '/'); // We don't want no empty arg\n $this->args = explode('/', $this->url);\n }\n \n // Load index controller by default, or first arg if specified\n $controller = ($this->url === null) ? 'null' : array_shift($this->args);\n $this->controllerName = ucfirst($controller);\n\n // Create controller and call method\n $this->route();\n // Make the controller display something\n $this->controllerClass->render();\n }",
"public static function controller($name, $args = array())\n {\n // Wrapper\n self::class($name, 'controllers', $args, false);\n }",
"protected function createController()\n {\n $this->createClass('controller');\n }",
"public function dispatch()\n\t{\n\t\t$this->segs = explode('/',$this->c->Router->route);\n\n\t\t/* classname seg1 (Controller) */\n\t\t$this->className = str_replace('-','_',array_shift($this->segs));\n\n\t\t/* method seg2 */\n\t\t$this->methodName = str_replace('-','_',array_shift($this->segs));\n\n\t\t/* call event */\n\t\t$this->c->Event->preController();\n\n\t\t/* This throws a error and 4004 - handle it in your error handler */\n\t\tif (!class_exists($this->className)) {\n\t\t\tthrow new \\Exception($this->className.' not found',4004);\n\t\t}\n\n\t\t/* create new controller inject the container */\n\t\t$controller = new $this->className($this->c);\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preMethod();\n\n\t\t/* This throws a error and 4005 - handle it in your error handler */\n\t\tif (!is_callable(array($controller,$this->methodName))) {\n\t\t\tthrow new \\Exception($this->className.' method '.$this->methodName.' not found',4005);\n\t\t}\n\n\t\t/* let's call our method and capture the output */\n\t\t$this->c->Response->body .= call_user_func_array(array($controller,$this->methodName),$this->segs);\n\t}",
"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 static function dispatch(...$arguments)\n {\n return new PendingDispatch(new static(...$arguments));\n }",
"public function run()\n {\n call_user_func_array(array(new $this->controller, $this->action), $this->params);\n }",
"protected function buildControllerContext() {}",
"public function execute()\n {\n $controllerClassName = $this->requestUrl->getControllerClassName();\n $controllerFileName = $this->requestUrl->getControllerFileName();\n $actionMethodName = $this->requestUrl->getActionMethodName();\n $params = $this->requestUrl->getParams();\n \n if ( ! file_exists($controllerFileName))\n {\n exit('controlador no existe');\n }\n\n require $controllerFileName;\n\n $controller = new $controllerClassName();\n\n $response = call_user_func_array([$controller, $actionMethodName], $params);\n \n $this->executeResponse($response);\n }",
"public function __construct(){\n $arr = $this->UrlProcess();\n\n // Xu ly controller\n if(!empty($arr)){\n if(file_exists(\"./source/controllers/\".$arr[0].\".php\")){\n $this->controller = $arr[0];\n unset($arr[0]); // loai bo controller khoi mang -> de lay params ben duoi\n }\n }\n \n\n require_once \"./source/controllers/\".$this->controller.\".php\";\n $this->controller = new $this->controller;\n\n // Xu ly action\n if(isset($arr[1])){\n if(method_exists($this->controller, $arr[1])){\n $this->action = $arr[1];\n }\n unset($arr[1]); // loai bo action khoi mang\n }\n\n //Xu li params\n $this->params = $arr?array_values($arr):[];\n \n call_user_func_array([$this->controller, $this->action], $this->params);\n\n }",
"public function controller($arguments = array()) {\n\n // first try to get a controller for the representation\n $controller = null;\n if($representation = $this->representation()) {\n $controller = $this->kirby->registry->get('controller', $this->template() . '.' . $representation);\n }\n\n // no representation or no special controller: try the normal one\n if(!$controller) $controller = $this->kirby->registry->get('controller', $this->template());\n\n if(is_a($controller, 'Closure')) {\n return (array)call_user_func_array($controller, array(\n $this->site,\n $this->site->children(),\n $this,\n $arguments\n ));\n }\n\n return array();\n\n }",
"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 }",
"public function dispatch($controller, $action, $params) {\n\t\t// Include Controller File\n\t\trequire_once \"src/{$controller}.php\";\n\t\t// Load Action\n\t\t$controller .= 'Controller';\n\t\t$action.= 'Action';\n\t\t$c = new $controller($controller, $action, $params);\n\t\t$c->$action($params);\n\t\treturn;\n\t}",
"protected function dispatch($dispatch_rt, $args = array( '' )) {\n\t\treturn new ADispatcher($dispatch_rt, $args);\n\t}",
"function __construct()\n {\n $arr = $this->UrlProcess();\n\n //handling controller\n //check controller exists\n if(file_exists(\"./mvc/controllers/\".$arr[0].\".php\")){\n $this->controller = $arr[0];\n unset($arr[0]);\n }\n require_once \"./mvc/controllers/\". $this->controller.\".php\";\n $this->controller = new $this->controller;\n //handling acction\n //check if arr[1] exists\n if(isset($arr[1])){\n //method_exists(class, a method check)\n if( method_exists($this->controller, $arr[1])){\n $this->acction = $arr[1]; \n }\n unset($arr[1]);\n }\n //handding params\n $this->params = $arr?array_values($arr):[];\n\n call_user_func_array([$this->controller, $this->acction], $this->params);\n }",
"public function dispatch() {\n if ($this->dispatching == null) {\n\n $this->dispatching = $this->router->getMatchedRoutes($this->request->getPath());\n }\n\n // Dispatch array is not empty\n while (!empty($this->dispatching)) {\n\n // Get the next available dispatch\n $dispatching = array_shift($this->dispatching);\n\n // Get the controller namespace\n $namespace = '\\modules\\\\' . $dispatching['module'] . '\\controllers\\\\' . $dispatching['controller'];\n\n // The controller does not exist\n if (class_exists($namespace) === false) {\n\n continue;\n }\n\n // Set the request vars\n $this->request->setVar(array_diff_key($dispatching, array_flip(['module', 'controller', 'action'])));\n // Set the dispatcher dispatched values\n $this->dispatched = array_intersect_key($dispatching, array_flip(['module', 'controller', 'action']));\n\n $controller = new $namespace($this->request, $this, $this->container);\n\n // We have a POST action defined\n if ($this->request->isPost() &&\n method_exists($controller, $this->getBaseActionName() . Router::ACTION_POST_SUFFIX)) {\n\n // Set the correct dispatching/dispatched action\n $dispatching['action'] = $this->dispatched['action'] = $this->getBaseActionName() . Router::ACTION_POST_SUFFIX;\n\n // A default controller action cannot be found\n } else if ($this->request->isGet() && method_exists($controller, $dispatching['action']) === false) {\n\n continue;\n }\n\n // Set the controller was forwarded to false\n $this->controllerWasForwarded = false;\n\n // The controller has a pre method defined\n if (method_exists($controller, 'pre')) {\n\n $controller->pre();\n }\n\n // The controller was forwarded\n if ($this->controllerWasForwarded === true) {\n\n continue;\n }\n\n $controller->{$dispatching['action']}();\n\n // The action was forwarded\n if ($this->controllerWasForwarded === true) {\n\n continue;\n }\n\n // The controller has a post method defined\n if (method_exists($controller, 'post')) {\n\n $controller->post();\n }\n\n // The action was forwarded\n if ($this->controllerWasForwarded === true) {\n\n continue;\n }\n\n // Render the view and set the response body\n $controller->getResponse()->setBody($controller->getView()->render());\n\n return;\n }\n\n // Empty the dispatched array so dispatcher not resolved event can switch to a different module if needed\n $this->dispatched = ['module' => '', 'controller' => '', 'action' => ''];\n\n $this->eventManager->emit($this->container->get('event', ['dispatcher:notResolved', $this]));\n $this->dispatch();\n }",
"public function executeRequest() {\n $this->splitURL();\n $this->validateRequest();\n\n // Create controller to dispatch our request, eg new BlogsController\n // Note format eg $dispatch = new BlogsController('Blog', 'blogs', 'index')\n $model = ucwords(rtrim($this->controller, 's'));\n $controller = ucwords($this->controller) . 'Controller';\n $dispatch = new $controller($model, $this->controller, $this->action);\n\n // Execute\n if (!isset($this->parameter1)) {\n call_user_func(array($dispatch, $this->action));\n } else if (!isset($this->parameter2)) {\n call_user_func(array($dispatch, $this->action), $this->parameter1);\n } else if (!isset($this->parameter3)) {\n call_user_func(array($dispatch, $this->action), $this->parameter1, $this->parameter2);\n } else {\n call_user_func(array($dispatch, $this->action), $this->parameter1, $this->parameter2, $this->parameter3);\n }\n }",
"public function getController( );",
"public function dispatch()\n {\n $this->parseRoute();\n\n $controller = new BaseController();\n\n $controllerName = '\\\\Shopreview\\\\Mvc\\\\Controller\\\\' . $this->controller . self::CONTROLLER_POSTFIX;\n\n // controller test, if not found redirect to the homepage\n if (class_exists($controllerName)) {\n $controller = new $controllerName();\n } elseif(!empty($this->controller)) {\n header('Location: /');\n exit();\n }\n\n // finalizing method name\n $methodName = $this->action . self::ACTION_POSTFIX;\n if (!$this->action || !method_exists($controller, $methodName)) {\n $methodName = self::DEFAULT_ACTION . self::ACTION_POSTFIX;\n }\n\n // calling the proper class and method\n call_user_func_array(array($controller, $methodName), array());\n }",
"public function __construct()\n {\n $url = $this->getUrl();\n // Look in controllers folder for first value and ucwords(); will capitalise first letter \n if (isset($url[0]) && file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]); // Setting the current controllers name to the name capitilised first letter\n unset($url[0]); \n }\n\n // Require the controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n // Taking the current controller and instantiating the controller class \n $this->currentController = new $this->currentController;\n // This is checking for the second part of the URL\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) { // Checking the seond part of the url which is the corresponding method from the controller class\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n // Get params, if no params, keep it empty\n $this->params = $url ? array_values($url) : []; \n\n // Call a callback with array of params\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\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 }",
"private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }",
"public function CadastroController($controller, $action, $urlparams)\n {\n //Inicializa os parâmetros da SuperClasse\n parent::ControllerBase($controller, $action, $urlparams);\n //Envia o Controller para a action solicitada\n $this->$action();\n }",
"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 runController($controllerClass, $action, Request $request, Route $route=null);",
"public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }",
"abstract public function getControllerAction();",
"public static function dispatch()\r\n\t{\r\n\t\t/**\r\n\t\t * Controllernames and methods saved in an array. It's solved manually to prevent that too many ressources are used to\r\n\t\t * scan every controller if the method exists etc.\r\n\t\t */\r\n\t\t$validControllerNames = array(\t\"Album\"\t\t\t=> array(\"index\",\"create\",\"doCreate\", \"edit\", \"doEdit\", \"delete\", \"doDelete\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Albums\"\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Home\" \t\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Login\"\t\t\t=> array(\"index\",\"doLogin\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Logout\"\t\t=> array(\"index\",\"doLogout\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Photo\"\t\t\t=> array(\"index\", \"edit\", \"doEdit\", \"delete\", \"doDelete\", \"addTo\", \"doAddTo\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Photos\"\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Register\"\t\t=> array(\"index\",\"doRegister\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Search\"\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Upload\"\t\t=> array(\"index\",\"doUpload\"),\r\n\t\t\t\t\t\t\t\t\t\t\"User\"\t\t\t=> array(\"index\", \"edit\", \"doEdit\", \"delete\", \"doDelete\", \"changepw\", \"doChangepw\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Error\"\t\t\t=> array(\"index\"));\r\n\r\n\t\t// Make an array of the data in the url, separated by \"/\"\r\n\t\t$url = explode('/', trim($_SERVER['REQUEST_URI'], '/'));\r\n\r\n\t\t// controllername which is setted in the url.\r\n\t\tif (!empty($url[0])) {\r\n\r\n\t\t\t// controllername exists\r\n\t\t\tif(array_key_exists(ucfirst($url[0]),$validControllerNames)) {\r\n\t\t\t\t$controllerName = ucfirst($url[0]);\r\n\r\n\t\t\t\t// Check if method exist and else call the index method of the controller.\r\n\t\t\t\tif (!empty($url[1]) && in_array($url[1],$validControllerNames[$controllerName])) {}\r\n\t\t\t\t$method \t\t= (!empty($url[1]) && in_array($url[1],$validControllerNames[$controllerName])) ? $url[1] : 'index';\r\n\t\t\t\t$args \t\t\t= array_slice($url, 2);\r\n\r\n\t\t\t} else {\r\n\t\t\t\t$controllerName = 'Error';\r\n\t\t\t\t$method \t\t= 'index';\r\n\t\t\t\t$args \t\t\t= array();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t$controllerName = 'Home';\r\n\t\t\t$method \t\t= 'index';\r\n\t\t\t$args \t\t\t= array();\r\n\t\t}\r\n\r\n\t\t// Add controller and create object\r\n\t\trequire_once (\"controllers/\".$controllerName.\"Controller.php\");\r\n $controllerName = $controllerName.\"Controller\";\r\n\t\t$controller = new $controllerName();\r\n\t\tcall_user_func_array(array($controller, $method), $args);\r\n\r\n\t\t// Removes the useless Controllers and valid controller name array to save resources\r\n\t\tunset($controller);\r\n\t\tunset($validControllerNames);\r\n\t}",
"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 generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }",
"static function invoke_controller()\n\t{\n\t\t// Try to fetch requested controller\n\t\t$controller_path = APPPATH.'controllers/'.self::$directory.self::$controller_name.'.php';\n\t\tif (is_readable($controller_path))\n\t\t{\n\t\t\trequire($controller_path);\n\n\t\t\t// Check if the controller class is defined\n\t\t\tif (!class_exists(self::$controller_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> is not defined');\n\n\t\t\t// Check if the method exists in the controller\n\t\t\tif (!method_exists(self::$controller_name, self::$method_name))\n\t\t\t\tSystem::error('controller <code>'.self::$controller_name.'</code> has no method named <code>'.self::$method_name.'</code>');\n\n\t\t\t// Create controller instance and call the method\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$reflection_method = new ReflectionMethod(self::$controller_name, self::$method_name);\n\n\t\t\t\t$argc = count(self::$segments);\n\t\t\t\tif ($reflection_method->getNumberOfRequiredParameters() > $argc)\n\t\t\t\t\tSystem::error('Not enough parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected at least '.$reflection_method->getNumberOfRequiredParameters());\n\n\t\t\t\tif ($reflection_method->getNumberOfParameters() < $argc)\n\t\t\t\t\tSystem::error('Too many parameters for calling <code>'.self::$controller_name.'::'.self::$method_name.'()</code>,\n\t\t\t\t\t'.$argc.' provided, expected '.$reflection_method->getNumberOfParameters());\n\n\t\t\t\t$reflection_method->invokeArgs(new self::$controller_name, self::$segments);\n\t\t\t}\n\t\t\tcatch (ReflectionException $e)\n\t\t\t{\n\t\t\t\tSystem::error($e->getMessage());\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function run()\n {\n $route = $this->route->mapRoute();\n\n $className = $this->controllerNamespace.$route[0];\n\n $action = $route[1];\n\n $controller = call_user_func([$className, 'getInstance']);\n\n $controller->$action();\n }",
"function dispatch_route($controller, $action, array $parameters){\r\n\t\t$this->current_controller = $controller;\r\n\t\t$this->current_action = $action;\r\n\t\t\r\n\t\t$result = $this->call_action($controller, $action, $parameters);\r\n\t\t\r\n\t\t$response = $this->handle_result($result);\r\n\t\t\r\n\t\treturn $response;\r\n\t}",
"public function run()\n {\n $this->get('/', array($this, 'dispatchController'));\n $this->map('(/:module(/:controller(/:action(/:params+))))', array($this, 'dispatchController'))\n ->via('GET', 'POST')\n ->name('default');\n parent::run();\n }",
"function call($controller,$action)\n{\n //include the controller file that matches the controller needed\n require_once ('controllers/'.$controller.'_controller.php');\n //create an instance of the needed controller\n switch ($controller){\n case 'pages':\n $controller = new pagesController();\n break;\n case 'posts':\n require_once ('model/dataMappers/article/class.article.php');\n require_once ('model/dataMappers/article/class.rates.php');\n $controller = new Postscontroller();\n break;\n case 'signup':\n require_once('model/dataMappers/register/class.register.php');\n $controller = new Signupcontroller();\n break;\n case 'login':\n $controller = new Login();\n break;\n }\n //call the needed action\n //say home action is called, call will be $controller->home();\n $controller->{ $action }();\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}",
"static public function dispatch()\n {\n $request = Url::getURI();\n $method = Request::getMethod();\n foreach (self::$routes[$method] as $route)\n {\n preg_match($route['pattern'], $request, $params);\n if (isset($params[0]))\n {\n unset($params[0]);\n $controller = $route['controller'];\n $action = $route['action'];\n $class = new $controller();\n call_user_func_array([$class, $action], $params);\n return;\n }\n }\n }",
"public function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }",
"function call($controller, $action)\n{\n $tmp_controller = \"\";\n $tmp_action = \"\";\n\n if (isset($controller)) {\n if (file_exists('app/controllers/' . $controller . '_controller.php')) {\n\n $tmp_controller = $controller;\n\n //REQUIRE THE CONTROLLER\n require_once('controllers/' . $controller . '_controller.php');\n\n }else{\n $tmp_controller = $controller = 'main';\n\n //REQUIRE THE CONTROLLER\n require_once('controllers/' . $controller . '_controller.php');\n }\n }else {\n //If Controller is not set\n $tmp_controller = 'main';\n }\n\n //Create an object with the controller\n $controller_obj = ucfirst($controller) . 'Controller';\n\n $controller = new $controller_obj;\n\n //CHECK IF METHOD EXISTS IN THE CONTROLLER\n if(isset($action))\n {\n if(method_exists($controller, $action))\n {\n $tmp_action = $action;\n }else{\n $tmp_action = 'home';\n }\n }\n\n $controller->{ $tmp_action }();\n}",
"private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}",
"public function dispatch();",
"public function dispatch();",
"function call($controller, $action)\n{\n require_once('controllers/' . $controller . '_controller.php');\n\n // create a new instance of the needed controller\n switch ($controller) {\n //for non-data-driven pages use the PagesController class\n case 'body_parts':\n $controller = new BodyPartsController();\n break;\n case 'pages':\n $controller = new PagesController();\n break;\n case'difficulty':\n $controller = new DifficultyController();\n break; \n case'filter':\n $controller = new HomePageController();\n break;\n case 'users':\n $controller = new UsersController();\n break;\n case 'posts':\n $controller = new PostsController();\n break;\n case 'login':\n $controller = new LoginController();\n break;\n case 'comments':\n $controller = new CommentsController();\n break;\n case 'images':\n $controller = new ImagesController();\n break;\n\n //we will need to add a separate case for each controller\n default:\n //for all data-driven pages use a specific Controller class\n //we need the model to query the database later in the process\n require_once(\"models/{$controller}.php\");\n $controllerClassName = $controller . 'Controller';\n $controller = new $controllerClassName();\n break;\n }\n // call the requested action\n $controller->{$action}();\n}",
"public static function dispatch($request) {\n\n if (isset($_SESSION)) {\n // $newRequest = new Request();\n $request->write('controller', 'user');\n }\n\n $controllerName = ucfirst($request->getControllerName()) . 'Controller';\n if (!class_exists($controllerName)) {\n throw new Exception(\"$controllerName does not exist\");\n }\n \n $controller = new $controllerName($request);\n\n return $controller;\n }",
"public function _construct($controller,$view){\r\n $this->controller = $controller;\r\n }",
"public function & GetController ();",
"public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }",
"public function run()\n \t{\n \t\t$controller = $this->factoryController();\n\n \t\t$action = $this->_currentAction;\n\n \t\t$controller->$action();\n \t}",
"public function dispatch($request, $response, $parameters);",
"public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }",
"public function getControllerAction() {}",
"public function __construct()\n {\n //print_r($this->getUrl()) ;\n $url =$this->getUrl();\n //LOOK IN Controller for first value\n\n\n\n if(file_exists('..'.DS.'app'.DS.'controllers'.DS.ucwords($url[0]).'.php'))\n {\n //if exists set as controller\n $this->currentController=ucwords($url[0]);\n //unset zero index\n unset($url[0]);\n }\n $classControllers='MVCPHP\\controllers\\\\'.$this->currentController;\n //Require controller\n //require_once '../app/controllers/'.$this->currentController.'.php';\n $classController =new $classControllers();\n //CHECK for second part of url\n //var_dump($url);\n if(isset($url[1]))\n {\n if(method_exists($classController,$url[1]))\n {\n $this->currentMethod=$url[1];\n unset($url[1]);\n }\n }\n // GET PARAMS\n\n $this->params =$url?array_values($url) : [];\n //var_dump($classController);\n call_user_func_array([$classController,$this->currentMethod],$this->params);\n\n }",
"public function dispatch ()\n {\n\n try\n {\n\n // initialize the controller\n $this->initialize();\n\n // get the application context\n $context = $this->getContext();\n\n // determine our module and action\n $moduleName = $context->getRequest()\n ->getParameter(MO_MODULE_ACCESSOR);\n\t\t\t\n\n $actionName = $context->getRequest()\n ->getParameter(MO_ACTION_ACCESSOR);\n\n if ($moduleName == null)\n {\n\n // no module has been specified\n $moduleName = MO_DEFAULT_MODULE;\n\n }\n\n if ($actionName == null)\n {\n\n // no action has been specified\n if ($this->actionExists($moduleName, 'Index'))\n {\n\n // an Index action exists\n $actionName = 'Index';\n\n } else\n {\n\n // use the default action\n $actionName = MO_DEFAULT_ACTION;\n\n }\n\n }\n\n // make the first request\n $this->forward($moduleName, $actionName);\n\n } catch (MojaviException $e)\n {\n\n $e->printStackTrace();\n\n } catch (Exception $e)\n {\n\n // most likely an exception from a third-party library\n $e = new MojaviException($e->getMessage());\n\n $e->printStackTrace();\n\n }\n\n }",
"public static function forward() {\n\t\t\t\n\t\t\t$url = HttpRequest::parsedQuery();\n\t\t\t\n\t\t\tif ( isset($url[0]) ) {\n\t\t\t\n\t\t\t\t$url[0] = ucwords($url[0]);\n\t\t\t\t\n\t\t\t\tif ( file_exists(path('application').'controllers'.DS.$url[0].'.php') ) {\n\t\t\t\t\t\n\t\t\t\t\tstatic::$_controller = $url[0];\n\t\t\t\t\t\n\t\t\t\t\tunset($url[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\trequire_once( path('application').'controllers'.DS.static::$_controller.'.php' );\n\t\t\t\n\t\t\tstatic::$_controller = new static::$_controller();\n\t\t\t\n\t\t\tif ( isset($url[1]) ) {\n\t\t\t\t\n\t\t\t\t$url[1] = strtolower($url[1]);\n\t\t\t\t\n\t\t\t\tif ( method_exists(static::$_controller, $url[1]) ) {\n\n\t\t\t\t\tstatic::$_action = $url[1];\n\t\t\t\t\t\n\t\t\t\t\tunset($url[1]);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstatic::$_parameters = $url ? array_values($url) : [];\n\t\t\t\n\t\t\tunset($url);\n\t\t\t\n\t\t\tcall_user_func_array([static::$_controller, static::$_action], static::$_parameters);\n\t\t}",
"private function route() {\n if (class_exists($this->controllerName . $this->postfix)) {\n $fullName = $this->controllerName . $this->postfix;\n $this->controllerClass = new $fullName;\n $this->controllerClass->setUp();\n if (count($this->args > 1)) { // Pass args that are not controller class\n $this->controllerClass->setArgs($this->args);\n }\n\n // Second arg in url is our \"action\", try that as a method-call\n $method = strtolower($this->args[0]); // method names are case-insensitive. Might as well take advantage of it.\n if (isset($method) && method_exists($this->controllerClass, $method)) {\n $this->controllerClass->{$this->args[0]}();\n }\n \n } else { // No such class. Use our default\n $this->defaultRoute();\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 }",
"function __construct()\n {\n //domain/controller/action/param\n $breakArr = $this->XuLyURL();\n //Array ( [0] => controller [1] => action [2] => param1 [3] => param2)\n\n \n //Xu ly controller, kiem tra form co ton tai hay khong moi require\n if(file_exists(\"./mvc/controllers/\".$breakArr[0].\".php\")){\n $this->controller = $breakArr[0];\n unset($breakArr[0]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n require_once \"./mvc/controllers/\".$this->controller.\".php\";\n //sau khi đã tạo connect controller và extends, khởi tạo đối tượng controller là controller hiện tại\n $this->controller = new $this->controller;\n \n //Xu ly action, kiem tra array[1]-action cua class controller\n if(isset($breakArr[1])){\n //kiem tra ham ton tai, tham so la object or class(controller) va function(action)\n //kiem tra tra ve boolean\n if(method_exists($this->controller, $breakArr[1])){\n $this->action = $breakArr[1];\n\n }\n //bo ra ngoai dieu kien kiem tra ton tai, neu truong hop action khong ton tai action khong duoc thay the nen khong unset dc\n unset($breakArr[1]);//sau khi da lay dc controller thi huy mang di -> tao param\n }\n\n\n //Xu ly param\n //goi param, (? = neu) mang ton tai thi param = array values(mang)\n // (: = nguoc lai thi) param rong~\n $this->param = $breakArr?array_values($breakArr):[];\n call_user_func_array([$this->controller,$this->action], $this->param);\n }",
"public function buildController(Resource $resource);",
"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}",
"protected function callController(array $attributes)\n {\n $action = 'indexAction';\n\n if (isset($attributes['action'])) {\n $action = $attributes['action'] . 'Action';\n }\n\n $name = 'lib\\\\' . $attributes['controller'] . 'Controller';\n /** @var Controller $controller */\n $controller = new $name;\n\n return $controller->$action();\n }",
"function call($controller, $action) {\n require_once('controller/'. $controller .'_controller.php');\n\n\n // create a new instance of the needed controller\n switch($controller) {\n case 'admin':\n $controller = new AdminController();\n break;\n case 'movie':\n // we need the model to query the database later in the controller\n require_once('model/movie.php');\n $controller = new MovieController();\n break;\n case 'layout':\n // we need the model to query the database later in the controller\n require_once('model/layout.php');\n $controller = new LayoutController();\n break;\n case 'cinema':\n // we need the model to query the database later in the controller\n require_once('model/cinema.php');\n $controller = new CinemaController();\n break;\n case 'schedule':\n // we need the model to query the database later in the controller\n require_once('model/schedule.php');\n require_once('model/cinema.php');\n require_once('model/layout.php');\n require_once('model/movie.php');\n $controller = new ScheduleController();\n break;\n case 'user':\n require_once('model/schedule.php');\n require_once('model/cinema.php');\n require_once('model/layout.php');\n require_once('model/movie.php');\n require_once('model/ticket.php');\n $controller = new UserController();\n break;\n\n }\n\n // call the action\n $controller->{ $action }();\n }",
"public static function createController( MShop_Context_Item_Interface $context, $name = null );",
"static function launchController($controllerName, $action, $mainParam = null, $controllerParams = array(), $othersParams = array()) {\n\t\t// Format names\n\t\t$_n = camelize($controllerName) . 'Controller';\n\t\t$_m = camelize($controllerName) . 'Model';\n\n\t\t$viewAction = $action;\n\n\t\tif (strpos($action, '.') !== false) {\n\t\t\t$action = substr($action, 0, strpos($action, '.'));\n\t\t}\n\n\t\t$action = lcfirst(camelize($action));\n\n\t\t// Format parameters\n\t\t$params = array();\n\t\tif (!is_null($mainParam)) {\n\t\t\t$params[] = $mainParam;\n\t\t}\n\t\tif (!is_null($othersParams) && !empty($othersParams)) {\n\t\t\t$params = array_merge($params, $othersParams);\n\t\t}\n\n\t\t// Instanciate controller\n\t\t$controller = new $_n ();\n\n\t\tif (!is_subclass_of($controller, 'Controller')) {\n\t\t\tthrow new ErrorException('Class <strong>' . $_n . '</strong> should extends <strong>Controller</strong>');\n\t\t}\n\n\t\t// Setting controller properties\n\t\tforeach ($controllerParams as $k => $v) {\n\t\t\t@$controller->{$k} = $v;\n\t\t}\n\n\t\t// Setting controller id\n\t\t$controller->setIDS($controllerName, $viewAction, $_m);\n\n\t\tself::$_ctrl = $controller;\n\n\n\t\tif (property_exists($controller, 'models')) {\n\t\t\t$controller->setModels($controller->models);\n\t\t}\n\n\t\tif (!$controller->hasModel()) {\n\t\t\t$controller->reloadModel($controllerName);\n\t\t}\n\n\n\t\t// Let's controller manager view creation\n\t\t$controller->createView();\n\n\n\n\t\t// Call beforeAction\n\t\t$controller->beforeAction($action);\n\n\t\t// Call the action !\n\t\t$res = call_user_func_array(array($controller, $action), $params);\n\n\t\t// After the action : call afterAction\n\t\t$controller->afterAction($action);\n\n\t\t// End App (write session, close DB engines....) without die\n\t\tApp::end(false);\n\n\t\t// If rendering required, let's render\n\t\tif ($controller->avoidRender == false) {\n\t\t\t$controller->renderView();\n\t\t}\n\n\t\t// After render\n\t\t$controller->afterRender();\n\n\t\t// We're done\n\t\treturn $controller;\n\t}",
"public function forceDispatch($controller, $action, $request, $response, $params = array());",
"private function resolveRequest(){\n\t\t$controllers_dir = puppy::getAppDir().'controllers';\n\t\t$path_segments = explode('/', $this->getPathInfo());\n\t\t\n\t\t$controller_location = null;\n\t\t$controller_name = null;\n\t\t$action_name = null;\n\t\t\n\t\t//build path to controller\n\t\t$build_path = $controllers_dir;\n\t\tforeach($path_segments as $k => $dir){\n\t\t\t$build_path = $build_path.'/'.$dir;\n\t\t\tif(file_exists($build_path.\"/\")){\n\t\t\t\tif(is_dir($build_path)){\n\t\t\t\t\t$controller_location = $build_path;\n\t\t\t\t\tif(is_file($build_path.'/'.$dir.'.php')){\n\t\t\t\t\t\t$controller_name = $dir;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$action_name = $dir;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//call action\n\t\tif(file_exists($controller_location.'/'.$controller_name.'.php')){\n\t\t\t//wrap require in try catch to state file has error\n\t\t\trequire_once($controller_location.'/'.$controller_name.'.php');\n\t\t\t$controller = new $controller_name();\n\t\t\tif($action_name !== null)\n\t\t\t\t$controller->$action_name();\n\t\t}\n\t}",
"private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }",
"public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }",
"public function dispatch($url){\n\n /*\n Before checking for a match we must get only the first GET Param,\n if others were added to the URL (?key=value), we must remove them\n */\n if($url != ''){\n $parts = explode('&', $url, 2);\n if( strpos($parts[0], '=') === false ){\n //if no '=' was not found, no extra GET params passed in, url is valid\n $url = $parts[0];\n }else {\n //only get vars were passed in, empty URL to send to Home Page\n $url = '';\n }\n }\n\n // Handle a match\n if( $this->match($url) ){\n // Filter Controller\n //route params are now inside object instance $this->params\n $controller = $this->params['controller'];\n //convert to StudlyCaps as this is how the actual Controller class should be defined\n $controller = $this->convertToStudlyCaps($controller);\n //Check if a namespace has been specified for the conroller in the route's params\n $controller = $this->getNamespace() . $controller;\n\n // Make sure that the controller class exists before we instantiate it\n if( !class_exists($controller) ){\n throw new \\Exception(\"Controller class: $controller not found\");\n }\n //class exists...create the object\n $controllerObj = new $controller($this->params);\n\n // Filter Action...default to index\n $action = (isset($this->params['action'])) ? $this->params['action'] : 'index';\n\n //convert action string to camelCase, as this is how the class method should be defined\n $action = $this->convertToCamelCase($action);\n //the actual method will have 'Action' appended to the end,\n //this is done to force execution of the __call function, this can be bypassed however,\n //if the user inputted URL has 'Action' explicitly appended to\n //...check that the action does not have action appeded to it\n if( preg_match( '/action$/i', $action) ){\n throw new \\Exception(\"Method $action in controller $controller cannot be called directly - remove the Action suffix to call this method\");\n }\n //Finally, call Action on controller\n //THE CONTROLLER METHOD WILL NOT EXIST, THIS WILL FORCE THE EXECUTION OF THE\n // __call METHOD THAT SHOULD BE DEFINED IN THE CONTAINING CLASS\n $controllerObj->$action();\n }else {\n //No route matched\n throw new \\Exception(\"No route matched for $url\", 404);\n }\n\n }",
"public function launch()\r\n\t{\r\n\t\t// Corrige le nom du controller.\r\n\t\t// ajoute le namespace et met la 1er lettre en majuscule\r\n\t\t$controller = \"\\\\application\\\\controllers\\\\\";\r\n\t\t$controller .= ucfirst($this->controller);\r\n\r\n\t\t// si la classe existe\r\n\t\tif(class_exists($controller))\r\n\t\t\t$controller = new $controller;\r\n\r\n\t\t// Si la class $controller n'existe pas\r\n\t\telse\r\n\t\t{\r\n\t\t\t// transformation en page d'erreur\r\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\r\n\r\n\t\t\t// alors le controller d'erreur est instancé\r\n\t\t\t$controller = new \\application\\controllers\\Error;\r\n\r\n\t\t\t// appel la method index du controller d'erreur\r\n\t\t\treturn $controller->index();\r\n\t\t}\r\n\r\n\t\t// Si la variable restfull est fause\r\n\t\tif(!$controller->restful)\r\n\t\t\t$method = \"action_\".$this->method;\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\t// alors peu être appelé par le type de request\r\n\t\t\t// ex: get_index(), post_index(), put_index() or delete_index()\r\n\t\t\t$method = strtolower($_SERVER['REQUEST_METHOD']).\"_\" .$this->method;\r\n\t\t}\r\n\r\n\t\t// Vérifie que la method existe dans le controller\r\n\t\tif(method_exists($controller, $method))\r\n\t\t\t// Appel la method du controller en lui passant des parametres\r\n\t\t\treturn call_user_func_array(array($controller, $method), array($this->args));\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\t// transformation en page d'erreur\r\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\r\n\r\n\t\t\t// alors le controller d'erreur est instancé\r\n\t\t\t$controller = new \\application\\controllers\\Error;\r\n\r\n\t\t\t// appel la method index du controller d'erreur\r\n\t\t\treturn $controller->index();\r\n\t\t}\r\n\t}",
"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 final function run()\n\t{\n\t\t$controllerClass = ucfirst(App::request()->getControllerName());\n\t\t$actionName = App::request()->getActionName().Request::ACTION_SUFFIX;\n\n\t\t$this->_execute($controllerClass, $actionName);\n\t}",
"protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }",
"function executeController()\r\n{\r\n\t// Uri and figure out the path to the controller.\r\n\t$request = trim($_GET['request'], \"/ \");\r\n\t\r\n\tif ($request != '') {\r\n\t // Using the URL segments, construct the name of the class.\r\n\t // Note: The class name is mapped to the directory structure.\r\n\t $reqSegments = explode(\"/\", $request);\r\n\t}\r\n\t\r\n\t$controllerName = 'App_Pages_';\r\n\t$controllerName .= ($reqSegments[0])?$reqSegments[0]:'Index';\r\n\t$controllerName .= '_Controller';\r\n\t\r\n\t$actionName = ($reqSegments[1])?$reqSegments[1]:'index';\r\n\r\n\tif (class_exists($controllerName)) {\r\n\t\tif (method_exists($controllerName, $actionName)) {\r\n\t\t\t$controller = new $controllerName();\r\n\t\t\t$controller->$actionName();\r\n\t\t} else {\r\n\t\t\tdie('Page not found');\r\n\t\t}\r\n\t} else {\r\n\t\tdie('Page not found');\r\n\t}\r\n}",
"public function callController()\n {\n Artisan::call('lucy:controller', $this->builder->getAttribute('controller'));\n }",
"public function execute() {\n\t\t$controller = $this->manager->get($this->getController());\n\t\t$reflection = new \\ReflectionClass($controller);\n\t\t$controller->run( $this->getAction($reflection) );\n\t}",
"public static function dispatchNow(...$arguments)\n {\n return app(Dispatcher::class)->dispatchNow(new static(...$arguments));\n }",
"function dispatch(...$args): void {\n\n $method = strtoupper($_SERVER['REQUEST_METHOD']);\n $path = '/'.trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');\n\n # post method override\n if ($method === 'POST') {\n if (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n $method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } else {\n $method = isset($_POST['_method']) ? strtoupper($_POST['_method']) : $method;\n }\n }\n\n $responder = serve(stash(DISPATCH_ROUTES_KEY) ?? [], $method, $path, ...$args);\n $responder();\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 __construct($objController) {\n //Assign Controller for template configuration\n $this->objController = $objController;\n \n //Assign Request Param\n $this->request = $this->objController->getRequest();\n }",
"public function routeController()\n\t{\n\t\t$action = \"actionIndex\";\n\n\t\tif (isset($_GET[\"p\"]))\n\t\t{\n\t\t\t$params = array();\n\t\t\t$params = array_filter(explode(\"/\", $_GET[\"p\"]));\n\n\t\t\tif (count($params) != 1)\n\t\t\t{\n\t\t\t\t$action = \"action\";\n\n\t\t\t\tfor ($i = 1; $i < count($params); $i++)\n\t\t\t\t{\n\t\t\t\t\t$action .= ucwords($params[$i]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$controller = \"Controller_\" . ucwords($params[0]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcall_user_func(array(new Controller_Index(), $action));\n\t\t\texit();\n\t\t}\n\n\t\tif (isset($controller) && class_exists($controller))\n\t\t{\n\t\t\tif (method_exists(new $controller(), $action))\n\t\t\t{\n\t\t\t\tcall_user_func(array(new $controller(), $action));\n\t\t\t\texit();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//call_user_func(array(new Controller_Error(), \"actionIndex\"));\n\t\t\t\tcall_user_func(array(new Controller_Index(), \"actionIndex\"));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//call_user_func(array(new Controller_Error(), \"actionIndex\"));\n\t\t\tcall_user_func(array(new Controller_Index(), \"actionIndex\"));\n\t\t\texit();\n\t\t}\n\t}",
"public function dispatchController($moduleName = 'index', $controllerName = 'index', $actionName = 'index', array $params = array())\n {\n $this->module = $moduleName;\n $this->controller = $controllerName;\n $this->action = $actionName;\n\n $controllerClassname = $this->config('controller_namespace')\n . str_replace(' ', '', ucwords(str_replace('_', ' ', $moduleName))) . '\\\\'\n . str_replace(' ', '', ucwords(str_replace('_', ' ', $controllerName)))\n . 'Controller';\n $methodName = $actionName . 'Action';\n\n $action_params = array_merge($this->parseParams($params), $_POST);\n $controller = new $controllerClassname($this, $action_params);\n\n $this->view()->setTemplate(\n strtolower($moduleName) . DIRECTORY_SEPARATOR . strtolower($controllerName) . DIRECTORY_SEPARATOR . strtolower($actionName) . '.tpl'\n );\n $this->view()->appendData(array('slim' => $this));\n\n try {\n $controller->init();\n $controller->beforeActionProcess();\n $controller->$methodName();\n $controller->afterActionProcess();\n echo $this->view->render();\n } catch(\\Exception $e) {\n $controller->errorException($e);\n echo $this->view->render();\n\n /*$errorParams = $this->parseParams($params);\n $errorParams = array_merge(\n $action_params, array(\n 'module' => $moduleName,\n 'controller' => $controllerName,\n 'action' => $actionName,\n 'exception' => $e\n )\n );\n $errorController = new ErrorController($this, $errorParams);\n $errorController->exceptionAction();*/\n }\n }",
"static function perform_controller_action($class_path,$action,$objects,$parameters) {\r\n\t\t\r\n\t\t//We treat 'new' the same as 'edit', since they generally contain a lot of the same code\r\n\t\tif ($action == \"new\") {\r\n\t\t\t$action = \"edit\";\r\n\t\t}\r\n\t\t\r\n\t\t//Let's look for a controller\r\n\t\t$controller_path = SITE_PATH.\"/controllers/\".$class_path.\"_controller.php\";\r\n\r\n\r\n\t\tif (file_exists($controller_path)) {\r\n\t\t\trequire_once($controller_path);\r\n\t\t\t\r\n\t\t\t$class_path_components = explode(\"/\",$class_path);\r\n\t\t\t$class = $class_path_components[count($class_path_components)-1];\r\n\t\t\t$controller_class = $class.\"_controller\";\r\n\t\t\tif (!method_exists($controller_class,$action)) {\r\n\t\t\t\tif (router::render_view($class_path,$action)) {\r\n\t\t\t\t\texit;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfatal_error(\"$controller_class does not respond to $action\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$controller = new $controller_class();\r\n\t\t\t$controller->parameters = $parameters;\r\n\t\t\tcall_user_func_array(array($controller,$action),$objects);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\t//If no controller was found, we'll look for a view\r\n\t\tif (router::render_view($class_path,$action)) {\r\n\t\t\texit;\r\n\t\t}\r\n\t}",
"private function callController($controller){\r\n list($classname, $method) = explode(\"::\", $controller); \r\n if(class_exists($classname)){\r\n $controllerInstance = new $classname();\r\n if(method_exists($controllerInstance, $method)){\r\n $controllerInstance->$method();\r\n }else{\r\n $this->getErrorPage($controller);\r\n }\r\n }else{\r\n $this->getErrorPage($controller);\r\n }\r\n }",
"function callControllerAction() {\n $santitizedUrl = ''; \n if (!empty($_GET['route'])) {\n $santitizedUrl = trim($_GET['route']);\n }\n\n $route = $this->getMatchingRoute($santitizedUrl);\n if ($route != null) {\n $actionValues = explode('/', ltrim(str_replace($route->getUrl(), '', $santitizedUrl), '/'));\n $controllerName = $route->getControllerName();\n $controllerName = $controllerName . 'Controller'; \n $controller = new $controllerName;\n $action = $route->getActionName();\n $controller->$action($actionValues);\n } else {\n // If we've entered this else section, we've effectively been unable to match\n // the specified url to a registered route. Normally we would throw a 404\n // error and return a user friendly message stating so, however, I'm leaving\n // that as an exersize for the reader\n }\n \n }",
"public function run($args) {\n Env::instance()->setStage(getenv($this->getAppName()));\n \n // $args = $this->getArgs();\n // execute action on controller\n $dispatcher = new Dispatcher();\n \n\n $this->preRun();\n $viewVals = $dispatcher->dispatch($args);\n $this->postRun();\n \n $viewPath = $dispatcher->getViewPath();\n require_once($viewPath);\n }",
"public function __construct() {\n\t\t$sf = spitfire();\n\t\t$params = func_get_args();\n\n\t\t#Extract the app\n\t\tif (reset($params) instanceof App || $sf->appExists(reset($params))) {\n\t\t\t$app = array_shift($params);\n\t\t}\n\t\telse {\n\t\t\t$app = $sf;\n\t\t}\n\n\t\t#Get the controller, and the action\n\t\t$controller = null;\n\t\t$action = null;\n\t\t$object = Array();\n\n\t\t#Get the object\n\t\twhile(!empty($params) && !is_array(reset($params)) ) {\n\t\t\tif (!$controller) { $controller = array_shift($params); }\n\t\t\telseif (!$action) { $action = array_shift($params); }\n\t\t\telse { $object[] = array_shift($params); }\n\t\t}\n\n\t\t#Get potential environment variables that can be used for additional information\n\t\t#like loccalization\n\t\t$get = array_shift($params);\n\t\t$environment = array_shift($params);\n\n\t\tparent::__construct($app, $controller, $action, $object, 'php', $get, $environment);\n\t}"
] | [
"0.6747391",
"0.6745231",
"0.66545177",
"0.6643778",
"0.6583779",
"0.6445065",
"0.64262486",
"0.6365146",
"0.63440603",
"0.6268208",
"0.62662405",
"0.62603784",
"0.6251924",
"0.62374294",
"0.6217345",
"0.6202858",
"0.618361",
"0.61825645",
"0.6180855",
"0.61748445",
"0.61575127",
"0.61459374",
"0.6145179",
"0.6128414",
"0.609662",
"0.60882515",
"0.60762936",
"0.60686857",
"0.6030687",
"0.6027707",
"0.59942746",
"0.5988657",
"0.59869",
"0.59551257",
"0.5952238",
"0.5945171",
"0.591822",
"0.5909464",
"0.59088224",
"0.5906601",
"0.5902356",
"0.5897344",
"0.5891842",
"0.5886728",
"0.58686626",
"0.5862071",
"0.5845009",
"0.58368415",
"0.5831348",
"0.58053935",
"0.5792683",
"0.5775397",
"0.577534",
"0.5772219",
"0.5769339",
"0.5769339",
"0.5766528",
"0.5755309",
"0.57552195",
"0.5751816",
"0.5747023",
"0.57392573",
"0.5731565",
"0.57315105",
"0.57303196",
"0.57251394",
"0.5721551",
"0.5703367",
"0.5695591",
"0.5693498",
"0.56902605",
"0.56895393",
"0.56891483",
"0.5683738",
"0.56713074",
"0.56672114",
"0.5666666",
"0.56569153",
"0.5640491",
"0.5639889",
"0.5627364",
"0.5625744",
"0.56239915",
"0.5619938",
"0.56149185",
"0.5613199",
"0.5603967",
"0.55959237",
"0.5581516",
"0.5569208",
"0.5567185",
"0.555434",
"0.55475485",
"0.5529095",
"0.55127734",
"0.5510788",
"0.5508816",
"0.5506637",
"0.5501891",
"0.5498186"
] | 0.7837791 | 0 |
Filters the controller class name | private function filterName(string $name): string
{
$name = str_replace(['-', '_'], ' ', $name);
$words = explode(' ', $name);
$filtered = '';
foreach ($words as $word) {
$filtered .= ucfirst($word);
}
return $filtered;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function controller_class($name) {\n return str_replace('/', '_', Support_Inflector::camelize($name)) . 'Controller';\n }",
"protected function controller_name($class) {\n if (substr($class, -10) == 'Controller')\n $class = substr($class, 0, -10);\n return Support_Inflector::underscore(str_replace('_', '/', $class));\n }",
"public function getControllerName(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_controllerName[$className])){\n\t\t\treturn self::$_controllerName[$className];\n\t\t} else {\n\t\t\treturn $className;\n\t\t}\n\t}",
"public function getControllerName()\n {\n return preg_replace(\"/(.*)[\\\\\\\\](.*)(Controller)/\", '$2', get_class($this));\n }",
"public function CompleteControllerName ($controllerNamePascalCase);",
"public function getControllerName() {}",
"protected function filterName(): string\n {\n return Str::snake(class_basename($this));\n }",
"public function getControllerObjectName() {}",
"public function getControllerObjectName() {}",
"public function getController()\n\t{\n\t\t$className = strtolower(get_class($this));\n\t\t$className = preg_replace('/_controller$/', '', $className);\n\n\t\treturn $className;\n\t}",
"public function getControllerName()\n\t{\n\t\t$explodedArray = explode('/', $_SERVER['REQUEST_URI']);\n\t\tif (array_key_exists(1, $explodedArray) && !empty($explodedArray[1]) && !strstr($explodedArray[1], '?')) {\n\t\t\t$this->controllerName = $explodedArray[1];\n\t\t}else\n\t\t\t$this->controllerName = 'main';\n\t}",
"protected function getControllerClassName()\n {\n $className = $this->classPath;\n\n if (false !== strpos($className, '.')) {\n \\Yii::import($className);\n $className = explode('.', $className);\n $className = array_pop($className);\n }\n\n return $className;\n }",
"public function GetControllerClass ();",
"public function getControllerClassName() //\"HomeController\"\n {\n\n return Inflector::camel($this->getController()).'Controller'; //clase estatica NO se instancia \n }",
"private function _controllerToClassName( $controllerName ) {\n $words = ucwords(str_replace(array('_', '-'),' ', $controllerName));\n return str_replace(' ', '', $words);\n }",
"public static function qualifyController($name)\n {\n $shellClass = self::qualifyShell($name);\n\n if ((new $shellClass())->isInternal()) {\n return config('beluga.internal_controller_namespace').'\\\\'.class_basename($name).'Controller';\n }\n\n $class = config('beluga.controller_namespace').'\\\\'.$name.'Controller';\n\n if (class_exists($class)) {\n return $class;\n }\n\n return $name;\n }",
"public function getControllerName()\n {\n return Inflector::id2camel($this->getControllerId(),'-');\n }",
"public static function name()\n {\n $path = explode('\\\\', get_called_class());\n $controller_name = array_pop($path);\n return trim(str_replace(\"Controller\", \"\", $controller_name));\n }",
"function getControllerObjectName() ;",
"public function getControllername()\r\n {\r\n return $this->controllername;\r\n }",
"public function getControllerName()\n {\n $current = static::class;\n $ancestry = ClassInfo::ancestry($current);\n $controller = null;\n while ($class = array_pop($ancestry)) {\n if ($class === self::class) {\n break;\n }\n if (class_exists($candidate = sprintf('%sController', $class))) {\n $controller = $candidate;\n break;\n }\n $candidate = sprintf('%sController', str_replace('\\\\Model\\\\', '\\\\Control\\\\', $class));\n if (class_exists($candidate)) {\n $controller = $candidate;\n break;\n }\n }\n if ($controller) {\n return $controller;\n }\n return PageController::class;\n }",
"protected function classFilterName($class)\n {\n if (is_object($class)) {\n $class = get_class($class);\n }\n return substr($class, strrpos($class, '\\\\') + 1);\n }",
"public function testGetControllerClassNoControllerName()\n {\n $request = new ServerRequest([\n 'url' => 'test_plugin_three/ovens/index',\n 'params' => [\n 'plugin' => 'Company/TestPluginThree',\n 'controller' => 'Ovens',\n 'action' => 'index',\n ],\n ]);\n $result = $this->factory->getControllerClass($request);\n $this->assertSame('Company\\TestPluginThree\\Controller\\OvensController', $result);\n }",
"abstract protected function getFilterClassName($string);",
"private function getControllerName() {\n if(isset($_GET['c']) && !empty($_GET['c'])) {\n return $_GET['c'];\n }\n return Config::getDefaultController();\n }",
"private static function formatAsController($str) {\n\t\tif (strpos($str, 'Controller') === false) {\n\t\t\t$str = ucfirst(strtolower($str)).'Controller';\n\t\t}\n\t\t\n\t\treturn $str;\n\t}",
"private function _getControllerClassName($name)\n {\n $parts = explode('/', $name);\n $result = '';\n \n //Vendor part\n foreach ( explode('_', $parts[0]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n //Package part\n foreach ( explode('_', $parts[1]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n //Module part\n foreach ( explode('_', $parts[2]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n \n $result .= 'Controller';\n \n if (empty($parts[3]))\n {\n $result .= '_Default';\n }\n else foreach ( explode('_', $parts[3]) as $key )\n {\n $result .= '_'.ucfirst($key);\n }\n return $result;\n }",
"public function getControllerSimpleName()\n {\n return end(explode('\\\\', $this->controllerName));\n }",
"public function getBaseControllerName(): string;",
"public function getShortName() {\n return lcfirst(str_replace('Controller', '', get_class($this)));\n }",
"protected static function getControllerName()\n {\n //控制器cname对应的中文名称\n $cnames['UsersController'] = '用户管理';\n $cnames['CatesController'] = '栏目管理';\n $cnames['AdminuserController'] = '管理员管理';\n $cnames['RoleController'] = '岗位管理';\n $cnames['NodeController'] = '权限管理';\n $cnames['BannersController'] = '轮播图管理';\n $cnames['LinksController'] = '链接管理';\n $cnames['NewsController'] = '新闻管理';\n $cnames['AddressController'] = '收货地址管理';\n $cnames['BrandsController'] = '品牌管理';\n $cnames['SpecificController'] = '商品规格管理';\n $cnames['GoodsController'] = '商品管理';\n $cnames['BlogController'] = '商城头条管理';\n $cnames['RecommendController'] = '今日推荐管理';\n $cnames['SeckillController'] = '秒杀管理';\n\n return $cnames;\n }",
"public function getControllerActionName() {}",
"public function getControllerName()\n {\n return $this->controller;\n }",
"public function getControllerFileName() // \"controller/ContactosController.php\"\n {\n\n return 'controller/' . $this->getControllerClassName().'.php';\n\n }",
"public function forceController($controller_name);",
"public function getControllerName()\n {\n return $this->_controller;\n }",
"protected function getModuleFromControllerName() \r\n {\r\n $controller_name = get_class($this);\r\n return strtolower(preg_replace('/_(.*?)$/i', '', $controller_name));\r\n }",
"public static function getControllerName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"public function getControllerName() {\n\t\treturn $this->controller;\n\t}",
"public function getControllerName() {\n return $this->controllerName;\n }",
"public function getControllerExtensionName() {}",
"public function getControllerExtensionName() {}",
"public function formatControllerName($unformatted)\n {\n\t return ucfirst($this->_formatName($unformatted)) . 'Controller';\n }",
"public function getControllerName() {\n\n\t\treturn $this->_controller;\n\t}",
"public static function getActionName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"function controller($shortName)\n{\n list($shortClass, $shortMethod) = explode('/', $shortName);\n\n return sprintf('KnpU\\\\ActivityRunner\\\\Controller\\\\%sController::%sAction', ucfirst($shortClass), $shortMethod);\n}",
"public function getController($ucfirst=true){\r\n\t\tif(is_array($this->matchedRoute) && isset($this->matchedRoute['controller_regex'])){\r\n\t\t\tif($this->matchedRoute['controller_regex'] == true){\r\n\t\t\t\t$this->controller = 'Reg'.sha1($this->matchedRoute['controller']);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif($ucfirst){\r\n\t\t\t$o = ucfirst($this->controller);\r\n\t\t} else {\r\n\t\t\t$o = strtolower($this->controller);\r\n\t\t}\r\n\t\treturn $o;\r\n\t}",
"public function formatControllerName($unformatted)\n {\n return ucfirst($this->_formatName($unformatted)) . 'Controller';\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"protected function convertToControllerClassName($path)\n {\n if (empty($path)) {\n return \"IndexController\";\n }\n return str_replace([\"_\", \"-\"], \"\", ucwords($path, \"_- \")) . 'Controller';\n }",
"public function getController( );",
"public function getControllerTitle()\n {\n if(strpos($this->controller, '/') >= 0) {\n return preg_replace(\"/\\/[\\w-_]+$/\", '', $this->controller);\n }\n else {\n return '';\n }\n }",
"public function getController()\n {\n return ucfirst($this->controller).'Controller';\n }",
"private function veriFyControllerOnUrl()\n {\n if (!empty($this->urlParameters[3])) {\n $this->existControllerOnRoute = true;\n }\n if ($this->urlParameters && array_key_exists(0, $this->urlParameters)) {\n $this->controller = ucfirst($this->urlParameters[0]) . 'Controller';\n $this->controllerNameAliases = $this->urlParameters[0];\n }\n }",
"public function getControllerInstanceClassName($controllerInstance)\n {\n return $controllerInstance;\n }",
"public function getCustomController()\n {\n $controllerName = ucfirst(str_replace('post_', '', $this->slug));\n return $controllerName.'Controller';\n }",
"public function getClassName() {\n\t\treturn 'LinkItemController';\n\t}",
"public function setControllerName()\n {\n $this->name = \"tagui\";\n }",
"public function getControllerClass(){\r\n\t\t$this->setSystemController();\r\n\t\t$controllers = $this->config['controllers'];\r\n\t\t\r\n\t\t$key = $this->getPageName(false);\r\n\r\n\t\t$controllerClass = null;\r\n\t\tforeach($controllers as $_key => $_val){\r\n\t\t\tif(isset($_val[$key])){\r\n\t\t\t\t$this->matchedRoute = $_val;\r\n\t\t\t\t$controllerClass = $_val[$key];\r\n\t\t\t} else {\r\n\t\t\t\tforeach ($_val as $routeKey => $routeValue) {\r\n\t\t\t\t\tif(is_array($routeValue)){\r\n\t\t\t\t\t\tif(isset($routeValue['route'])){\r\n\t\t\t\t\t\t\t/** \r\n\t\t\t\t\t\t\t * in this part the router is using a regular expresion\r\n\t\t\t\t\t\t\t * on either route or controller or action\r\n\t\t\t\t\t\t\t * this is the 2nd type of routing of opoink\r\n\t\t\t\t\t\t\t * \r\n\t\t\t\t\t\t\t * this type will be deprectated soon as we will be using \r\n\t\t\t\t\t\t\t * the third type instead\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t$this->requestRoute = $this->getRoute(false);\r\n\t\t\t\t\t\t\t$this->requestController = $this->getController(false);\r\n\t\t\t\t\t\t\t$this->requestAction = $this->getAction(false);\r\n\t\r\n\t\t\t\t\t\t\t$r = $this->doCompare($this->requestRoute, $routeValue['route'], $routeValue['route_regex']);\r\n\t\t\t\t\t\t\t$c = $this->doCompare($this->requestController, $routeValue['controller'], $routeValue['controller_regex']);\r\n\t\t\t\t\t\t\t$a = $this->doCompare($this->requestAction, $routeValue['action'], $routeValue['action_regex']);\r\n\t\r\n\t\t\t\t\t\t\t$this->route_regex = $r;\r\n\t\t\t\t\t\t\t$this->controller_regex = $c;\r\n\t\t\t\t\t\t\t$this->action_regex = $a;\r\n\t\r\n\t\t\t\t\t\t\tif($r && $c && $a) {\r\n\t\t\t\t\t\t\t\t$this->matchedRoute = $routeValue;\r\n\t\t\t\t\t\t\t\t$controllerClass = $routeValue['class'];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telseif(isset($routeValue['pattern'])){\r\n\t\t\t\t\t\t\t/** \r\n\t\t\t\t\t\t\t * in this part the router is using the full regex\r\n\t\t\t\t\t\t\t * pattern ex: /user/edit/:id/save\r\n\t\t\t\t\t\t\t * this is the third type of routing\r\n\t\t\t\t\t\t\t * currently this type wont work on the xml templating of opoink framework\r\n\t\t\t\t\t\t\t * this can be usefull for rest API request\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t$params = $this->opoinkRouter->getMatch($routeValue);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(is_array($params)){\r\n\t\t\t\t\t\t\t\tforeach($params as $key => $value){\r\n\t\t\t\t\t\t\t\t\t$_GET[$key] = $value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$controllerClass = $routeValue['class'];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($controllerClass){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $controllerClass;\r\n\t}",
"private function buildControllerNameWithNamespace() : void\n\t{\n\t\t$this->controllerName = '\\\\' . $this->namespace . '\\\\Controllers\\\\' . $this->request->getControllerName() . '\\\\Controller';\n\t}",
"abstract public function getFilterClass();",
"public function getActionClassName()\n {\n return $this->getClassName();\n }",
"public function getControllerName()\n {\n if (is_null($this->_controllerName)) {\n $this->getController();\n }\n return $this->_controllerName;\n }",
"public function getController();",
"public function getController();",
"public function getController();",
"protected function getNameInput()\n {\n return trim($this->argument('name') . 'Controller');\n }",
"public function filters()\n {\n return [\n 'name' => 'trim|capitalize|escape'\n ];\n }",
"public function getControllerClasses() {\n // does not exist a backend, nor a frontend controller of this component.\n return array();\n }",
"private static function toClass( $controller )\n {\n $classString = str_replace( ' ', '', ucwords( str_replace( '-', ' ', $controller ) ) );\n \n return 'controller\\\\' . $classString;\n }",
"public function getController() : string\n {\n return substr($this->uri, 0, -strlen($this->match)) .\n $this->replacement;\n }",
"private function getActionName()\n {\n return strtolower($this->_request->getActionName());\n }",
"public static function buildClassName($p_main)\n {\n return self::CONTROLLER_NS.'\\\\'.ucfirst($p_main).\"Controller\";\n }",
"public function getController()\n {\n return $this->str_controller;\n }",
"public function getUniqueControllerPrefix()\n {\n return self::PREFIX;\n }",
"public static function getControllerName()\n {\n //get the name of the page from URL \n $page_name = request::get('page', 'home');\n //$page_uri = $_SERVER['REQUEST_URI'];//get the uri of the current page\n //$url_parts = explode('/',$page_uri);//break it into parts\n //$page_name = array_pop($url_parts);//gets the last part (contact from www.site.com/contact)\n //get the path to the proper controller file based on the page name\n\n //if(trim($page_name)=='') $page_name = 'home';//if none was specified, make ot home\n\n $controller_file = static::getControllerFile($page_name);\n //if such a controller exists\n if(file_exists($controller_file))\n {\n //return the name of the page \n return $page_name;\n }\n else\n {\n //otherwise throw a nice error!\n return 'error404';\n }\n }",
"public function getName()\n {\n return Craft::t('Controller Action');\n }",
"protected function getControllerBaseName()\n {\n $controllerName = get_called_class();\n $controllerNameComponents = explode('\\\\', $controllerName);\n\n $baseName = array_pop($controllerNameComponents);\n $baseName = substr($baseName, 0, strrpos($baseName, 'Controller'));\n\n return $baseName;\n }",
"public function formatController()\n {\n if ($this->controllerFormatter) {\n return call_user_func($this->controllerFormatter, $this);\n }\n return 'Controller' . StringObject::create($this->getController())->toClass();\n }",
"public function GetController ();",
"public function getClassFilter()\n {\n return $this->get(self::CLASS_FILTER, null);\n }",
"public function getDefaultControllerName()\n {\n return $this->_defaultController;\n }",
"public function setControllerName($controllerName){\n\t\tself::$_controllerName[get_class($this)] = $controllerName;\n\t}",
"protected function getControllerPath( $class_name )\n {\n return $this->classPath;\n }",
"protected function _setControllerName($name) {\n\t\t$this->controller = $name;\n\t}",
"function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }",
"public static function action()\n {\n return strtolower(static::name());\n }",
"public function getModelNameBasedOnClassName(): string\n {\n $fqn = explode(\"\\\\\", get_class($this));\n\n return strtolower(end($fqn));\n }",
"protected function getNameInput()\n {\n $this->model = trim($this->argument('name'));\n return $this->model . 'Controller';\n }",
"static function getControllerClass($component, $controllerName = '', $viewName = '') {\n\n\t\tif ($controllerName) {\n\t\t\t$namePart = $controllerName;\n\t\t}\n\t\telseif ($viewName) {\n\t\t\t$namePart = $viewName;\n\t\t}\n\t\telse {\n\t\t\t$identifier = KLog::log('Invalid parameters, both $controllerName and $viewName parameters are empty. Request URI was \"'.$_SERVER['REQUEST_URI'].'\", query string was \"'.$_SERVER['QUERY_STRING'].'\" Function parameters were '.var_export(func_get_args(), true), 'error');\n\t\t\tthrow new Exception('Invalid parameters, both $controllerName and $viewName parameters are empty. Log identifier is '.$identifier, '400');\n\t\t}\n\n\t\t$className = ucfirst(strtolower(substr($component, 4))).'Controller'.ucfirst(strtolower($namePart));\n\n\t\treturn $className;\n\n\t}",
"public static function qualifyAction($name)\n {\n $class = config('beluga.internal.action_namespace').'\\\\'.$name;\n\n if (class_exists($class)) {\n return $class;\n }\n\n return $name;\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function getClassName() ;",
"public function GetDefaultControllerAndActionNames ();",
"public function getRouteName(): string\n {\n $path = str_replace(\"app/site/controllers/\", \"\", str_replace(\"\\\\\", \"/\", strtolower(get_class($this))));\n return str_replace(\"/\", \".\", trim($path, \"/\"));\n }",
"public function & GetController ();",
"private function setControllerChildName(): self\n {\n // Get the child controller classname\n $childClassName = get_class($this);\n\n $className = str_replace('Controller', '', $childClassName);\n $className = explode('\\\\', $className);\n $className = ltrim(preg_replace('/[A-Z]/', '_$0', end($className)), '_');\n \n $this->controllerChildName = $className;\n\n return $this;\n }",
"public function getClassName();",
"public function getClassName();",
"public function getId()\n {\n return strtolower(strstr($this->getShortName(), 'Controller', true));\n }"
] | [
"0.69612956",
"0.6936231",
"0.69133884",
"0.6862592",
"0.6854327",
"0.67791575",
"0.66970015",
"0.66307503",
"0.66307503",
"0.6606847",
"0.65630096",
"0.65108544",
"0.64830035",
"0.6474367",
"0.64485365",
"0.644106",
"0.6389805",
"0.6370622",
"0.6349202",
"0.63423467",
"0.6299684",
"0.62582827",
"0.6252501",
"0.6251069",
"0.62467957",
"0.62389237",
"0.62310207",
"0.6204766",
"0.620346",
"0.6174526",
"0.617162",
"0.613371",
"0.611913",
"0.60792446",
"0.60766655",
"0.60596836",
"0.6048484",
"0.6019656",
"0.60185325",
"0.59951997",
"0.59922814",
"0.59922814",
"0.5983919",
"0.5980891",
"0.5936684",
"0.59272695",
"0.5922405",
"0.59151626",
"0.5907748",
"0.5907748",
"0.59040076",
"0.5892312",
"0.58855534",
"0.58733135",
"0.5872723",
"0.5857551",
"0.5853063",
"0.58387053",
"0.58081585",
"0.5795761",
"0.57789177",
"0.5753311",
"0.5752895",
"0.5744199",
"0.5729829",
"0.5729829",
"0.5729829",
"0.5727858",
"0.5727185",
"0.5721649",
"0.5706467",
"0.56896114",
"0.56825185",
"0.5651601",
"0.5651591",
"0.5645995",
"0.56427586",
"0.5637376",
"0.5631068",
"0.5606053",
"0.5602052",
"0.55993074",
"0.5597422",
"0.5595667",
"0.55905217",
"0.5588792",
"0.55853033",
"0.5584353",
"0.5578088",
"0.55637306",
"0.5562549",
"0.5553524",
"0.55500156",
"0.5541542",
"0.5536854",
"0.5536506",
"0.5531812",
"0.55284256",
"0.55251396",
"0.55251396",
"0.55204046"
] | 0.0 | -1 |
return parent::tableName(); // TODO: Change the autogenerated stub | public static function tableName()
{
return 'category';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function tableName();",
"abstract public function tableName();",
"public function getTableName() ;",
"abstract function tableName();",
"abstract public static function tableName() : string;",
"public static function tableName()\n { \n }",
"public function getTableName() {}",
"public function getTableName() {}",
"public static function tableName(): string;",
"public function getTableName():string;",
"abstract public function getTableName();",
"abstract public function getTableName();",
"abstract public function getTableName();",
"public function getTableName(): string;",
"public function getTableName(): string;",
"public function table(){\r\n\r\n return $this;\r\n }",
"public function tableName() \n {\n return $this->tableName;\n }",
"public function getTableName();",
"public function getTableName();",
"abstract public static function getTableName();",
"abstract public static function getTableName();",
"abstract protected function getTableName();",
"abstract protected function getTableName();",
"function getTableName(): string;",
"public function getTable()\n {\n\n }",
"public function baseTable();",
"public function table() \n {\n return $this->model->table?? '';\n }",
"public function getTableName(){\n\t\treturn $this->tableName;\n\t}",
"protected function tableModel()\n {\n }",
"public function tableName()\n {\n return $this->table;\n }",
"public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}",
"function &returnTableName()\n\t{\n\t\treturn $this->tablename;\n\t}",
"final public static function tableName()\n {\n return (new static)->table;\n }",
"public function get_table_name(){\n return $this->table_name();\n }",
"public function getTable() { return( $this->_table ); }",
"public function getTable();",
"function getTableName() {\n return $this->tableName;\n }",
"public static function getTableName(){\n\t\treturn self::$table_name;\n\t}",
"public function getTableName(){\n\t\treturn $this->_table;\n\t}",
"public function tableName()\r\n {\r\n return get_class($this);\r\n }",
"public function getTableName(){\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}",
"public static function tableName()\r\n {\r\n return '{{dbm002.a0001}}';\r\n }",
"public function getTable() { return $this->table->getTable(); }",
"public function getTableBase();",
"public static function tablename() {\n return self::TABLE;\n }",
"private static function getTableName() {\n return get_called_class();\n }",
"public function getTableName() {\n\t\treturn $this -> _name;\n\t}",
"public static function getTableName()\n\t{\n\t\t//called from users, keyword self:: returns model\n\t\t// return self::$table;\n\t\t//called from users, keyword static:: returns users\n\t\treturn static::$table;\n\t}",
"public static function getTableName()\n {\n return ((new self)->getTable());\n }",
"public static function tableName()\n {\n return '{{dbm002.a0001}}';\n }",
"protected function getTableName(): string {\n return self::TABLE_NAME;\n }",
"function getItemTableName() ;",
"public function getTable()\r\n {\r\n }",
"public static function tableName()\n {\n //return '{{dbm000.a0002}}';\n\t\treturn '{{u0002a}}';\n }",
"public function getTableName()\r\n {\r\n return $this->tableName;\r\n }",
"public abstract function getDbTable();",
"abstract public function getTable();",
"abstract public function getTable();",
"public function table()\n {\n return $this->table;\n }",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"abstract protected function getTable();",
"public function tableName() {\n\t\treturn \"solrexample\";\n\t}",
"private static function getTable(){ // on crée la function getTable static protected\n\t\tif(static::$table===null){ // si $table === null alors \n\t\t\t$class_name = explode('\\\\', get_called_class()); //$class_name = explode (separe une chaine de caractère (exemple : USER\\Table\\mika) \\ USER= array(0) \\Table = array(1) \\mika = array(2)) get_called_class retourne le parent de la class qu'on appelle\n\t\t\tstatic::$table = strtolower(end($class_name)).\"s\";\n\t\t}\t// strtolower transforme tout en minuscule et rajoute un \"s\" à la fin\n\t\treturn static::$table; // retourne $table\n\t\t\n\t}",
"public function return_table()\n {\n $table = \"sub_classes\";\n return $table;\n }",
"public function get_table()\n\t{\n\t\treturn $this->_table;\n\t}",
"public function tableName()\n {\n return 'pembelian';\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"protected static function get_table_name() {\n return null;\n }",
"public function Table()\n {\n return $this->table;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"protected function table(): string\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->_tableName;\n }",
"public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}",
"public static function getTableName() {\n return self::$tableName;\n }",
"private function getTable()\n\t{\n\t\treturn $this->_table;\n\t}",
"public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}",
"function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTable(): Table;",
"public function getTable() {}",
"public function getTable() {}",
"public function getTable() {}",
"protected function getTable()\n {\n return $this->table;\n }",
"protected function TableName() {\n\tthrow new exception('2017-01-05 Is this being called?');\n }",
"public function getTable()\n {\n return $this->parentTable;\n }",
"public static function tableName()\n {\n return 'persona';\n }",
"public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }"
] | [
"0.8302625",
"0.8302625",
"0.8217285",
"0.8197948",
"0.81828916",
"0.80893034",
"0.8055762",
"0.8055762",
"0.8042884",
"0.80181956",
"0.79507",
"0.79507",
"0.79507",
"0.7935169",
"0.7935169",
"0.78988624",
"0.7804104",
"0.77872133",
"0.77872133",
"0.7774345",
"0.7774345",
"0.777234",
"0.777234",
"0.77685595",
"0.7711295",
"0.76800174",
"0.76589245",
"0.76576805",
"0.76173687",
"0.75872254",
"0.7570566",
"0.756818",
"0.75656784",
"0.7507209",
"0.75041205",
"0.7495097",
"0.7485757",
"0.74836546",
"0.7476711",
"0.74706507",
"0.74310446",
"0.74168146",
"0.74069554",
"0.739555",
"0.7383883",
"0.7376087",
"0.7372325",
"0.7358813",
"0.7343993",
"0.73368573",
"0.7331241",
"0.732529",
"0.73135746",
"0.7310363",
"0.730865",
"0.7301197",
"0.72699153",
"0.72630376",
"0.72624886",
"0.72624886",
"0.72564226",
"0.7242488",
"0.7242488",
"0.7242488",
"0.7242488",
"0.7242488",
"0.7242488",
"0.7242488",
"0.72272503",
"0.72180426",
"0.7216189",
"0.7210313",
"0.7200078",
"0.7170817",
"0.7166471",
"0.7166471",
"0.7166471",
"0.71511203",
"0.7149098",
"0.7133434",
"0.7133434",
"0.7133434",
"0.7133434",
"0.71330494",
"0.71287334",
"0.7127601",
"0.7118465",
"0.7110857",
"0.71019775",
"0.7081181",
"0.707898",
"0.707898",
"0.70696557",
"0.70693314",
"0.7067774",
"0.70673484",
"0.7066351",
"0.7063556",
"0.70611566",
"0.70581573",
"0.70521885"
] | 0.0 | -1 |
/ Prepare the display components | protected function renderOutput()
{
// $menu = $this->getMenu();
//dd($menu);
// $navigation = view(config('settings.theme').'.navigation')->with('menu',$menu)->render();
// $this->vars = array_add($this->vars,'navigation',$navigation);
// if($this->contentRightBar) {
// $rightBar = view(config('settings.theme').'.rightBar')->with('content_rightBar',$this->contentRightBar)->render();
// $this->vars = array_add($this->vars,'rightBar',$rightBar);
// }
$this->vars = array_add($this->vars,'keywords',$this->keywords);
$this->vars = array_add($this->vars,'meta_desc',$this->meta_desc);
$this->vars = array_add($this->vars,'title',$this->title);
$header = view(config('settings.theme') . $this->header_temp)->render();
$this->vars = array_add($this->vars, 'header', $header);
$footer = view(config('settings.theme'). $this->footer_temp)->render();
$this->vars = array_add($this->vars, 'footer', $footer);
return view($this->template)->with($this->vars);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function prepareRendering() {}",
"public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }",
"public function __construct() {\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }",
"function init() {\n\t\t\t$this->showHeaders();\n\n\t\t\t// Display the CSS content\n\t\t\t$this->createContent();\n\t\t\t$this->showContent();\n\t\t}",
"public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }",
"public function prepare_controls()\n {\n }",
"function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}",
"public function initLayout();",
"public function renderComponents();",
"protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }",
"public function initDisplay(){\n\t\tif (!$this->getPage()){\n\t\t\tif (\\Settings::DISPLAY_BREADCRUMB) Front::displayBreadCrumb($this->breadCrumb, $this->version);\n\t\t\t$this->mainDisplay();\n\t\t}\n\t}",
"public function init(){\n parent::init();\n $this->registerAssets();\n \n echo CHtml::openTag(\"div\", $this->getContainerOptions());\n echo CHtml::openTag(\"div\", $this->getInnerContainerOptions());\n echo CHtml::openTag(\"div\", $this->getContentOptions());\n }",
"public function startup() {\n parent::startup(); \n self::renderShow(); \n }",
"public function init() {\n $this->_renderLayout = 0;\n }",
"protected function initialize()\n {\n $this->viewData['list_sb'] = $this->list_sb = SkeletalBone::orderBy('name', 'asc')->pluck('name', 'id');\n $this->viewData['list_side'] = $this->list_side = SkeletalElement::$side;\n $this->viewData['list_completeness'] = $this->list_completeness = SkeletalElement::$completeness;\n $this->viewData['list_lab'] = $this->list_lab = Lab::where('type', 'Isotope')->get()->pluck('full_name', 'id');\n $this->viewData['list_status'] = $this->list_status = IsotopeBatch::$status;\n $this->viewData['batchStatus'] = $this->batchStatus = 'Open';\n $this->viewData['initialshow'] = $this->initialshow = false;\n }",
"public function _prepareLayout()\n {\n $this->setTemplate('authorizenetcim/form/cc.phtml');\n }",
"protected function RenderComponents() {\n \t foreach($this->_components as $compontent) {\n \t \tif($compontent instanceof Writable) {\n \t \t\t$compontent->Render();\n \t \t}\n \t }\t\n \t}",
"static function renderComponents()\n {\n extract(self::$data_component);\n\n ob_start();\n foreach(self::$components as $component) {\n $file_view = \"components/{$component['component']}/views/\".SIDE.\"/{$component['view']}.view.php\";\n if (file_exists($file_view))\n {\n require_once $file_view;\n self::$sections[$component['section']].=ob_get_contents();\n ob_clean();\n } else {\n trigger_error(\"Template {$component['view']} not exist\", E_USER_WARNING);\n }\n }\n self::putData(\"sections\",self::$sections,\"L\");\n }",
"public function init()\n {\n \t$this->_helper->viewRenderer->setNoRender(true);\n \t$this->_helper->layout->disableLayout();\n }",
"public function render_screen_layout()\n {\n }",
"function display_init()\n\t{\n\t\tglobal $Messages, $debug, $disp;\n\n\t\t// Request some common features that the parent function (Skin::display_init()) knows how to provide:\n\t\tparent::display_init( array(\n\t\t\t'jquery', // Load jQuery\n\t\t\t'font_awesome', // Load Font Awesome (and use its icons as a priority over the Bootstrap glyphicons)\n\t\t\t'bootstrap', // Load Bootstrap (without 'bootstrap_theme_css')\n\t\t\t'bootstrap_evo_css', // Load the b2evo_base styles for Bootstrap (instead of the old b2evo_base styles)\n\t\t\t'bootstrap_messages', // Initialize $Messages Class to use Bootstrap styles\n\t\t\t'style_css', // Load the style.css file of the current skin\n\t\t\t'colorbox', // Load Colorbox (a lightweight Lightbox alternative + customizations for b2evo)\n\t\t\t'bootstrap_init_tooltips', // Inline JS to init Bootstrap tooltips (E.g. on comment form for allowed file extensions)\n\t\t\t'disp_auto', // Automatically include additional CSS and/or JS required by certain disps (replace with 'disp_off' to disable this)\n\t\t) );\n\n\t\t// Include Masonry Grind for MediaIdx\n\t\tif ( $disp == 'mediaidx' || $disp == 'posts' ) {\n\t\t\trequire_js( 'assets/js/masonry.pkgd.min.js', 'relative' );\n\t\t\trequire_js( 'assets/js/imagesloaded.pkgd.min.js', 'relative');\n\t\t}\n\n\t\tif( $disp == 'posts' ) {\n\t\t\tadd_js_headline(\"\n\t\t\tjQuery( document ).ready( function($) {\n\t\t\t\t$('.main_item_posts').imagesLoaded().done( function( instance ) {\n\t\t\t\t\t$('.main_item_posts').masonry({\n\t\t\t\t\t\t// options\n\t\t\t\t\t\titemSelector: '.item_posts',\n\t\t\t\t\t\tpercentPosition: true,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\t\");\n\t\t}\n\n\t\tif ( $disp == 'mediaidx' ) {\n\t\t\tadd_js_headline(\"\n\t\t\tjQuery( document ).ready( function($) {\n\t\t\t\t$('.evo_image_index').imagesLoaded().done( function( instance ) {\n\t\t\t\t\t$('.evo_image_index').masonry({\n\t\t\t\t\t\t// options\n\t\t\t\t\t\titemSelector: '.grid-item',\n\t\t\t\t\t\tpercentPosition: true,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\t\");\n\t\t}\n\n\t\trequire_js( 'assets/js/script.js', 'relative' );\n\t\t// Skin specific initializations:\n\n\t\t// Limit images by max height:\n\t\t$max_image_height = intval( $this->get_setting( 'max_image_height' ) );\n\t\tif( $max_image_height > 0 )\n\t\t{\n\t\t\tadd_css_headline( '.evo_image_block img { max-height: '.$max_image_height.'px; width: auto; }' );\n\t\t}\n\n\t\t// Skin specific initializations:\n\t\t// Add custom CSS:\n\t\t$custom_css = '';\n\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* General Settings Output\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $color = $this->get_setting( 'color_schemes' ) ) {\n\t\t\t// General\n\t\t\t$custom_css .= '\n\t\t\ta, a:hover, a:active, a:focus,\n\t\t\t.disp_search #main-content .search_result .search_content_wrap .search_title a:hover, .disp_search #main-content .search_result .search_content_wrap .search_title a:active, .disp_search #main-content .search_result .search_content_wrap .search_title a:focus,\n\t\t\t.widget_plugin_evo_Calr .bCalendarTable tfoot a:hover, #main-content .evo_post .small.text-muted a:hover span, #main-content .evo_featured_post .small.text-muted a:hover span\n\t\t\t{ color: '.$color.'; }\n\n\t\t\t/* Header */\n\t\t\t.navbar-collapse .nav.nav-tabs li a::after, .navbar-collapse ul li.active a\n\t\t\t{ background-color: '.$color.'; }\n\n\t\t\t/* Posts */\n\t\t\t#content .evo_post_title h2 a:hover,\n\t\t\t#main-content .evo_post .small.text-muted a:hover, #main-content .evo_featured_post .small.text-muted a:hover,\n\t\t\t.disp_search #main-content .search_result .search_result_score.dimmed\n\t\t\t{ color: '.$color.'; }\n\n\t\t\t#main-content .evo_intro_post, #main-content .featurepost,\n\t\t\t.pagination > .active > span, .pagination > .active > span:hover, .pagination > li > a:hover,\n\t\t\t#main-content .post_tags a:hover, #main-content .post_tags a:active, #main-content .post_tags a:focus,\n\t\t\t#main-content .evo_post .evo_post__full .evo_post_more_link a:hover, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:hover, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:hover, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:hover, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:hover, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:hover, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:hover, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:hover, #main-content .evo_post .evo_post__full .evo_post_more_link a:active, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:active, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:active, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:active, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:active, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:active, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:active, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:active, #main-content .evo_post .evo_post__full .evo_post_more_link a:focus, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:focus, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:focus, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:focus, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:focus, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:focus, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:focus, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:focus,\n\t\t\t.disp_front #main-content .widget_core_coll_featured_intro .jumbotron,\n\t\t\t.disp_front #main-content .widget_core_poll .btn-default.active, .disp_front #main-content .widget_core_poll .btn-default.focus, .disp_front #main-content .widget_core_poll .btn-default:active, .disp_front #main-content .widget_core_poll .btn-default:focus, .disp_front #main-content .widget_core_poll .btn-default:hover, .disp_front #main-content .widget_core_poll .open > .dropdown-toggle.btn-default,\n\t\t\t.disp_search #main-content .search_result .search_result_score.dimmed::after,\n\t\t\t.disp_threads #main-content .SaveButton.btn-primary, .disp_messages #main-content .SaveButton.btn-primary, .disp_contacts #main-content .SaveButton.btn-primary,\n\t\t\t.disp_contacts .form_send_contacts .btn-default:hover, .disp_contacts .form_send_contacts .btn-default:active, .disp_contacts .form_send_contacts .btn-default:focus,\n\t\t\t.filters .btn-info,\n\t\t\t.disp_threads #main-content .results .action_icon.btn-primary, .disp_messages #main-content .results .action_icon.btn-primary, .disp_contacts #main-content .results .action_icon.btn-primary,\n\t\t\t.btn-success, .pagination li.active a:hover, .pagination li.active span:hover, .pagination li.active a:active, .pagination li.active span:active, .pagination li.active a:focus, .pagination li.active span:focus, .pagination li.active a, .pagination li.active span, .pagination li a:hover, .pagination li span:hover, .pagination li a:active, .pagination li span:active, .pagination li a:focus, .pagination li span:focus,\n\t\t\t.disp_profile #main-content .profile_tabs li.active a, .disp_avatar #main-content .profile_tabs li.active a, .disp_pwdchange #main-content .profile_tabs li.active a, .disp_userprefs #main-content .profile_tabs li.active a, .disp_subs #main-content .profile_tabs li.active a,\n\t\t\t.disp_profile #main-content .profile_tabs a:hover, .disp_avatar #main-content .profile_tabs a:hover, .disp_pwdchange #main-content .profile_tabs a:hover, .disp_userprefs #main-content .profile_tabs a:hover, .disp_subs #main-content .profile_tabs a:hover, .disp_profile #main-content .profile_tabs a:active, .disp_avatar #main-content .profile_tabs a:active, .disp_pwdchange #main-content .profile_tabs a:active, .disp_userprefs #main-content .profile_tabs a:active, .disp_subs #main-content .profile_tabs a:active, .disp_profile #main-content .profile_tabs a:focus, .disp_avatar #main-content .profile_tabs a:focus, .disp_pwdchange #main-content .profile_tabs a:focus, .disp_userprefs #main-content .profile_tabs a:focus, .disp_subs #main-content .profile_tabs a:focus,\n\t\t\t.disp_profile #main-content .evo_form .panel-heading, .disp_avatar #main-content .evo_form .panel-heading, .disp_pwdchange #main-content .evo_form .panel-heading, .disp_userprefs #main-content .evo_form .panel-heading, .disp_subs #main-content .evo_form .panel-heading,\n\t\t\t.evo_panel__login .btn.btn-success, .evo_panel__lostpass .btn.btn-success, .evo_panel__register .btn.btn-success, .evo_panel__activation .btn.btn-success,\n\t\t\t.disp_edit #item_checkchanges .panel .panel-heading\n\t\t\t{ background-color: '.$color.'; }\n\n\t\t\t.disp_front #main-content .widget_core_poll .btn-default.active, .disp_front #main-content .widget_core_poll .btn-default.focus, .disp_front #main-content .widget_core_poll .btn-default:active, .disp_front #main-content .widget_core_poll .btn-default:focus, .disp_front #main-content .widget_core_poll .btn-default:hover, .disp_front #main-content .widget_core_poll .open > .dropdown-toggle.btn-default,\n\t\t\t.disp_search #main-content .search_result .search_result_score.dimmed,\n\t\t\t.disp_threads #main-content .SaveButton.btn-primary, .disp_messages #main-content .SaveButton.btn-primary, .disp_contacts #main-content .SaveButton.btn-primary,\n\t\t\t.disp_contacts .form_send_contacts .btn-default:hover, .disp_contacts .form_send_contacts .btn-default:active, .disp_contacts .form_send_contacts .btn-default:focus,\n\t\t\t.filters .btn-info,\n\t\t\t.disp_threads #main-content .results .action_icon.btn-primary, .disp_messages #main-content .results .action_icon.btn-primary, .disp_contacts #main-content .results .action_icon.btn-primary,\n\t\t\t.disp_threads #main-content .evo_form__thread input:focus, .disp_messages #main-content .evo_form__thread input:focus, .disp_contacts #main-content .evo_form__thread input:focus, .disp_threads #main-content .evo_form__thread textarea:focus, .disp_messages #main-content .evo_form__thread textarea:focus, .disp_contacts #main-content .evo_form__thread textarea:focus,\n\t\t\t.btn-success, .pagination li.active a:hover, .pagination li.active span:hover, .pagination li.active a:active, .pagination li.active span:active, .pagination li.active a:focus, .pagination li.active span:focus, .disp_msgform #main-content .form_text_input:hover, .disp_msgform #main-content .form_textarea_input:hover, .disp_msgform #main-content .form_text_input:active, .disp_msgform #main-content .form_textarea_input:active, .disp_msgform #main-content .form_text_input:focus, .disp_msgform #main-content .form_textarea_input:focus,\n\n\t\t\t.disp_profile #main-content .evo_form .panel-body .form-control:hover, .disp_avatar #main-content .evo_form .panel-body .form-control:hover, .disp_pwdchange #main-content .evo_form .panel-body .form-control:hover, .disp_userprefs #main-content .evo_form .panel-body .form-control:hover, .disp_subs #main-content .evo_form .panel-body .form-control:hover, .disp_profile #main-content .evo_form .panel-body .form-control:active, .disp_avatar #main-content .evo_form .panel-body .form-control:active, .disp_pwdchange #main-content .evo_form .panel-body .form-control:active, .disp_userprefs #main-content .evo_form .panel-body .form-control:active, .disp_subs #main-content .evo_form .panel-body .form-control:active, .disp_profile #main-content .evo_form .panel-body .form-control:focus, .disp_avatar #main-content .evo_form .panel-body .form-control:focus, .disp_pwdchange #main-content .evo_form .panel-body .form-control:focus, .disp_userprefs #main-content .evo_form .panel-body .form-control:focus, .disp_subs #main-content .evo_form .panel-body .form-control:focus,\n\n\t\t\t#login_form input:focus:invalid:focus, #login_form select:focus:invalid:focus, #login_form textarea:focus:invalid:focus, .evo_panel__login .btn.btn-success, .evo_panel__lostpass .btn.btn-success, .evo_panel__register .btn.btn-success, .evo_panel__activation .btn.btn-success, .form-control:focus,\n\n\t\t\t.disp_edit #item_checkchanges .panel\n\t\t\t{ border-color: '.$color.'; }\n\n\t\t\t.disp_posts #content .evo_featured_post\n\t\t\t{ border-left-color: '.$color.'; }\n\n\t\t\t/* Sidebar - Widget - Single */\n\t\t\t.evo_widget a:hover, .evo_widget a:active, .evo_widget a:focus,\n\t\t\t#main-footer .main_widget a:hover, #main-footer .main_widget a:active, #main-footer .main_widget a:focus,\n\t\t\t.evo_comment .evo_comment_info .delete_link:hover, .evo_comment__preview .evo_comment_info .delete_link:hover, .evo_comment .evo_comment_info .edit_link:hover, .evo_comment__preview .evo_comment_info .edit_link:hover, .evo_comment .evo_comment_info .delete_link:active, .evo_comment__preview .evo_comment_info .delete_link:active, .evo_comment .evo_comment_info .edit_link:active, .evo_comment__preview .evo_comment_info .edit_link:active, .evo_comment .evo_comment_info .delete_link:focus, .evo_comment__preview .evo_comment_info .delete_link:focus, .evo_comment .evo_comment_info .edit_link:focus, .evo_comment__preview .evo_comment_info .edit_link:focus,\n\t\t\t.disp_comments #main-content .evo_comment .evo_comment_title.first a,\n\t\t\t.evo_comment .evo_comment_title a:hover, .evo_comment__preview .evo_comment_title a:hover\n\t\t\t{ color: '.$color.'; }\n\n\t\t\t.widget_core_coll_search_form .search .search_submit,\n\t\t\t.tag_cloud a:hover, .tag_cloud a:active, .tag_cloud a:focus,\n\t\t\t.widget_plugin_evo_Calr .bCalendarTable #bCalendarToday,\n\t\t\t#main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:hover, #main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:active, #main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:focus,\n\t\t\t.bt-top:hover, .bt-top:focus, .bt-top:active,\n\t\t\t.disp_single #feedbacks .evo_comment__meta_info a:hover, .disp_page #feedbacks .evo_comment__meta_info a:hover,\n\t\t\t#comment_form .evo_form .submit,\n\t\t\t#comment_form .evo_form .preview:hover, #comment_form .evo_form .preview:focus, #comment_form .evo_form .preview:active,\n\t\t\t.widget_core_user_login .submit:hover, .widget_core_user_register .submit:hover,\n\t\t\t.disp_single #main-content .pager .previous a::before, .disp_page #main-content .pager .previous a::before, .disp_single #main-content .pager .next a::before, .disp_page #main-content .pager .next a::before,\n\t\t\t.evo_post_comment_notification .btn:hover, .evo_post_comment_notification .btn:active, .evo_post_comment_notification .btn:focus,\n\t\t\t.disp_threads #main-content .submit, .disp_messages #main-content .submit, .disp_contacts #main-content .submit, .disp_msgform #main-content .submit,\n\t\t\t.disp_user #main-content .pager a:hover, .disp_user #main-content .pager a:focus, .disp_user #main-content .pager a:active\n\t\t\t{ background-color: '.$color.'; }\n\n\t\t\t.widget_core_coll_search_form .search .search_field,\n\t\t\t.widget_core_coll_search_form .search .search_submit,\n\t\t\t.bt-top:hover, .bt-top:focus, .bt-top:active,\n\t\t\t.disp_single #feedbacks .evo_comment__meta_info a:hover, .disp_page #feedbacks .evo_comment__meta_info a:hover,\n\t\t\t#comment_form .evo_form .form_text_input:focus, #comment_form .evo_form .form_textarea_input:focus,\n\t\t\t#comment_form .evo_form .submit,\n\t\t\t#comment_form .evo_form .preview:hover, #comment_form .evo_form .preview:focus, #comment_form .evo_form .preview:active,\n\t\t\t.widget_core_user_login .submit:hover, .widget_core_user_register .submit:hover,\n\t\t\t.disp_single #main-content .pager .previous a:hover, .disp_page #main-content .pager .previous a:hover, .disp_single #main-content .pager .next a:hover, .disp_page #main-content .pager .next a:hover,\n\t\t\t.evo_post_comment_notification .btn:hover, .evo_post_comment_notification .btn:active, .evo_post_comment_notification .btn:focus,\n\t\t\t.disp_threads #main-content .submit, .disp_messages #main-content .submit, .disp_contacts #main-content .submit, .disp_msgform #main-content .submit\n\t\t\t{ border-color: '.$color.'; }\n\t\t\t';\n\t\t}\n\n\n\t\t// Site Background\n\t\tif ( $this->get_setting( 'background_type' ) == 'color' ) {\n\t\t\t$color = $this->get_setting( 'site_background_color' );\n\t\t\t$custom_css .= '#skin_wrapper {background-color: '.$color.';}';\n\t\t}\n\n\t\t$bg_image = $this->get_setting( 'bg_image' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'images' && $bg_image ) {\n\t\t\tif($bg_image == \"none\") {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background: transparent; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-image: url('\".$bg_image.\"');}\";\n\t\t\t}\n\t\t}\n\n\t\t// User custom bg images setting\n\t\t$bg_image_custom = $this->get_setting( 'bg_image_custom' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom ) {\n\t\t\tif($bg_image_custom == \"none\")\n\t\t\t{\n\t\t\t\t$custom_css .= \"#skin_wrapper { background: transparent; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-image: url('\".$bg_image_custom.\"');}\";\n\t\t\t}\n\t\t}\n\n\t\t$bg_image_custom_attach = $this->get_setting( 'bg_image_custom_attach' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom_attach ) {\n\t\t\tif ( $bg_image_custom_attach == 'initial' ) {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-attachment: initial; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-attachment: fixed; }\";\n\t\t\t}\n\t\t}\n\n\t\t$bg_image_custom_size = $this->get_setting( 'bg_image_custom_size' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom_size ) {\n\t\t\tif ( $bg_image_custom_size == 'auto' ) {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-size: auto; }\";\n\t\t\t} else if ( $bg_image_custom_size == 'contain' ){\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-size: contain; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-size: cover; }\";\n\t\t\t}\n\t\t}\n\n\t\tif ( $bg = $this->get_setting( 'bg_wrap_content' ) ) {\n\t\t\t$custom_css .= '#main-content .evo_post, #main-content .evo_featured_post, .disp_posts #main-content .evo_featured_post, div.error_404, .msg_nothing, #main-content .title_head_post, #main-sidebar .evo_widget, #content .evo_widget, .disp_comments #main-content .evo_comment, .disp_user #main-content .profile_content, .disp_threads #main-content, .disp_messages #main-content, .disp_contacts #main-content, .disp_msgform #main-content, .disp_threads #main-content .title_head_post, .disp_messages #main-content .title_head_post, .disp_contacts #main-content .title_head_post, .disp_msgform #main-content .title_head_post, .disp_help #main-content, .disp_users .results .filters, .disp_users .results .table_scroll, .disp_access_requires_login #main-content, .disp_lostpassword #main-content, .disp_login #main-content, .disp_register #main-content, .disp_search #main-content, .disp_search #main-content .title_head_post, .disp_search #main-content .search_result, .disp_404 #main-content, .disp_front #main-content .evo_widget, .disp_sitemap #main-content h3, .disp_messages #main-content, .disp_messages #main-content .title_head_post, .disp_profile #main-content .evo_form .panel-body, .disp_avatar #main-content .evo_form .panel-body, .disp_pwdchange #main-content .evo_form .panel-body, .disp_userprefs #main-content .evo_form .panel-body, .disp_subs #main-content .evo_form .panel-body, .disp_mediaidx #main-content .evo_image_index .note\n\t\t\t{ background-color: '.$bg.'; }';\n\t\t\t$custom_css .= '.disp_mediaidx #main-content .evo_image_index .item{ border-color: '.$bg.' }';\n\t\t}\n\n\t\t/**\n\t\t * ============================================================================\n\t\t * Page Setting\n\t\t * ============================================================================\n\t\t */\n\t\tif( $font = $this->get_setting('page_font_size') ) {\n\t\t\t$custom_css .= '#skin_wrapper { font-size: '.$font.'px }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'page_info_color' ) ) {\n\t\t\t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted, .disp_posts #main-content .evo_featured_post .small.text-muted, .disp_page #main-content .evo_post .small.text-muted, .disp_page #main-content .evo_featured_post .small.text-muted, .disp_single #main-content .evo_post .small.text-muted, .disp_single #main-content .evo_featured_post .small.text-muted { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color =$this->get_setting( 'page_info_link' ) ) {\n\t\t\t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted span, .disp_posts #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_posts #main-content .evo_featured_post .small.text-muted a, .disp_page #main-content .evo_post .small.text-muted span, .disp_page #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_page #main-content .evo_featured_post .small.text-muted a, .disp_single #main-content .evo_post .small.text-muted span, .disp_single #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_single #main-content .evo_featured_post .small.text-muted a { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'page_content_color' ) ) {\n\t\t\t$custom_css .= '#skin_wrapper, .disp_single #feedbacks, .disp_page #feedbacks, #content .evo_widget, .disp_posts #main-content .evo_post__full_text, .disp_posts #main-content .evo_post__excerpt_text, .disp_page #main-content .evo_post__full_text, .disp_page #main-content .evo_post__excerpt_text, .disp_single #main-content .evo_post__full_text, .disp_single #main-content .evo_post__excerpt_text, .disp_comments #main-content .evo_comment .evo_comment_text, .disp_search #main-content .msg_nothing, .disp_search #main-content .search_result .search_content_wrap .result_content\n\t\t\t{ color: '.$color.' !important}';\n\t\t}\n\n\t\tif( $color = $this->get_setting( 'page_heading_color' ) ) {\n\t\t\t$custom_css .= 'h1, h2, h3, h4, h5, h6,\n\t\t\t.disp_front #main-content .evo_widget .title_widget, .disp_mediaidx #main-content .evo_image_index .note, .disp_404 .error_404 .fa-warning, div.error_404 .fa-warning, .disp_search #main-content .search_result .search_content_wrap .search_title, .disp_search #main-content .search_result .search_content_wrap .search_title a\n\t\t\t{ color: '.$color.' }';\n\t\t\t$custom_css .= '.disp_front #main-content .evo_widget .title_widget::after { background-color: '.$color.' }';\n\t\t}\n\n\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Header Settings Output\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $width = $this->get_setting( 'head_center_mode' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t@media only screen and ( max-width: '.$width.'px )\n\t\t\tand ( min-width: 768px ) {\n\t\t\t\t#main-header .col-md-4,\n\t\t\t\t#main-header .col-md-8 {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t}\n\n\t\t\t\t#main-header {\n\t\t\t\t\tpadding-bottom: 2rem;\n\t\t\t\t}\n\n\t\t\t\t#main-header .col-md-4{\n\t\t\t\t\tmargin-bottom: 15px;\n\t\t\t\t}\n\n\t\t\t\t.navbar-collapse .nav.nav-tabs {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\tfloat: none;\n\t\t\t\t}\n\t\t\t}\n\t\t\t';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'header_bg_color' ) ) {\n\t\t\t$custom_css .= 'body #main-header { background-color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'nav_color_link' ) ) {\n\t\t\t$custom_css .= '.navbar-collapse .nav.nav-tabs li a{ color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'nav_color_hovlink' ) ) {\n\t\t\t$custom_css .= '.navbar-collapse .nav.nav-tabs li a:hover { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'head_tagline_bg_color' ) ) {\n\t\t\t$custom_css .= 'body #head_tagline { background-color: '.$color.\" }\\n\";\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Posts\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $color = $this->get_setting( 'posts_title_color' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t.disp_posts #main-content .evo_post_title h1 a, .disp_posts #main-content .evo_post_title h2 a, .disp_posts #main-content .evo_post_title h3 a,\n\t\t\t.disp_posts #main-content .evo_post .evo_post__full h1, .disp_posts #main-content .evo_featured_post .evo_post__full h1, .disp_posts #main-content .evo_post .evo_post__excerpt h1, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h1, .disp_posts #main-content .evo_post .evo_post__full h2, .disp_posts #main-content .evo_featured_post .evo_post__full h2, .disp_posts #main-content .evo_post .evo_post__excerpt h2, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h2, .disp_posts #main-content .evo_post .evo_post__full h3, .disp_posts #main-content .evo_featured_post .evo_post__full h3, .disp_posts #main-content .evo_post .evo_post__excerpt h3, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h3, .disp_posts #main-content .evo_post .evo_post__full h4, .disp_posts #main-content .evo_featured_post .evo_post__full h4, .disp_posts #main-content .evo_post .evo_post__excerpt h4, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h4, .disp_posts #main-content .evo_post .evo_post__full h5, .disp_posts #main-content .evo_featured_post .evo_post__full h5, .disp_posts #main-content .evo_post .evo_post__excerpt h5, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h5, .disp_posts #main-content .evo_post .evo_post__full h6, .disp_posts #main-content .evo_featured_post .evo_post__full h6, .disp_posts #main-content .evo_post .evo_post__excerpt h6, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h6,\n\t\t\t.disp_posts #main-content .post_tags h3\n\t\t\t{ color: '.$color.' }\n\t\t\t';\n\t\t}\n\n\t\t// if ( $color = $this->get_setting( 'posts_info_color' ) ) {\n\t\t// \t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted, .disp_posts #main-content .evo_featured_post .small.text-muted { color: '.$color.' }';\n\t\t// }\n\t\t//\n\t\t// if ( $color =$this->get_setting( 'posts_info_link' ) ) {\n\t\t// \t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted span, .disp_posts #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_posts #main-content .evo_featured_post .small.text-muted a { color: '.$color.' }';\n\t\t// }\n\t\t//\n\t\t// if ( $color = $this->get_setting( 'posts_content_color' ) ) {\n\t\t// \t$custom_css .= '.disp_posts #main-content .evo_post__full_text, .disp_posts #main-content .evo_post__excerpt_text { color: '.$color.' }';\n\t\t// }\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Tags\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $color = $this->get_setting( 'tags_color' ) ) {\n\t\t\t$custom_css .= '#main-content .post_tags a, .tag_cloud a, #main-content .post_tags a::before { color: '.$color.' }';\n\t\t}\n\t\tif ( $bg = $this->get_setting( 'tags_bg' ) ) {\n\t\t\t$custom_css .= '#main-content .post_tags a, .tag_cloud a { background-color: '.$bg.' }';\n\t\t}\n\t\tif ( $this->get_setting( 'tags_icon' ) == 0 ) {\n\t\t\t$custom_css .= '#main-content .post_tags a::before, .tag_cloud a::before { content: \\'\\'; display: none }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Sidebar Widget Options\n\t\t* ============================================================================\n\t\t*/\n\t\t// if ( $bg = $this->get_setting( 'side_bg_wrap' ) ) {\n\t\t// \t$custom_css .= '#main-sidebar .evo_widget { background-color: '. $bg .' }';\n\t\t// }\n\t\tif ( $color = $this->get_setting( 'side_widget_title' ) ) {\n\t\t\t$custom_css .= '#main-sidebar .evo_widget .panel-title { color: '.$color.' }';\n\t\t\t$custom_css .= '#main-sidebar .evo_widget .panel-title::after { background-color: '.$color.' }';\n\t\t}\n\t\tif ( $color = $this->get_setting( 'side_widget_content' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t#main-sidebar .evo_widget,\n\t\t\t#main-sidebar .widget_core_user_login .user_group,\n\t\t\t#main-sidebar .widget_core_user_login .user_level\n\t\t\t{ color: '.$color.' }';\n\t\t}\n\t\tif ( $border = $this->get_setting( 'side_border' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t#content .evo_widget ul li,\n\t\t\t#content .evo_widget ul > ul > li:last-child,\n\t\t\t.widget_core_linkblog ul ul, .widget_core_content_hierarchy ul ul,\n\t\t\t.widget_core_coll_xml_feeds .notes\n\t\t\t{ border-color: '.$border.' }';\n\t\t}\n\t\tif( $color = $this->get_setting( 'side_widget_link' ) ) {\n\t\t\t$custom_css .= '#main-sidebar .evo_widget a { color: '.$color.' }';\n\t\t}\n\n\t\t/**\n\t\t * ============================================================================\n\t\t * UIL Widget Settings\n\t\t * ============================================================================\n\t\t */\n\t\tif ( $this->get_setting( 'uil_widget_readmore' ) == 0 ) {\n\t\t\t$custom_css .= 'div.widget_core_coll_item_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_featured_posts.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_post_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_page_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_related_post_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_item_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_featured_posts.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_post_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_page_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_related_post_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a { display: none }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Footer Settings Output\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $bg_color = $this->get_setting( 'footer_bg_color' ) ) {\n\t\t\t$custom_css .= 'body #main-footer { background-color: '.$bg_color.\" }\\n\";\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_widget_title' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget .title_widget,\n\t\t\t#main-footer .main_widget .widget_core_org_members .user_link h3 { color: '.$color.' }';\n\t\t\t$custom_css .= '#main-footer .main_widget .title_widget::before { background-color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_sm_color' ) ) {\n\t\t\t$custom_css .= '#main-footer .footer_social_media .ufld_icon_links a span, #main-footer .footer_social_media .ufld_icon_links a .fa { color: '.$color.' }';\n\t\t\t$custom_css .= '#main-footer .footer_social_media .ufld_icon_links a:hover span, #main-footer .footer_social_media .ufld_icon_links a:hover .fa { color: #FFFFFF }';\n\t\t}\n\n\t\tif ( $bg_color = $this->get_setting( 'footer_sm_bgcolor' ) ) {\n\t\t\t$custom_css .= '#main-footer .footer_social_media{ background-color: '.$bg_color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_widget_content' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget { color: '.$color.' }';\n\t\t}\n\n\t\tif( $link = $this->get_setting( 'footer_widget_link' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget a { color: '.$link.' }';\n\t\t}\n\n\t\tif ( $border_color = $this->get_setting( 'footer_border_color' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget ul li, #main-footer .main_widget ul > ul > li:last-child { border-color: '.$border_color.'; }';\n\t\t\t$custom_css .= '#main-footer .footer_social_media, #main-footer .copyright,\n\t\t\t#main-footer .main_widget .widget_core_coll_xml_feeds .notes,\n\t\t\t#main-footer #content .evo_widget ul li, #main-footer #content .evo_widget ul > ul > li:last-child, #main-footer .widget_core_linkblog ul ul, #main-footer .widget_core_content_hierarchy ul ul, #main-footer .widget_core_coll_xml_feeds .notes\n\t\t\t{ border-color: '.$border_color.'; }';\n\t\t}\n\n\t\tif ( $bg_color = $this->get_setting( 'footer_tags_bg' ) ) {\n\t\t\t$custom_css .= '#main-footer .evo_widget .tag_cloud a { background-color: '.$bg_color.'; }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_copyright_content' ) ) {\n\t\t\t$custom_css .= '#main-footer .copyright .copyright_text { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $link = $this->get_setting( 'footer_copyright_link' ) ) {\n\t\t\t$custom_css .= '#main-footer .copyright .copyright_text a { color: '.$link.' }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Mediaidx Custom Style\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $padding = $this->get_setting( 'padding_column' ) ) {\n\t\t\t$custom_css .= '.disp_mediaidx #main-content .evo_image_index .grid-item { padding: '.$padding.'px; }';\n\t\t\t$custom_css .= '.disp_mediaidx #main-content .evo_image_index { margin-left: -'.$padding.'px; margin-right: -'.$padding.'px; }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Output CSS\n\t\t* ============================================================================\n\t\t*/\n\t\tif( ! empty( $custom_css ) )\n\t\t{ // Function for custom_css:\n\t\t\t$custom_css = '<style type=\"text/css\">\n\t\t\t<!--\n\t\t\t'.$custom_css.'\n\t\t\t-->\n\t\t\t</style>';\n\t\t\tadd_headline( $custom_css );\n\t\t}\n\n\t}",
"protected function _prepareToRender()\n {\n $this->addColumn('gender', [\n 'label' => __('Gender/Age Group'),\n 'renderer' => $this->getGendersRenderer(),\n ]);\n $this->addColumn('categories', [\n 'label' => __('Categories'),\n 'renderer' => $this->getCategoriesRenderer(),\n 'extra_params' => 'multiple=\"multiple\"'\n ]);\n $this->_addAfter = false;\n $this->_addButtonLabel = __('Add');\n }",
"public function init() {\n\t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNeverRender();\n\t}",
"public function init(){\n parent::init();\n $this->registerAssets();\n $this->attachBehavior(\"linkCont\", new LinkContainerBehavior());\n \n echo CHtml::openTag( $this->containerTag, $this->getContainerOptions());\n echo CHtml::openTag($this->listTag, $this->getListOptions());\n \n // Remove invisible items\n $items = $this->removeInvisibleItems($this->items);\n \n // Render the items\n $count = count($items);\n foreach ($items as $index=>$item ) {\n echo CHtml::openTag($this->itemTag, $this->getItemOptions($item, $index, $count));\n $item['labelMarkup'] = $this->getLabel($item);\n $item['anchorOptions'] = $this->getAnchorOptions($item, $index, $count);\n $this->renderItem($item);\n echo CHtml::closeTag($this->itemTag);\n }\n }",
"public function init()\n {\n // $this->_helper->layout->setLayout('userarea');\n }",
"function init()\n {\n\n $elements = array(\n 'page_id' => array('hidden')\n , 'name' => array('text', array('label' => 'Name', 'options' => array('StringLength' => array(false, array(1, 50)),), 'filters' => array('StringTrim'), 'required' => true))\n , 'title' => array('text', array('label' => 'Title', 'options' => array('StringLength' => array(false, array(4, 255)),),'filters' => array('StringTrim'), 'required' => true))\n , 'meta' => array('text', array('label' => 'meta', 'options' => array('StringLength' => array(false, array(4, 255))), 'filters' => array('StringTrim'),))\n , 'description' => array('textarea',array('label' => 'description', 'attribs' => array('rows' => 2), 'filters' => array('StringTrim'), 'required' => true))\n , 'body' => array('textarea',array('label' => 'body', 'attribs' => array('rows' => 7), 'filters' => array('StringTrim'), 'required' => true))\n );\n $this->addElements($elements);\n\n // --- Groups ----------------------------------------------\n $this->addDisplayGroup(array('name','title', 'meta'), 'display-head', array('legend'=>'display-head'));\n $this->addDisplayGroup(array('description', 'body'), 'display-body', array('legend'=>'display-body'));\n parent::init();\n }",
"function init()\n\t{\n\t\t// Ghetto fix for formText problem\n\t\t$this->view->addHelperPath(ROOT_DIR . '/library/Zarrar/View/HelperFix', 'Zarrar_View_HelperFix');\n\t\t\n\t\t// Disable header file\n\t\t$this->view->headerFile = '_empty.phtml';\n\t\t\n\t\t// Add stylesheet for table\n\t\t$this->view\n\t\t\t->headLink()\n\t\t\t->appendStylesheet(\"{$this->view->dir_styles}/oranges-in-the-sky.css\");\n\t\t\t\n\t\t// Instantiate table for later usage\n\t\t$this->_table = new Study();\n\t}",
"protected function setDisplayData() {\n parent::setDisplayData();\n $this->template->setDisplayData( \"person_header\", $this->getTitle() );\n if ( !($form_link = $this->form_link)) {\n if ($this->module == 'I2CE') {\n $form_link = $this->page;\n } else {\n $form_link = $this->module .'/' . $this->page;\n }\n }\n $this->template->setDisplayData( \"person_form\", $form_link);\n }",
"protected function _constructMainLayout()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'create main layout for display',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_get) {\n $typ = $this->_get->pageType();\n } else {\n $typ = NULL;\n }\n\n switch ($typ) {\n case'css': case'js':\n $this->DISPLAY['core'] = '{;css_js;}';\n break;\n\n default:\n $this->layout($this->_defaultOptions['template']);\n break;\n }\n }",
"public function init()\n {\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout(); \n }",
"protected function init()\n {\n $this->setTitle('core_layout.edit_layout');\n $this->addElement([\n 'plugin' => 'hidden',\n 'name' => 'base_script',\n 'value' => 'view'\n ]);\n $this->addElement([\n 'plugin' => 'hidden',\n 'name' => 'item_script',\n 'value' => 'view',\n ]);\n }",
"public function init() {\n $this->_helper->layout()->disableLayout(); \n $this->_helper->viewRenderer->setNoRender(true);\n }",
"public function prepareShow()\n {\n $this->location();\n $this->type;\n $this->amenityIds();\n $this->utilityIds();\n $this->reviewCount();\n $this->user->location();\n $this->user->profilePicture();\n $this->user->reviewCount();\n $this->reviews = $this->reviews()->select('reviews.*')->withReviewer()->get();\n $this->coordinates;\n $this->imageRoutes();\n $this->image_ids = $this->images->pluck('id');\n }",
"public function init()\n {\n parent::init();\n\n // Retrieving a field from the controller container and layout into this view.\n $this->add($this->fieldCtrl->getField('label'));\n }",
"abstract function buildShowLayout(): void;",
"function onReady() {\n\t\t$this->text = $this->config->text;\n\t\tif (empty($this->text))\n\t\t\t$this->text = \"initial settings| set this widget | /admin set headsup\";\n\t\t\n\t\t$this->url = $this->config->url;\n\t\tif (empty($this->url))\n\t\t\t$this->url = \"\";\n\t\t\n\t\t$this->width = $this->config->width;\n\t\tif (empty($this->width))\n\t\t\t$this->width = 50;\n\t\t\n\t\t$this->pos = $this->config->pos;\n\t\tif (empty($this->pos))\n\t\t\t$this->pos = \"80,-85\";\n\t\t\n\t\tforeach ($this->storage->players as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t\tforeach ($this->storage->spectators as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t}",
"public function init()\n {\n $this->_helper->viewRenderer->setNoRender();\n $this->_helper->getHelper('layout')->disableLayout();\n $this->getHelper('viewRenderer')->setNoRender(true);\n }",
"function __construct()\n\t\t{\t\n\t\t\t$this->render();\n\t\t}",
"function __construct()\n\t\t{\t\n\t\t\t$this->render();\n\t\t}",
"function __construct()\n\t\t{\t\n\t\t\t$this->render();\n\t\t}",
"public function init()\n {\n \t$this->_helper->layout()->setLayout('admin');\n }",
"public function initContent() {\n $this->initTabModuleList();\n $this->initToolbar();\n $this->initPageHeaderToolbar();\n\n if ($this->display == 'edit' || Tools::getValue('display') == 'formPlayer') {\n if (!$this->loadObject(true)) {\n return;\n }\n $this->content = $this->renderForm();\n $this->content.= $this->generateListPlayerLevels();\n $this->content.= $this->generateListPlayerHistory();\n $deletePlayers = false;\n }\n elseif (Tools::isSubmit('addCustomAction')) {\n $this->content = $this->generateFormCustomAction();\n $deletePlayers = false;\n }\n else {\n $this->content = $this->renderList();\n $deletePlayers = true;\n }\n\n // This are the real smarty variables\n $this->context->smarty->assign(\n array(\n 'content' => $this->content,\n 'tab' => 'Players',\n 'loyalty_name' => Configuration::get('krona_loyalty_name', $this->context->language->id, $this->id_shop_group, $this->id_shop),\n 'import' => Configuration::get('krona_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'dont' => Configuration::get('krona_dont_import_customer', null, $this->id_shop_group, $this->id_shop),\n 'deletePlayers' => $deletePlayers,\n 'show_page_header_toolbar' => $this->show_page_header_toolbar,\n 'page_header_toolbar_title' => $this->page_header_toolbar_title,\n 'page_header_toolbar_btn' => $this->page_header_toolbar_btn,\n )\n );\n\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'genzo_krona/views/templates/admin/main.tpl');\n\n $this->context->smarty->assign(array(\n 'content' => $tpl, // This seems to be anything inbuilt. It's just chance that we both use content as an assign variable\n ));\n\n }",
"public function start_display ()\n {\n $this->display_doc_type ();\n\n $opts = $this->page->template_options;\n if ($opts->css_class)\n {\n?>\n<html class=\"<?php echo $opts->css_class; ?>\" lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n else\n {\n?>\n<html lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n?>\n <head>\n <?php\n $this->display_head ();\n ?>\n </head>\n <body>\n<?php\n\n $this->_start_body ();\n }",
"public function init()\r\n {\r\n parent::init();\r\n $this->visible = true;\r\n $this->descriptionashint = true;\r\n $this->active = false;\r\n }",
"protected function _initLayout() {\n\t\t$share = new Annuaire_Share();\n\t\t$newShared = $share->getMyShare(false);\n\t\t$me = new Annuaire_User(Annuaire_User::getCurrentUserId());\n\n\t\t$this->addLayoutVar ('locale', Annuaire_User::getLocale());\n\t\t$this->addLayoutVar ('title', t_('ContactBook'));\n\t\t$this->addLayoutVar ('consult', t_('Consult'));\n\t\t$this->addLayoutVar ('add', t_('Add'));\n\t\t$this->addLayoutVar ('deletecompanie', t_('Delete a companie'));\n\t\t$this->addLayoutVar ('useShare', Zend_Registry::getInstance()->config->use_share);\n\t\tif (Zend_Registry::getInstance()->config->use_share) {\n\t\t\t$this->addLayoutVar ('sharemanager', t_('Share manager'));\n\t\t\t$this->addLayoutVar ('newShared', (count($newShared)) ? sprintf (t_('%s new share(s)'), count($newShared)) : 0);\n\t\t\t$this->addLayoutVar ('newSharedTitle', t_(\"New Shares\"));\n\t\t\t$this->addLayoutVar ('shares', $newShared);\n\t\t}\n\t\t\n\t\t$this->addLayoutVar ('connected', (Annuaire_User::getCurrentUserId() ? 1 : 0));\n\t\t$this->addLayoutVar ('loginOrRegister', t_('Login'));\n\t\t$this->addLayoutVar ('disconnect', t_('Disconnect'));\n\t\t$this->addLayoutVar ('mylogin', $me->getLogin());\n\t\t$this->addLayoutVar ('mymail', $me->getMail());\n\t\t\n\t\t$this->addJSText('errorSharing', t_(\"Error while sharing\"));\n\t\t$this->addJSText('confirmDeleteShare', t_(\"Are you sure you want to DELETE this share ?\"));\n\t\t\n\t\t$this->addLayoutVar ( \"jsver\", filemtime ( ROOT_DIR . 'www/javascript/engine.js' ) );\n\t\t$this->addLayoutVar ( \"cssver\", filemtime ( ROOT_DIR . 'www/css/engine.css' ) );\n\t}",
"private function establish_display_settings() {\n\t\t$this->background = \"background-color: $this->color_primary\";\n\t\t$this->border = \"border: 1px solid $this->color_accent\";\n\t\t$this->href = $this->generate_follow_link();\n\n\t}",
"public function renderLayout();",
"private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}",
"private function prepareLayout($params)\n {\n if (isset($params['layout'])) {\n $this->layout = $params['layout'];\n }\n\n $this->renderer->setLayout($this->layout);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function getRender(){\n /*\n * adiciona os listeners de comportamento padrão do componente\n */\n \n //ação que executa ao clicar sobre algum evento, abre a tela com as informações carregadas\n $sFuncao = \"eventWindow.show(record, el);\";\n $this->addListener(self::EVENTO_CLICK,$sFuncao,\"view, record, el\");\n \n //ação que ocorre ao clicar sobre os grids (dia, semana, mês)\n $sFuncao = \"eventWindow.show({\"\n .\"StartDate: date,\"\n .\"IsAllDay: allDay\"\n .\"}, el);\";\n $this->addListener(self::EVENTO_DAY_CLICK,$sFuncao,\"view, date, allDay, el\");\n \n //ação que ocorre ao redimensionar (aumentar ou reduzir) o tempo de um evento\n $sFuncaoUpdate = \"var calendarEventStore = Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].eventStore;\"\n .\"calendarEventStore.sync({\"\n .\"callback: function(batch, operation){\"\n .\"var result = batch.operations[0].request.scope.reader.jsonData['success'];\"\n .\"if(!result){\"\n .\"calendarEventStore.rejectChanges();\"\n .\"}\"\n .\"}\"\n .\"});\";\n $this->addListener(self::EVENTO_RESIZE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao mover um evento na tela\n $this->addListener(self::EVENTO_MOVE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao iniciar a movimentação dos elementos na tela\n $sFuncao = \"if(eventWindow && eventWindow.isVisible()){\"\n .\"eventWindow.hide();\"\n .\"}\";\n $this->addListener(self::EVENTO_DRAG,$sFuncao,\"view\");\n \n //ação que ocorre após selecionar várias linhas no grid (permite criar novo eventos por intervalos)\n $sFuncao = \"eventWindow.show(dates);\"\n .\"eventWindow.on('hide', onComplete, this, {single:true});\";\n $this->addListener(self::EVENTO_RANGE,$sFuncao,\"window, dates, onComplete\");\n \n /*\n * eventos que podem ser implementados no componente\n */\n //$this->addListener(self::EVENTO_OVER,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_OUT,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_ADD,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_UPDATE,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_DELETE,$sFuncao,\"window, record\");\n //$this->addListener(self::EVENTO_CANCEL,\"\",\"form, record\");\n //$this->addListener(self::EVENTO_VIEW_CHANGE,$sFuncao,\"panel, view, info\");\n \n $aRender = array(\n \"xtype\" => 'calendarpanel',\n \"itemId\" => $this->getId().\"-calendar\",\n \"calendarStore\" => $this->getRenderStoreTipoEvento(),\n \"eventStore\" => $this->getRenderStoreEvento(),\n \"activeItem\" => $this->getPerspectiva(),\n \"showNavBar\" => $this->getMostraBarraPerspectivas(),\n \"showDayView\" => $this->getMostraPerspectivaDia(),\n \"showWeekView\" => $this->getMostraPerspectivaSemana(),\n \"showMonthView\" => $this->getMostraPerspectivaMes(),\n \"showTime\" => $this->getMostraHora(),\n \"monthViewCfg\" => $this->getConfiguracaoMes(),\n \"eventIncrement\" => $this->getDuracaoEvento(),\n \"viewStartHour\" => $this->getHoraInicial(),\n \"viewStartMinute\" => $this->getMinutoInicial(),\n \"viewEndHour\" => $this->getHoraFinal(),\n \"viewEndMinute\" => $this->getMinutoFinal(),\n \"viewConfig\" => $this->getConfiguracao(),\n \"listeners\" => $this->getListeners()\n );\n \n $sRender = \"Ext.create('Ext.panel.Panel', {\"\n .\"layout: 'border',\"\n .\"border: true,\"\n .\"items: [{\"\n .\"xtype: 'panel',\"\n .\"itemId: '\".$this->getId().\"-region-west',\"\n .\"region: 'west',\"\n .\"title: 'Calendário',\"\n .\"collapsible: true,\"\n .\"split: true,\"\n .\"width: 220,\"\n .\"maxWidth: 220,\"\n .\"layoutConfig: {\"\n .\"fill: false,\"\n .\"animate: true\"\n .\"},\"\n .\"padding: '3',\"\n .\"bodyStyle:{\"\n .\"backgroundColor: '#157fcc'\"\n .\"},\"\n .\"items: [{\"\n .\"xtype: 'datepicker',\"\n .\"itemId: '\".$this->getId().\"-picker',\"\n .\"cls: 'ext-cal-nav-picker',\"\n .\"listeners: {\"\n .\"'select': {\"\n .\"fn: function(dp, dt){\"\n .\"Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].setStartDate(dt);\"\n .\"},\"\n .\"scope: this\"\n .\"}\"\n .\"}\"\n .\"},{\"\n .$this->getListaAgenda()\n .\"}]\"\n .\"},{\"\n .\"region: 'center',\"\n .\"itemId: '\".$this->getId().\"-region-center',\"\n .\"style:{\"\n .\"border: '3px solid #5A91D2',\"\n .\"borderLeft: 'none'\"\n .\"},\"\n .Base::getRender($aRender)\n .\"}]\"\n .\"})\";\n \n return Base::addObj($sRender,$this->getRenderTo()).$this->getTelaManutencao();\n }",
"public function init()\n {\n\t\t$this->view->titleBrowser = 'e-Transporte';\n }",
"public function init()\n {\n $this->sysConfig = Zend_Registry::get('sysConfig');\n\t\t$this->view->sysConfig = $this->sysConfig;\n\t\t\n\t\t$this->config = Zend_Registry::get('config');\n\t\t$this->view->config = $this->config;\n\t\t\n\t\t$this->db=Zend_Registry::get('db');\n\t\t\n\t\t//controller and action names\n\t\t$this->controllerName = $this->getRequest()->getControllerName();\n\t\t$this->view->controllerName = $this->controllerName;\n\t\t\n\t\t$this->actionName = $this->getRequest()->getActionName();\n\t\t$this->view->actionName = $this->actionName;\n\t\t\n\t\t$this->view->baseurl=$this->config->common->baseUrl.\"/\";\n\t\t$this->view->cssurl=$this->config->common->cssPath;\n\t\t$this->view->jsurl=$this->config->common->jsPath;\n\n $this->view->items = \"\";\n $this->view->dashboard = \"\";\n $this->view->cnews = \"\";\n $this->view->expenditure = \"\";\n \n \n }",
"public function initContent()\n {\n $this->display_column_left = false;\n $this->display_column_right = false;\n\n // Call parent init content method\n parent::initContent();\n\n // Check if currency is accepted\n if (!$this->checkCurrency()) {\n Tools::redirect('index.php?controller=order');\n }\n\n // Assign data to Smarty\n $this->context->smarty->assign(array(\n 'nb_products' => $this->context->cart->nbProducts(),\n 'cart_currency' => $this->context->cart->id_currency,\n 'currencies' => $this->module->getCurrency((int) $this->context->cart->id_currency),\n 'total_amount' => $this->context->cart->getOrderTotal(true, Cart::BOTH),\n 'path' => $this->module->getPathUri(),\n ));\n\n // Set template\n $this->setTemplate('payment.tpl');\n }",
"function display() {\r\n\t\tparent::display ();\r\n\t}",
"protected function render()\n {\n $settings = $this->get_settings_for_display();\n require dirname(__FILE__) . '/' . $settings['layout'] . '.php';\n }",
"public function init()\n {\n \t$this->view->headTitle('Produktgruppen');\n\t\t$this->db = Zend_Registry::get('db');\n\t\t$this->logger = Zend_Registry::get('logger');\n }",
"protected function _prepareLayout()\n {\n\n\t\t\n $addButtonProps = [\n 'id' => 'add_new',\n 'label' => __('Add New'),\n 'class' => 'add primary',\n 'button_class' => '',\n 'class_name' => 'Magento\\Backend\\Block\\Widget\\Button',\n 'onclick' => \"setLocation('\" . $this->_getCreateUrl() . \"')\",\n ];\n\t\t\n $this->buttonList->add('add_new', $addButtonProps);\n\t\t\n\t\t$addUploadButtonProps = [\n 'id' => 'upload_csv',\n 'label' => __('Upload CSV'),\n 'class' => 'add primary',\n 'button_class' => '',\n 'class_name' => 'Magento\\Backend\\Block\\Widget\\Button',\n\t\t\t'onclick' => \"setLocation('\" . $this->_getUploadUrl() . \"')\",\n ];\n $this->buttonList->add('upload_csv', $addUploadButtonProps);\n\t\t\n\n $this->setChild(\n 'grid',\n $this->getLayout()->createBlock('Serole\\MemberList\\Block\\Adminhtml\\Memberlist\\Grid', 'serole.memberlist.grid')\n );\n return parent::_prepareLayout();\n }",
"public function makeDisplay()\n\t{\n\t\t$config = Config::getInstance();\n\n\t\t$this->runtimeProcessTemplate();\n\t\t$display = $this->display;\n\n\t\t$headerTemplate = new ViewStringTemplate($this->headerTemplate);\n\t\t$footerTemplate = new ViewStringTemplate($this->footerTemplate);\n\n\t\t// This is a list of all of the 'array' items that need to be cycled through and added as a single items\n\t\t$groups = array('script',\n\t\t\t\t\t\t'scriptStartup',\n\t\t\t\t\t\t'meta',\n\t\t\t\t\t\t'jsIncludes',\n\t\t\t\t\t\t'cssIncludes',\n\t\t\t\t\t\t'preStartupJs',\n\t\t\t\t\t\t'headerContent');\n\n\t\t$output = PHP_EOL;\n\t\tforeach($groups as $variable)\n\t\t{\n\t\t\t$content = '';\n\t\t\t$output = '';\n\t\t\tforeach($this->$variable as $content)\n\t\t\t{\n\t\t\t\t$output .= $content . PHP_EOL;\n\t\t\t}\n\t\t\t$headerTemplate->addContent(array($variable => $output));\n\t\t\t$footerTemplate->addContent(array($variable => $output));\n\t\t}\n\n\t\tforeach($this->regions as $name => $content)\n\t\t{\n\n\t\t\t$display->addContent(array($name => $content));\n\t\t}\n\n\t\t$jsInclude = ActiveSite::getLink() . 'javascript/';\n\t\t$headerFinal = $headerTemplate->getDisplay();\n\t\t$footerFinal = $footerTemplate->getDisplay();\n\n\t\t$display->addContent(array('js_path' => $jsInclude, 'head' => $headerFinal, 'foot' => $footerFinal));\n\t\t$this->addTemplateContent($display);\n\n\t\treturn $display->getDisplay();\n\t}",
"protected function abm()\n {\n $this->writeHeader();\n Site::pr('<body style=\"background-color:#' . $this->systemConfig->getBGColorConfigMenu() . ';\">');\n Site::pr('<div id=\"entire-container\">');\n Site::pr('<table border=\"1\">');\n $this->buildToolbar();\n $this->buildConfigView();\n Site::pr('</table>');\n Site::pr('</div>');\n Site::pr('<script>adjustSizeOfConponents();</script>');\n Site::writeTrailer();\n }",
"protected function _prepareLayoutFeatures()\n {\n if ($this->_getUrlRewrite()->getId()) {\n $this->_headerText = __('Edit URL Rewrite');\n } else {\n $this->_headerText = __('Add New URL Rewrite');\n }\n\n $this->_addUrlRewriteSelectorBlock();\n $this->_addEditFormBlock();\n }",
"function initializeFilesLayout() {\n $this->loadFilesMenubar();\n // navigation stuff\n $this->layout->add($this->getSearchPanel());\n $this->layout->add($this->getTagsPanel());\n $this->layout->add($this->getFolderPanel());\n // file list\n $this->layout->add($this->getClipboardPanel());\n $this->layout->add($this->getFilesPanel());\n // dialog\n $this->layout->setParam('COLUMNWIDTH_CENTER', '50%');\n $this->layout->setParam('COLUMNWIDTH_RIGHT', '50%');\n }",
"public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(isset($this->buttons['view']) && isset($this->viewButtonVisible))\n\t\t\t$this->buttons['view']['visible']=$this->viewButtonVisible;\n\t\tif(isset($this->buttons['update']) && isset($this->updateButtonVisible))\n\t\t\t$this->buttons['update']['visible']=$this->updateButtonVisible;\n\t\tif(isset($this->buttons['delete']) && isset($this->deleteButtonVisible))\n\t\t\t$this->buttons['delete']['visible']=$this->deleteButtonVisible;\n\t}",
"public function init(){\n parent::init();\n $this->registerAssets();\n\n echo CHtml::openTag( \"div\", $this->getDivOptions());\n }",
"protected function _init()\n {\n $this->setLayoutTemplate(App::getConfig('Help','layout/default'));\n\n # set navbar template .phtml\n $this->getNavbar()->setTemplate('help/html/navbar.phtml');\n\n #set sidebar template .phtml\n $this->getSidebar()->setTemplate('help/html/sidebar.phtml');\n }",
"public function onLoadSetup()\n {\n $this->prepareComponent();\n\n $options['columns'] = $this->listWidget->getSetupListColumns();\n $options['perPageOptions'] = $this->listWidget->getSetupPerPageOptions();\n $options['recordsPerPage'] = $this->listWidget->recordsPerPage;\n\n $this->defaultSuffix = 'pc-list-setup';\n\n // return [ '#'.$divId => $this->listWidget->makePartial('setup_form', ['options' => $options])];\n return $this->listWidget->makePartial('setup_form', ['options' => $options, 'componentOptions' => $this->options]);\n }",
"public function __construct(){\n\t\t\t$this->should_render();\n\n\t\t\t//$this->init();\n\t\t}",
"protected function _prepareToRender()\n {\n $this->addColumn('step_name', [\n 'label' => __('Diagnostic Step'),\n 'class' => 'validate-select',\n 'renderer' => $this->getStepRenderer()\n ]);\n $this->addColumn('step_array_text', ['label' => __('Array Label'), 'class' => 'required-entry']);\n $this->addColumn('step_option_class_id', ['label' => __('Class/IDs'), 'class' => 'required-entry']);\n $this->addColumn('step_option_value', ['label' => __('Value'), 'class' => 'required-entry']);\n $this->_addAfter = false;\n $this->_addButtonLabel = __('Add');\n }",
"public function beforeRender(){\n\n //render edit form with actual values from database\n $component_iterator = $this->getComponent(\"editForm\")->getComponents();\n $componenty = iterator_to_array($component_iterator);\n\n if ($this->actualListingValues != null){\n \n $optArray = $this->postageOptions;\n $postageCounter = $priceCounter = 0;\n \n foreach ($componenty as $comp){\n switch($comp->name){\n \n case 'product_name':\n $comp->setValue($this->actualListingValues['product_name']);\n break;\n case 'product_desc':\n $comp->setValue($this->actualListingValues['product_desc']);\n break;\n case 'price':\n $comp->setValue($this->actualListingValues['price']);\n break;\n case 'ships_from':\n $comp->setValue($this->actualListingValues['ships_from']);\n break;\n case 'ships_to';\n $comp->setValue($this->actualListingValues['ships_to']);\n break;\n case 'product_type':\n $comp->setValue($this->actualListingValues['ships_to']);\n break;\n case (strpos($comp->name, \"postage\")):\n //render all postage options into correct textboxes\n if (array_key_exists($postageCounter, $optArray)){\n $comp->setValue($optArray[$postageCounter]['option']);\n $postageCounter++;\n }\n break; \n case (strpos($comp->name, \"pprice\")):\n //render postage prices into correct textboxes\n if (array_key_exists($priceCounter, $optArray)){\n $comp->setValue($optArray[$priceCounter]['price']);\n $priceCounter++; \n } \n break; \n }\n }\n }\n \n $urlPath = $this->URL->path;\n \n //template variables shared between templates\n if ( strpos($urlPath, \"edit\" )|| strpos($urlPath, \"view\") \n || strpos($urlPath, \"buy\")){\n \n $lst = $this->hlp->sess(\"listing\");\n $imgs = $this->hlp->sess(\"images\");\n $this->template->listingDetails = $lst->listingDetails;\n $this->template->listingImages = $imgs->listingImages;\n }\n }",
"function display() {\r parent::display();\r }",
"public function init()\n {\n extract($this->data);\n\n // Make data accessible\n $this->compParams = [\n 'label' => $label,\n 'color' => $color,\n 'size' => $size\n ];\n\n $this->data['isSvg'] = $this->iconIsSvg($icon);\n\n if ($this->data['isSvg']) {\n $this->data['classList'][] = $this->getBaseClass() . \"--svg\";\n } else {\n $this->data['classList'] = array_merge($this->data['classList'] ?? [], [\n $this->createIconModifier($icon),\n $this->getBaseClass() . \"--material\",\n $this->getBaseClass() . \"--material-\" . $icon,\n \"material-icons\"\n ]);\n }\n\n if (!empty($customColor)) {\n $this->data['attributeList']['style'] = 'color:' . $customColor . ';';\n } else {\n $this->setColor();\n }\n $this->appendSpace();\n $this->setSize();\n\n //Identify as an image\n $this->data['attributeList']['role'] = \"img\";\n $this->data['attributeList']['aria-label'] = $this->getAltText($icon);\n $this->data['attributeList']['alt'] = $this->getAltText($icon);\n }",
"public function displayComponent() {\n\t\t\n\t\t\t$this->outputLine($this->_content);\n\t\t\t\n\t\t}",
"protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public function display()\n\t{\n\t\t$serviceLocator = $this->_application->getServiceLocator();\n\t\t$eventDispatcher = $this->_application->getEventDispatcher();\n\n\t\t// Finish configuring Open Power Template\n\t\t$opt = $serviceLocator->get('template.Opt');\n\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.template.configure',\n\t\t\tarray('opt' => $opt)\n\t\t));\n\n\t\t$opt->setup();\n\n\t\t// Configure the layout view\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.configure',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\n\t\t// Add placeholders\n\t\tforeach($this->_placeholders as $name => &$placeholder)\n\t\t{\n\t\t\t$data = array();\n\t\t\tforeach($placeholder as $view)\n\t\t\t{\n\t\t\t\t$data[] = array('view' => $view);\n\t\t\t}\n\t\t\t$this->_layout->assign($name, $data);\n\t\t}\n\n\t\t// Render everything. Actually, this is redirected to events, so\n\t\t// that we can easily change the exact rendering procedure.\n\t\t$eventDispatcher->notify(new Event($this, 'template.layout.render',\n\t\t\tarray('layout' => $this->_layout)\n\t\t));\n\t\t$this->_output->render($this->_layout);\n\t}",
"function prepareForBuildPage() \n\t{\n\t\t// save recs\n\t\t//$this->save();\n\t\t// PRG rule, to avoid POSTDATA resend\n\t\t$this->rulePRG();\t\n\t\t//Sorting fields\n\t\t$this->buildOrderParams();\n\t\t// fill data\n\t\t$this->fillMembers();\n\t\t$this->fillGroups();\n\t\t// build sql query\n\t\t$this->buildSQL();\n\t\t// build pagination block\n\t\t$this->buildPagination();\n\t\t// seek page must be executed after build pagination\n\t\tif ($this->sortByGroup===false)\n\t\t\t$this->seekPageInRecSet($this->querySQL);\t\t\t\t\t\n\t\telse\n\t\t\t$this->recSet = db_query($this->querySQL, $this->conn);\n\t\t// fill grid data\n\t\t$this->fillGridData();\n\t\t// build search panel\n\t\t$this->buildSearchPanel(\"adv_search_panel\");\n\t\t// add common js code\n\t\t$this->addCommonJs();\n\t\t// add common html code\n\t\t$this->addCommonHtml();\n\t\t// Set common assign\n\t\t$this->commonAssign();\n\t\t// build admin block\t\t\n\t\t$this->assignAdmin();\t\n\t}",
"public function init() {\n $resources = new Model_Resources();\n $resources->form_values['only_childs'] = 1;\n $result2 = $resources->getResources('resource_name', 'ASC');\n $this->_list[\"page_name\"][''] = \"Select\";\n if ($result2) {\n foreach ($result2 as $row2) {\n $resource = $row2->getResourceName();\n $arr_resources = explode(\"/\", $resource);\n $second_name = (!empty($arr_resources[1])) ? ucfirst($arr_resources[1]) . \" - \" : \"\";\n $this->_list[\"page_name\"][$row2->getPkId()] = ucfirst($arr_resources[0]) . \" - \" . $second_name . $row2->getDescription();\n }\n }\n\n //Generate fields \n // for Form_Iadmin_MessagesAdd\n foreach ($this->_fields as $col => $name) {\n if ($col == \"description\") {\n parent::createMultiLineText($col, \"4\");\n }\n\n // Generate combo boxes \n // for Form_Iadmin_MessagesAdd\n if (in_array($col, array_keys($this->_list))) {\n parent::createSelect($col, $this->_list[$col]);\n }\n\n // Generate Radio buttons\n // for Form_Iadmin_MessagesAdd\n if (in_array($col, array_keys($this->_radio))) {\n parent::createRadio($col, $this->_radio[$col]);\n }\n }\n }",
"function\n\tGalleryStandardDisplay()\n\t{\n $phyType = new Field;\n $phyType->ColName = 'PhyType_tab';\n\n $phyHeight = new Field;\n $phyHeight->ColName = 'PhyHeight_tab';\n\n $phyWidth = new Field;\n $phyWidth->ColName = 'PhyWidth_tab';\n\n $phyDepth = new Field;\n $phyDepth->ColName = 'PhyDepth_tab';\n\n $phyDiameter = new Field;\n $phyDiameter->ColName = 'PhyDiameter_tab';\n\n $phyDimUnits = new Field;\n $phyDimUnits->ColName = 'PhyUnitLength_tab';\n\n $phyWeight = new Field;\n $phyWeight->ColName = 'PhyWeight_tab';\n\n $phyDimWeight = new Field;\n $phyDimWeight->ColName = 'PhyUnitWeight_tab';\n\n $sizeTable = new Table;\n $sizeTable->Name = 'Dimensions';\n $sizeTable->Headings = array('Height', 'Width', 'Depth', 'Diam', 'Unit', 'Type');\n $sizeTable->Columns = array($phyHeight, $phyWidth, $phyDepth, $phyDiameter, $phyDimUnits, $phyType);\n\n\t\t$narratives = new BackReferenceField;\n\t\t$narratives->RefDatabase = \"eevents\";\n\t\t$narratives->RefField = \"ObjAttachedObjectsRef_tab\";\n\t\t$narratives->ColName = \"SummaryData\";\n\t\t$narratives->Label = \"Events\";\n\t\t$narratives->LinksTo = $GLOBALS['DEFAULT_EXHIBITION_PAGE'];\n\n\t\t$creRole = new Field;\n\t\t$creRole->ColName = 'CreRole_tab';\n\t\t$creRole->Italics = 1;\n\t\t\n\t\t$creCreatorRef = new Field;\n\t\t$creCreatorRef->ColName = 'CreCreatorRef_tab->eparties->SummaryData';\n\t\t$creCreatorRef->LinksTo = $GLOBALS['DEFAULT_PARTY_DISPLAY_PAGE'];\n\t\t\n\t\t$creatorTable = new Table;\n\t\t$creatorTable->Name = \"CreCreatorRef_tab\";\n\t\t$creatorTable->Columns = array($creCreatorRef, $creRole);\n\n\t\t$this->Fields = array(\n 'TitMainTitle',\n 'TitAccessionNo',\n\t\t\t\t$creatorTable,\n 'TitMainTitle',\n 'CreDateCreated',\n 'PhyMediaCategory',\n 'PhyMedium',\n\t\t\t\t$sizeTable,\n\n\t\t\t\t'CrePrimaryInscriptions',\n\t\t\t\t'CreSecondaryInscriptions',\n 'AccCreditLineLocal',\n 'LocCurrentLocationRef->elocations->SummaryData',\n\n\t\t\t\t//'TitAccessionNo',\n\t\t\t\t//'TitMainTitle',\n\t\t\t\t//'TitAccessionDate',\n\t\t\t\t//'TitCollectionTitle',\n\t\t\t\t//'CreDateCreated',\n\t\t\t\t//'TitTitleNotes',\n\t\t\t\t//'CreCountry_tab',\n\t\t\t\t//'PhyMedium',\n\t\t\t\t//'PhyTechnique',\n\t\t\t\t//'PhySupport',\n\t\t\t\t//'PhyMediaCategory',\n\t\t\t\t//'LocCurrentLocationRef->elocations->SummaryData',\n\t\t\t\t//'NotNotes',\n\t\t\t\t//'MulMultiMediaRef:1->emultimedia->MulIdentifier',\n\t\t\t\t//'AssRelatedObjectsRef_tab->ecatalogue->SummaryData',\n\t\t\t\t//$AssRef,\n\t\t\t\t);\n\t\t\n\t\t$this->BaseStandardDisplay();\n\t}",
"protected function _prepareLayout()\n\t{\n\t\t$this->getLayout()->getBlock('head')->setTitle($this->__($this->_helper->pageTitle()));\n $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');\n\t\t$this->getLayout()->getBlock('head')->addCss('css/extrembler/prelogin/form.css');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('header');\n\t\t$this->getLayout()->getBlock('content')->insert('store_language');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('footer');\n\t return parent::_prepareLayout();\n\t}",
"public function initializeArgumentsAndRender() {}",
"public function initializeArgumentsAndRender() {}",
"public function render()\n\t{\n\t\t$template = $this->template;\n\t\t$template->setFile( __DIR__ . '/dataGrid.latte' );\n\n\t\t$template->grid = $this;\n\t\t$template->stencils = $this->stencils;\n\t\t$template->actionWidth = $this->actionWidth;\n\t\t$template->actitle = $this->actitle;\n\t\t$template->acfooter = $this->acfooter;\n\t\t$template->cmd = self::CMD;\n\t\t$template->labels = $this->labels;\n\t\t$template->columns = $this->columns;\n\t\t$template->key = $this->key;\n\t\t$template->isSorting = $this->isSorting();\n\t\t$template->isFiltering = $this->isFiltering();\n\t\t$template->isAdding = $this->isAdding();\n\t\t$template->isRemoving = $this->isRemoving();\n\t\t$template->isEditing = $this->isEditing();\n\t\t$template->hasActions = $this->hasActions();\n\t\t$template->sortable = $this->sortable;\n\t\t$template->sorting = $this->sorting;\n\t\t$template->filtering = $this->filtering;\n\t\t$template->id = $this->id;\n\t\t$template->pgbtn = $this->getPagerButtons();\n\t\t$template->currentPage = $this->getCurrentPage();\n\t\t$template->rowsPerPage = $this->getRowsPerPage();\n\t\t$template->pageCount = $this->getPageCount();\n\n\t\tif ( count( $this->dataSnippet ) ) $template->data = $this->dataSnippet;\n\t\telse $template->data = $this->getData();\n\n\t\t$template->render();\n\t}",
"public function customize_controls_init()\n {\n }",
"function display()\n\t{\n\t\tJToolBarHelper::title(JText::_('JOOMLAPACK').':: <small><small>'.JText::_('CONFIGURATION').'</small></small>');\n\t\tJToolBarHelper::apply();\n\t\tJToolBarHelper::save();\n\t\tJToolBarHelper::cancel();\n\t\tJoomlapackHelperUtils::addLiveHelp('config');\n\t\t$document =& JFactory::getDocument();\n\t\t$document->addStyleSheet(JURI::base().'components/com_joomlapack/assets/css/joomlapack.css');\n\n\t\t// Load the util helper\n\t\t$this->loadHelper('utils');\n\n\t\t// Load the model\n\t\t$model =& $this->getModel();\n\n\t\t// Pass on the lists\n\t\t$this->assign('backuptypelist',\t\t\t\t$model->getBackupTypeList());\n\t\t$this->assign('loglevellist',\t\t\t\t$model->getLogLevelList() );\n\t\t$this->assign('sqlcompatlist',\t\t\t\t$model->getSqlCompatList() );\n\t\t$this->assign('algolist',\t\t\t\t\t$model->getAlgoList() );\n\t\t$this->assign('listerlist',\t\t\t\t\t$model->getFilelistEngineList() );\n\t\t$this->assign('dumperlist',\t\t\t\t\t$model->getDatabaseEngineList() );\n\t\t$this->assign('archiverlist',\t\t\t\t$model->getArchiverEngineList() );\n\t\t$this->assign('installerlist',\t\t\t\t$model->getInstallerList() );\n\t\t$this->assign('backupmethodlist',\t\t\t$model->getBackupMethodList() );\n\t\t$this->assign('authlist',\t\t\t\t\t$model->getAuthLevelList() );\n\n\t\t// Let's pass the data\n\t\t// -- Common Basic\n\t\t$this->assign('OutputDirectory',\t\t\t$model->getVar('OutputDirectoryConfig') );\n\t\t// -- Common Frontend\n\t\t$this->assign('enableFrontend',\t\t\t\t$model->getVar('enableFrontend') );\n\t\t$this->assign('secretWord',\t\t\t\t\t$model->getVar('secretWord') );\n\t\t$this->assign('frontendemail',\t\t\t\t$model->getVar('frontendemail') );\n\t\t$this->assign('arbitraryfeemail',\t\t\t$model->getVar('arbitraryfeemail'));\n\t\t// -- Basic\n\t\t$this->assign('BackupType',\t\t\t\t\t$model->getVar('BackupType') );\n\t\t$this->assign('TarNameTemplate',\t\t\t$model->getVar('TarNameTemplate') );\n\t\t$this->assign('logLevel',\t\t\t\t\t$model->getVar('logLevel') );\n\t\t$this->assign('authlevel',\t\t\t\t\t$model->getVar('authlevel') );\n\t\t$this->assign('cubeinfile',\t\t\t\t\t$model->getVar('cubeinfile') );\n\t\t// -- Advanced\n\t\t$this->assign('MySQLCompat', \t\t\t\t$model->getVar('MySQLCompat') );\n\t\t$this->assign('dbAlgorithm',\t\t\t\t$model->getVar('dbAlgorithm') );\n\t\t$this->assign('packAlgorithm', \t\t\t\t$model->getVar('packAlgorithm') );\n\t\t$this->assign('listerengine', \t\t\t\t$model->getVar('listerengine') );\n\t\t$this->assign('dbdumpengine', \t\t\t\t$model->getVar('dbdumpengine') );\n\t\t$this->assign('packerengine', \t\t\t\t$model->getVar('packerengine') );\n\t\t$this->assign('InstallerPackage',\t\t\t$model->getVar('InstallerPackage') );\n\t\t$this->assign('backupMethod', \t\t\t\t$model->getVar('backupMethod') );\n\t\t$this->assign('minexectime',\t\t\t\t$model->getVar('minexectime'));\n\t\t$this->assign('enableSizeQuotas',\t\t\t$model->getVar('enableSizeQuotas') );\n\t\t$this->assign('enableCountQuotas',\t\t\t$model->getVar('enableCountQuotas') );\n\t\t$this->assign('sizeQuota',\t\t\t\t\t$model->getVar('sizeQuota') );\n\t\t$this->assign('countQuota',\t\t\t\t\t$model->getVar('countQuota') );\n\t\t$this->assign('enableMySQLKeepalive',\t\t$model->getVar('enableMySQLKeepalive') );\n\t\t$this->assign('gzipbinary',\t\t\t\t\t$model->getVar('gzipbinary'));\n\t\t$this->assign('effvfolder',\t\t\t\t\t$model->getVar('effvfolder'));\n\t\t$this->assign('dereferencesymlinks',\t\t$model->getVar('dereferencesymlinks'));\n\t\t$this->assign('splitpartsize',\t\t\t\t$model->getVar('splitpartsize'));\n\t\t// -- Magic numbers\n\t\t$this->assign('mnRowsPerStep', \t\t\t\t$model->getVar('mnRowsPerStep') );\n\t\t$this->assign('mnMaxFragmentSize',\t\t\t$model->getVar('mnMaxFragmentSize') );\n\t\t$this->assign('mnMaxFragmentFiles', \t\t$model->getVar('mnMaxFragmentFiles') );\n\t\t$this->assign('mnZIPForceOpen',\t\t\t\t$model->getVar('mnZIPForceOpen') );\n\t\t$this->assign('mnZIPCompressionThreshold',\t$model->getVar('mnZIPCompressionThreshold') );\n\t\t$this->assign('mnZIPDirReadChunk',\t\t\t$model->getVar('mnZIPDirReadChunk') );\n\t\t$this->assign('mnMaxExecTimeAllowed',\t\t$model->getVar('mnMaxExecTimeAllowed') );\n\t\t$this->assign('mnMinimumExectime',\t\t\t$model->getVar('mnMinimumExectime') );\n\t\t$this->assign('mnExectimeBiasPercent',\t\t$model->getVar('mnExectimeBiasPercent') );\n\t\t$this->assign('mnMaxOpsPerStep',\t\t\t$model->getVar('mnMaxOpsPerStep') );\n\t\t$this->assign('mnArchiverChunk',\t\t\t$model->getVar('mnArchiverChunk') );\n\t\t// -- MySQLDump\n\t\t$this->assign('mysqldumpPath',\t\t\t\t$model->getVar('mysqldumpPath') );\n\t\t$this->assign('mnMSDDataChunk',\t\t\t\t$model->getVar('mnMSDDataChunk') );\n\t\t$this->assign('mnMSDMaxQueryLines',\t\t\t$model->getVar('mnMSDMaxQueryLines') );\n\t\t$this->assign('mnMSDLinesPerSession',\t\t$model->getVar('mnMSDLinesPerSession') );\n\t\t// -- DirectFTP\n\t\t$this->assign('df_host',\t\t\t\t\t$model->getVar('df_host') );\n\t\t$this->assign('df_port',\t\t\t\t\t$model->getVar('df_port') );\n\t\t$this->assign('df_user',\t\t\t\t\t$model->getVar('df_user') );\n\t\t$this->assign('df_pass',\t\t\t\t\t$model->getVar('df_pass') );\n\t\t$this->assign('df_initdir',\t\t\t\t\t$model->getVar('df_initdir') );\n\t\t$this->assign('df_usessl',\t\t\t\t\t$model->getVar('df_usessl') );\n\t\t$this->assign('df_passive',\t\t\t\t\t$model->getVar('df_passive') );\n\n\t\t// Also load the Configuration HTML helper\n\t\t$this->loadHelper('config');\n\t\tparent::display();\n\t}",
"public function __construct()\r\n {\r\n //$this->getRender();\r\n }",
"protected function renderData()\n {\n $this->view->baseUrl = $this->_baseUrl;\n $this->view->staticUrl = Zend_Registry::get('static');\n $this->view->version = Zend_Registry::get('version');\n $this->view->hostUrl = Zend_Registry::get('host');\n $this->view->photoUrl = Zend_Registry::get('photo');\n $this->view->adminUser = $this->_user;\n\n $this->view->isSuperUser = $this->_isSuperUser;\n $this->view->isViewer = $this->_isViewer;\n $this->view->isWatcher = $this->_isWatcher;\n $this->view->isEditor = $this->_isEditor;\n }",
"public function gridAction() {\n $this->loadLayout(false)\n ->renderLayout();\n }",
"function init() {\n if( !is_object( $this->ipsclass->compiled_templates['skin_gallery_imagelisting'] ) ) {\n \t$this->ipsclass->load_template('skin_gallery_imagelisting');\n }\n $this->img_html = $this->ipsclass->compiled_templates[ 'skin_gallery_imagelisting' ];\n }",
"protected function afterConstruct() {\n\t\t$current = strtolower(Yii::app()->controller->id.'/'.Yii::app()->controller->action->id);\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'title';\n\t\t\t//$this->defaultColumns[] = 'alias_url';\n\t\t\t$this->defaultColumns[] = 'description';\n\t\t\t$this->defaultColumns[] = 'image';\n\t\t\t//$this->defaultColumns[] = 'image_position';\n\t\t\t$this->defaultColumns[] = 'published';\n\t\t\t$this->defaultColumns[] = 'ordering';\n\t\t\t//$this->defaultColumns[] = 'access';\n\t\t\t//$this->defaultColumns[] = 'params';\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"public function init()\n {\n \t$this->view->layout = array();\n }",
"public function init()\n {\n $this->fillFromConfig([\n 'columns',\n 'model',\n 'recordUrl',\n 'recordOnClick',\n 'noRecordsMessage',\n 'showPageNumbers',\n 'recordsPerPage',\n 'showSorting',\n 'defaultSort',\n 'showCheckboxes',\n 'showSetup',\n 'showTree',\n 'treeExpanded',\n 'showPagination',\n 'customViewPath',\n ]);\n\n /*\n * Configure the list widget\n */\n $this->recordsPerPage = $this->getSession('per_page', $this->recordsPerPage);\n\n if ($this->showPagination == 'auto') {\n $this->showPagination = $this->recordsPerPage && $this->recordsPerPage > 0;\n }\n\n if ($this->customViewPath) {\n $this->addViewPath($this->customViewPath);\n }\n\n $this->validateModel();\n $this->validateTree();\n }",
"public function init() {\n\t\tAnnuaire_User::mustBeConnected();\n\t\t$this->view->setLayout(\"default\");\n\t\t$this->view->addLayoutVar(\"onglet\", 4);\n\t}",
"public function init()\n {\n $this->getHelper('layout')->setLayout('manage-layout');\n }",
"public function init()\n {\n $this->addComponent(CartComponent::class, 'cart', ['showDiscountApplier' => false]);\n $this->addComponent(AddressSelector::class, 'billingAddressSelector', ['type' => 'billing']);\n $this->addComponent(AddressSelector::class, 'shippingAddressSelector', ['type' => 'shipping']);\n $this->addComponent(ShippingMethodSelector::class, 'shippingMethodSelector', ['skipIfOnlyOneAvailable' => true]);\n $this->addComponent(PaymentMethodSelector::class, 'paymentMethodSelector', []);\n $this->setData();\n }",
"protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}",
"protected function prepare()\n {\n parent::prepare();\n\n // parent must be a test_entry_transcribe widget\n if( is_null( $this->parent ) )\n throw lib::create( 'exception\\runtime', 'This class must have a parent', __METHOD__ );\n \n $db_test_entry = $this->parent->get_record();\n\n $db_test = $db_test_entry->get_test();\n $heading = $db_test->name . ' test entry form';\n\n //TODO put this somewhere else\n if( $db_test_entry->deferred )\n $heading = $heading . ' NOTE: this test is currently deferred';\n\n $this->set_heading( $heading );\n }",
"protected function _prepareLayout() {\n $this->_removeButton('reset'); // Remove unused buttons\n $this->_removeButton('delete');\n $this->_removeButton('save');\n\n return parent::_prepareLayout();\n }",
"function init()\r\n {\r\n //Copy components to comps, so you can alter components properties\r\n //on init() methods\r\n $comps=$this->components->items;\r\n //Calls children's init recursively\r\n reset($comps);\r\n while (list($k,$v)=each($comps))\r\n {\r\n $v->init();\r\n }\r\n }",
"protected function prepareForPresentation()\n {\n if ($this->prepared) {\n return;\n }\n\n $this->permissionGroups = new Collection;\n $this->ungroupedPermissions = [];\n $this->groupedPermissionIndex = [];\n\n $this->loadPermissionsFromModules()\n ->loadCustomPermissions()\n ->loadCustomPermissionGroups()\n ->addUngroupedPermissionGroup()\n ->filterEmptyGroups();\n }",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }"
] | [
"0.7091118",
"0.6887432",
"0.687508",
"0.6731369",
"0.66677177",
"0.65562993",
"0.6517842",
"0.64948046",
"0.64781326",
"0.6380909",
"0.63737863",
"0.6319885",
"0.6249163",
"0.6242524",
"0.6183418",
"0.61748147",
"0.6170796",
"0.61700994",
"0.6144558",
"0.6144294",
"0.61414576",
"0.61207926",
"0.61173934",
"0.6098277",
"0.6082229",
"0.606828",
"0.6048123",
"0.6039713",
"0.6027521",
"0.60257566",
"0.60178393",
"0.6007482",
"0.5963144",
"0.59455365",
"0.5944638",
"0.5941056",
"0.59407455",
"0.59289145",
"0.59289145",
"0.59289145",
"0.59265244",
"0.5918765",
"0.5907572",
"0.58843136",
"0.588294",
"0.58718634",
"0.5865331",
"0.58625025",
"0.58602816",
"0.5848471",
"0.5844841",
"0.5838469",
"0.58348143",
"0.58346725",
"0.5833713",
"0.5821913",
"0.58169675",
"0.58137506",
"0.5801443",
"0.5774245",
"0.5773663",
"0.577332",
"0.5751944",
"0.5732184",
"0.5725516",
"0.5712401",
"0.56994563",
"0.56985956",
"0.56945574",
"0.569288",
"0.56918234",
"0.56889635",
"0.5687208",
"0.56860954",
"0.5683961",
"0.5679851",
"0.5676887",
"0.5675294",
"0.5665809",
"0.5662373",
"0.56567097",
"0.565541",
"0.56465536",
"0.5645838",
"0.56427795",
"0.56414807",
"0.5639388",
"0.5628867",
"0.5615288",
"0.5608305",
"0.5600986",
"0.5598688",
"0.55919534",
"0.5588544",
"0.55881417",
"0.5584691",
"0.5581674",
"0.55814534",
"0.55808574",
"0.55808574",
"0.55808574"
] | 0.0 | -1 |
Register the service provider. | public function register()
{
App::after(function($request, $response) {
$turbo = new Turbo;
if ($turbo->isPjax()) {
if (is_a($response, 'Illuminate\Http\Response')) {
// Extract the body from the response
$content = (string)$response->getOriginalContent();
$body = $turbo->extract($content);
// Set new response content
$response->setContent($body);
$response->headers->set('X-PJAX-URL', $request->getUri());
}
// Fire that we are in a pjax request
Event::fire('turbo.pjax', array($request, $response));
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register()\n {\n $this->registerServices();\n }",
"public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }",
"public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }",
"public function register()\n {\n\n $this->registerBinding();\n }",
"public function register()\n\t{\n\t\t$this->registerCommands();\n\t\t$this->registerHybridAuth();\n\t}",
"public function register()\n {\n $this->registerAuthenticator();\n }",
"public function register()\n {\n $this->loadHelpers();\n \n $this->passportSetting();\n }",
"public function register()\n {\n //Bind service in IoC container\n $this->app->singleton('tenancy', function(){\n return new TenantManager();\n });\n }",
"public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }",
"public function register()\n\t{\n\t\t\n\t\t$this->registerViewManager();\n\t\t$this->registerResponseHandler();\n\t\t$this->registerHttpMethods();\n\t}",
"public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }",
"public function register()\n {\n // ...\n }",
"public function register()\n {\n // ...\n }",
"public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }",
"public function register()\n {\n $this->registerServiceProvider();\n\n $this->addAssetNamespaceHint();\n $this->addStreamsNamespaceHint();\n }",
"public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }",
"public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }",
"public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }",
"public function register()\n {\n $this->registerContracts();\n }",
"public function register()\n\t{\n $this->registerApi();\n\t}",
"public function register()\n {\n \n $this->registerLoader();\n $this->registerTranslator();\n }",
"public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }",
"public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }",
"public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }",
"public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }",
"public function register()\n {\n $this->registerFinite();\n }",
"public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }",
"public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }",
"public function register()\n {\n $this->app['cache'] = $this->app->share(function($app)\n {\n return new CacheManagerMaster($app);\n });\n\n $this->app['memcached.connector'] = $this->app->share(function()\n {\n return new MemcachedConnector;\n });\n\n $this->registerCommands();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }",
"public function register()\n {\n $this->registerCacheManager();\n $this->registerCourier();\n }",
"public function register()\n {\n $this->app->singleton(Adapter::class, function () {\n\n return new Adapter(config('services.sso.id'), config('services.sso.secret'));\n\n });\n }",
"public function register()\n {\n $this->registerRollbar();\n }",
"public function register()\n {\n $this->configure();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n }",
"public function register(): void\n {\n parent::register();\n\n $this->singleton(RouteViewerContract::class, RouteViewer::class);\n }",
"public function register() {\n\n }",
"public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\n }",
"public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }",
"public function register()\n {\n $this->app->singleton(Service\\TagsSynchronizer::class, function ($app) {\n return new Service\\TagsSynchronizer();\n });\n }",
"public function register() {\n }",
"public function register() {\n }",
"public function register() {\n }",
"public function register() {\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }"
] | [
"0.71774215",
"0.7054453",
"0.6968271",
"0.69677705",
"0.6952019",
"0.6931252",
"0.6926226",
"0.6918423",
"0.6899592",
"0.6895726",
"0.6894278",
"0.68906504",
"0.68906504",
"0.6883112",
"0.6872877",
"0.6865099",
"0.68640506",
"0.68627584",
"0.68624485",
"0.68491566",
"0.6823619",
"0.68196595",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.68090034",
"0.68089324",
"0.6807419",
"0.6803942",
"0.6802752",
"0.679191",
"0.67904466",
"0.67874974",
"0.6785141",
"0.6785141",
"0.6785141",
"0.6780175",
"0.67768264",
"0.6776666",
"0.6770326",
"0.6762759",
"0.67627436",
"0.67611307",
"0.6757141",
"0.67570823",
"0.67548144",
"0.6753397",
"0.6753232",
"0.67504245",
"0.67504245",
"0.67504245",
"0.67504245",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705"
] | 0.0 | -1 |
/ vai pegar o diretorio e conctenar com uma barra | function carregarArquivoDaClasse($nomeDaClasse)
{
// echo "$nomeDaClasse.<br>"; //pra mostrar o nome da classe
// echo APLICACAO_RAIZ . str_replace('\\', '/', $nomeDaClasse) . '.php<br>';
require_once APLICACAO_RAIZ . str_replace('\\', '/', $nomeDaClasse) . '.php';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}",
"function copiar ($desde, $hasta){ \n mkdir($hasta, 0777); \n $this_path = getcwd(); \n if(is_dir($desde)) { \n chdir($desde); \n $handle=opendir('.'); \n while(($file = readdir($handle))!==false){ \n if(($file != \".\") && ($file != \"..\")){ \n if(is_dir($file)){ \n copiar($desde.$file.\"/\", $hasta.$file.\"/\"); \n chdir($desde); \n } \n if(is_file($file)){ \n copy($desde.$file, $hasta.$file); \n } \n } \n } \n closedir($handle); \n } \n}",
"function dirPath () { return (\"../../\"); }",
"public function directory();",
"function listar_directorios_ruta($ruta, $vlpadre){\n if (is_dir($ruta)) { \n if ($dh = opendir($ruta)) { \n\t\t$tmstmp = time();\n\t\t $rutabase = \"../docs/\".$_POST[\"idcliente\"].\"/\";\n\t\tmkdir($rutabase, 0777); \n\t\t \n while (($file = readdir($dh)) !== false) { \n //esta l�nea la utilizar�amos si queremos listar todo lo que hay en el directorio \n //mostrar�a tanto archivos como directorios \n //echo \"<br>Nombre de archivo: $file : Es un: \" . filetype($ruta . $file); \n if (is_dir($ruta . $file) && $file!=\".\" && $file!=\"..\"){ \n //solo si el archivo es un directorio, distinto que \".\" y \"..\" \n echo \"<br>Directorio: \".$ruta.\" --\".$file; \n\t\t\t\t$carpeta = creacarpetacliente($_POST[\"idcliente\"], substr($ruta,2).$file, $vlpadre );\n\t\t\t\t//print \"<br>EL Id de carpeta es: \".$carpeta;\n\t\t\t\t//exit;\n\t\t\t\tmkdir($rutabase.$carpeta, 0777);\n listar_directorios_ruta($ruta . $file . \"/\", $carpeta); \n } elseif($file!=\".\" && $file!=\"..\" && $file!=\"cmasivo.php\" && $file!=\"proceso.php\"){\n\t\t\t$arrfile =split(\"/\",substr($ruta,1).$file );\n\t\t\t\t$totarr = count($arrfile)-1;\n\n\t\t\t\t$tamano= filesize($rutabase.$vlpadre.\"/\".$arrfile[$totarr]);\n\t\t\t\tcopy($ruta.$file , $rutabase.$vlpadre.\"/\".$arrfile[$totarr] );\n\t\t\t\t echo \"<br>Copiar y subir a BD Archivo: $ruta$file\".\" -- \".$rutabase.$vlpadre.\"/\".$arrfile[$totarr];\n\t\t\t\t$pathtofile = $_POST[\"idcliente\"].\"/\".$vlpadre.\"/\".$arrfile[$totarr];\n\t\t\t\tinsertaarchivobd($_POST[\"idcliente\"], substr($ruta,1).$file, $pathtofile, $vlpadre, $tamano );\n\t\t\t\t\n\t\t\t}\n } \n closedir($dh); \n } \n }else \n echo \"<br>No es ruta valida\"; \n}",
"abstract protected function paths();",
"function dirPath() { return (\"../\"); }",
"abstract public function directoryLocation();",
"function dirPath() {return (\"../../../../\"); }",
"private function appConsolaDirectorio() {\r\n\t\t\tif(is_dir($this->consolaRuta) == true):\r\n\t\t\t\t$this->appConsolaDirectorioLectura();\r\n\t\t\telse:\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El directorio de Consola de la aplicación: %s, no existe', $this->aplicacion));\r\n\t\t\tendif;\r\n\t\t}",
"public function getDir();",
"protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))\n\t\t\t{\n\t\t\t\tmkdir($this->ruta,0777,true);\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!file_exists($this->rutaMini))\n\t\t\t{\n\t\t\t\tmkdir($this->rutaMini,0777,true);\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t}",
"function recursiveDirectory($directory){\n foreach(glob(\"{$directory}/*\") as $file)\n {\n //echo \"recorriendo el FICHERO $file<br>\";\n\n if(is_dir($file)) {\n //echo \"directorio $directory fichero $file<br>\";\n anadirImagen($file);\n recursiveDirectory($file);\n } else {\n\n anadirImagen($file);\n\n }\n }\n anadirImagen($directory);\n $parent = dirname($directory);\n while (strcmp($parent, 'Repositorio') != 0) {\n anadirImagen($parent);\n $parent = dirname($parent);\n }\n}",
"public function getDir(): string;",
"function leer_archivos_y_directorios($ruta) {\r\n\t$total = 0;\r\n if (is_dir($ruta))\r\n {\r\n // Abrimos el directorio y comprobamos que\r\n if ($aux = opendir($ruta))\r\n {\r\n while (($archivo = readdir($aux)) !== false)\r\n {\r\n if ($archivo!=\".\" && $archivo!=\"..\")\r\n {\r\n $ruta_completa = $ruta . '/' . $archivo;\r\n if (is_dir($ruta_completa))\r\n {\r\n }\r\n else\r\n {\r\n\t\t\t\t\t\t$total;\r\n\t\t\t\t\t\t$total++;\r\n //echo '<br />' . $archivo . '<br />';\r\n }\r\n }\r\n }\r\n closedir($aux);\r\n }\r\n }\r\n else\r\n {\r\n echo $ruta;\r\n echo \"<br />No es ruta valida\";\r\n }\r\n\treturn($total);\r\n}",
"function path($path='') {\n return $this->base_dir . $path;\n }",
"function newsItem_CreateDirektori( \n\t \t$tanggalhariini\n\t){\n \t\t$direktoribuat = \"filemodul/news/\" . \"file_item/\" . $tanggalhariini . \"/\";\n\t\t\t mkdir( $direktoribuat,'0777',true); \n\t\t\t chmod( $direktoribuat, 0777);\n\t\treturn $direktoribuat;\n\t}",
"public function path();",
"public function path() {}",
"public function path() {}",
"function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}",
"public abstract function dir();",
"public static function crear($path){\n\t$rol=0;\nif (isset($_SESSION['username'])) {\n\t//$ruta=substr($ruta, 0,-4);\n\t$rol=$_SESSION['nivel_acceso'];\n\t/* \techo \"<script> window.location='sin_acceso'</script>\";*/\n\t}//end if username\n\t\n\t\n//comprobamos si existe la variable path\n\nif($path !=\"\"){//if $path !=\"\"\n\n$paths= explode(\".\",$path);//convertimos a un array separado por puntos\n$ruta=\"\"; //inicializamos\nfor($i=0;$i <count($paths);$i++){ // for recorrer la variable paths\nif($i== count($paths)-1){//comprobamos si es el ultimo\n$ruta.=$paths[$i].\".php\";\t//si es el ultimo le ponemos .php\n}else{\n$ruta.=$paths[$i].\"/\";//si no es el ultimo le ponemos una barra inclinada\n}\n\n\n}//end for\n//comprobr si el archivo existe\n//echo \"la ruta es: \". $ruta;\nif (file_exists(VISTA_RUTA.$ruta)){\n\n//\n\t$menu = get_menu($rol);\n\t\t\t\t$acceso = false;\n\t\t\t\t//die(\"el estado de acceso es\".$acceso);\n\t\t\t\tforeach ( $menu as $link){\n\t\t\t\t\t\n\t\t if ( $link == $ruta) {\n\t\t\t//echo (\"</br>1el rol es=\".$rol.\" la ruta es=\".$ruta.\" en array =\".$link);\n\t\t\tinclude VISTA_RUTA.$ruta;\n\t\t\t\tbreak;\n\t\t\t\t }//if\n\t\t\telse{\n\t\t\t\t\t // echo(\"</br>el rol es=\".$rol.\" la ruta es=\".$ruta.\" en array =\".$link);\n\t\t\t\t\t// \n\t\t\t\t\t//echo (\"</br>2el rol es=\".$rol.\" la ruta es=\".$ruta.\" en array =\".$link);\n\t\t\t\t\t//include VISTA_RUTA.'sin_acceso.php';\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t}//end foreach\n\t\ninclude VISTA_RUTA.'sin_acceso.php';\n\n}//end if file_exists\nelse{\necho VISTA_RUTA.$ruta;\n\tdie(\"la ruta no existe\");\n}\n\n\n}//end if\n\n\t\n}",
"private function appDirectorio() {\r\n\t\t\t$this->directorio = ConfigAcceso::leer($this->aplicacion, 'fuente', 'directorio');\r\n\t\t\t$this->appRuta = implode(DIRECTORY_SEPARATOR, array(ROOT_APPS, $this->directorio));\r\n\t\t\t$this->consolaRuta = implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'Consola'));\r\n\t\t\tif(is_dir($this->appRuta) == true):\r\n\t\t\t\t$this->appDirectorioLectura();\r\n\t\t\telse:\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El directorio de la aplicación: %s, no existe', $this->aplicacion));\r\n\t\t\tendif;\r\n\t\t}",
"public function crear_carpeta_banco(){\n\t\t\t$x = $this->consultar_id();\n\t\t\tif(file_exists(\"../Process/BANCO\")){\n\t\t\t\t$destino = \"../Process/BANCO/\".$x;\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x.\"/DOCUMENTOS\";\n\t\t\t\tmkdir($destino);\n\t\t\t}else{\n\t\t\t\t$destino = \"../Process/BANCO\";\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x;\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x.\"/DOCUMENTOS\";\n\t\t\t\tmkdir($destino);\n\t\t\t}\n\t\t}",
"public function __construct(){\r\n\t\t$dir = $this->dir;\r\n\t}",
"private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }",
"private function defineDirPainelDLX(): void\n {\n // Previnir que o diretório seja alterado caso alguém tenha setado ele manualmente\n if (empty(self::$dir)) {\n $base_dir = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR;\n $document_root = $this->request->getServerParams()['DOCUMENT_ROOT'];\n\n // Setar o path do PainelDLX\n self::$dir = trim(str_replace($document_root, '', $base_dir), DIRECTORY_SEPARATOR);\n\n // Garantir que os separadores de diretório estejam padronizados\n self::$dir = str_replace(DIRECTORY_SEPARATOR, '/', self::$dir);\n\n // Adicionar o path do PainelDLX no include_path\n $this->adicionarDiretorioInclusao($base_dir);\n }\n }",
"function drive()\r\n {\r\n $r='';\r\n foreach (range(\"A\", \"Z\") as $val) {\r\n if(is_dir($val.\":\".DIRECTORY_SEPARATOR))\r\n {\r\n \r\n $ad=$val.\":\".DIRECTORY_SEPARATOR;\r\n $r=$r.=\"<a href='?act=file&dir=$ad'>$val:\".DIRECTORY_SEPARATOR.\"</a> \";\r\n }\r\n }\r\n return $r;\r\n }",
"function getAbsolutePath() ;",
"private static function getPath() : string {\n return getBasePath() . '/miaus';\n }",
"function completePath(){\n \treturn $this->path . $this->name;\n }",
"private function projectPath()\n { }",
"function cargarClases($ruta) {\n if (is_dir($ruta)) {\n if ($dh = opendir($ruta)) {\n while (($file = readdir($dh)) !== false) {\n if (is_dir($ruta.$file) && $file != \".\" && $file != \"..\") {\n if (strstr($file, \"clases\")) {\n //echo $ruta.$file;\n $clases = opendir($ruta.$file);\n while ($clase = readdir($clases)) {\n if (preg_match('/class\\.php$/',$clase)) {\n include_once($ruta.$file.'/'.$clase);\n //echo $ruta.$file.'/'.$clase.'<br/>';\n }\n }\n }//solo si el archivo es un directorio, distinto que \".\" y \"..\"\n\n cargarClases($ruta.$file.\"/\");\n }\n }\n closedir($dh);\n }\n }\n}",
"function listar_directorios_ruta($ruta){\n\t\t$directorios = array();\n\t\tif(is_dir($ruta)){ \n\t if($dh = opendir($ruta)){ \n\t while(($file = readdir($dh)) !== false){ \n\t //esta línea la utilizaríamos si queremos listar todo lo que hay en el directorio \n\t //mostraría tanto archivos como directorios \n\t //echo \"<br>Nombre de archivo: $file : Es un: \" . filetype($ruta . $file); \n\t if (is_dir($ruta . $file) && $file!=\".\" && $file!=\"..\"){ \n\t //solo si el archivo es un directorio, distinto que \".\" y \"..\" \n\t $directorios[] = $ruta.$file;\n\t //echo \"<br>Directorio: $ruta$file\"; \n\t $directorio[] = listar_directorios_ruta($ruta . $file . \"/\"); \n\t } \n\t } \n\t \tclosedir($dh); \n\t } \n\t }\n\t return $directorios;\n\t }",
"function files_management($inputFile, $files){\n \n if($inputFile == \"./\"){\n $inputFile = \".\";\n } \n rtrim($inputFile, '\\\\/'); //odstranenie prebytocneho lomitka na konci \n $tmp_files = array();\n \n if(is_file($inputFile)){ //je to citatelny subor s priponou h\n if(is_readable($inputFile)){\n if(pathinfo($inputFile, PATHINFO_EXTENSION) == 'h'){\n array_push($files, $inputFile); //pridame ho do pola\n } \n }\n }\n elseif(is_dir($inputFile)){ //jedna sa o adresar\n $tmp_files = scandir($inputFile); //nacitame si vsetky subory v adresari\n foreach($tmp_files as $tmp){\n if($tmp != \".\" && $tmp != \"..\"){ //vynechame aktualny a nadradeny adresar\n if(is_dir($inputFile.'/'.$tmp.'/')){ //rekurzivne zanorenie v pripade, ze tu mame dalsi adresar\n if(is_readable($inputFile.'/'.$tmp)){\n files_management($inputFile.'/'.$tmp.'/', $files);\n }\n else{ //v adresari nemame pravo na citanie => chyba\n fprintf(STDERR, \"Adresar nie je mozne prehladavat.\");\n exit(2); \n } \n }\n elseif(is_file($inputFile.'/'.$tmp)){ //citatelny hlavickovy subor pridame do pola\n if(is_readable($inputFile.'/'.$tmp)){\n if(pathinfo($inputFile.'/'.$tmp, PATHINFO_EXTENSION) == 'h'){\n array_push($files, $inputFile.'/'.$tmp);\n }\n }\n }\n else{\n fprintf(STDERR, \"Zadana cesta nie je ani subor, ani adresar.\");\n exit(2);\n }\n }\n } \n \n \n }\n else{\n fprintf(STDERR, \"Zadana cesta nie je ani subor, ani adresar.\");\n exit(2);\n } \n \n return $files;\n}",
"function getPath() {\n $ruta = realpath(dirname(__FILE__));\n if ( strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' )\n $separator = '\\\\';\n else\n $separator = '/';\n $aRuta = explode($separator,$ruta);\n $ruta = '';\n foreach($aRuta as $index => $value)\n if ( $index < count($aRuta) - 1 ) $ruta .= $value.$separator;\n return $ruta;\n}",
"private function loadPath() {\n $this->_system_path = INDEX_DIRECTORY.DIRECTORY_SEPARATOR.'System'.DIRECTORY_SEPARATOR;\n $this->_application_path = INDEX_DIRECTORY.DIRECTORY_SEPARATOR.'Application'.DIRECTORY_SEPARATOR;\n $this->_configuration_path = INDEX_DIRECTORY.DIRECTORY_SEPARATOR.'configuration'.DIRECTORY_SEPARATOR;\n $this->_libraries_path = INDEX_DIRECTORY.DIRECTORY_SEPARATOR.'Libraries'.DIRECTORY_SEPARATOR;\n $this->_logs_path = INDEX_DIRECTORY.DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR;\n }",
"abstract protected function getPath();",
"function plugin_dir_path($file)\n {\n }",
"private static function defaultFiles($dir){\n\n //gerando o model\n $model = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\model;\\n\\nclass \".self::$pathName.\"s implements \\\\libs\\\\database\\\\model\\n{\\n\\tpublic function create()\\n\\t{\\n\\t\\treturn array(\\n\\n);\\t\\n}\\n}\\n\";\n \\libs\\kernel\\File::newFile($dir.\"/model/\".self::$pathName.\"s.php\", $model);\n \n \n //gerando o controller\n $controller = \"<?php\\nnamespace modules\\\\\".strtolower(self::$pathName).\"\\\\controller;\\nuse \\\\libs\\\\kernel\\\\ControllerBase as CB;\\n\\nclass Controller\".self::$pathName.\" extends CB{\\n\\n\\tpublic function index(\\$app, \\$response){\\n // resposta que vem do servidor => \\$response. \\n // url onde esta o arquivo que vai ser renderizado. \\n // argumento a serem passados para a pagina. => \\$args \\n\\n return \\$app->view->render(\\$response, \\\"/\".ucfirst(self::$pathName).\"/index.php\\\");\\n\\t}\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/controller/Controller\".self::$pathName.\".php\", $controller);\n\n //gerando o manifest json\n $manifestJson = \"{\\n\\\"dad\\\": \\\"this\\\",\\n\\\"dadsName\\\": \\\"master\\\",\\n\\\"acessLevel\\\": \\\"0\\\",\\n\\\"title\\\": \\\"\".self::$pathName.\"\\\",\\n\\\"url\\\": \".strtolower(self::$pathName).\"\\\",\\n\\\"submenu\\\": []\\n}\";\n \\libs\\kernel\\File::newFile($dir.\"/manifest.json\", $manifestJson);\n \n \n //gerando o index\n \\libs\\kernel\\File::newFile($dir.\"/index.php\", \"\");\n }",
"protected function setInitialRelativePath() {}",
"public function contenuto($cartella){\n\t\t\n\t\tif(substr($cartella, -1)!='/'){\n\t\t\t$cartella=$cartella.'/';\n\t\t}\n\t\t\n\t\tif($cartella[0]!='/'){\n\t\t\t$cartella='/'.$cartella;\n\t\t}\n\n\t\t$cartella=$_SERVER['DOCUMENT_ROOT'].$cartella;\n\t\t\n\t\tif(is_dir($cartella)){\n\n\t\t\t// Opendir è la funzione per aprire la cartella\n\t\t\t$handle = opendir($cartella);\n\t\t\t\n\t\t\t// Ciclo la cartella\n\t\t\twhile (false !== ($files = readdir($handle)))\n\t\t\t{\n\t\t\t\t// Stampo i file\n\t\t\t\tif ($files != '.' && $files != '..')\n\t\t\t\t\techo $files.'<br />';\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public abstract function getDirectory();",
"function filepath()\n {\n return \"/var/www/html/mover/\";\n }",
"protected function action_getUserMainDir() {}",
"public function abspath()\n {\n }",
"function Comprobar_direccioncentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->DIRECCIONCENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"DIRECCIONCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->DIRECCIONCENTRO)>150)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"DIRECCIONCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9 ºª\\/]+$/\",$this->DIRECCIONCENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"DIRECCIONCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00050\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos y espacios, números y los símbolos “- / º ª”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\n\t\n\treturn $correcto; //devuelve el resultado\n}",
"function list_dir($chdir,$id_item_parent1,$mon_dir=\"\")\r\n{\r\n\t global $id_item,$mon_path,$rep;\r\n\r\n\t $var_retour = \"\"; \r\n\t unset($sdirs);\r\n\t unset($sfiles);\r\n\t chdir($chdir);\r\n \r\n\t $self = basename($_SERVER['PHP_SELF']);\r\n\t $handle = opendir('.');\r\n\t while ($file = readdir($handle))\r\n\t {\r\n //echo($file.\"<br>\");\r\n\t \tif(is_dir($file) && $file != \".\" && $file != \"..\")\r\n\t \t{ $sdirs[] = $file; }\r\n\t\telseif (is_file($file))\r\n\t\t{ $sfiles[] = $file; }\r\n\t }\r\n\t \r\n\t $dir = getcwd();\r\n\t $dir1 = str_replace($root, \"\", $dir);\r\n\t $count = substr_count($dir1, \"/\") + substr_count($dir1, \"\\\\\");\r\n \r\n\t if(is_array($sdirs))\r\n\t {\r\n\t\t sort($sdirs);\r\n\t \t reset($sdirs);\r\n\t\t \r\n\t \t for($y=0; $y<sizeof($sdirs); $y++)\r\n\t \t {\r\n\t\t\t $id_item++;\r\n\t\t\t // on n'affiche pas les répertoires\r\n\t\t\t //echo htmlentities($sdirs[$y]);\r\n \r\n\t\t\t $cwd1[0] = $dir;\r\n\t \t\t $cwd1[1] = $sdirs[$y];\r\n\t\t\t $chdir = join(\"/\", $cwd1);\r\n\t\t\t \r\n\t\t\t $var_retour = $var_retour.list_dir($chdir,$id_item,$chdir);\r\n\t\t }\r\n\t }\r\n\t \t\t \r\n\t chdir($chdir);\r\n\t \r\n\t if(is_array($sfiles))\r\n\t {\r\n\t \t sort($sfiles);\r\n\t \t reset($sfiles);\r\n\t\t \r\n\t\t $sizeof = sizeof($sfiles);\r\n\t\t \r\n\t\t for($y=0; $y<$sizeof; $y++)\r\n\t\t {\r\n\t\t\t $id_item++;\r\n\t\t\t if ($mon_dir) {\r\n\t\t\t\t $nom_path = str_replace($mon_path,\"\",$mon_dir).\"/\";\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t $nom_path = $rep;\r\n\t\t\t }\r\n\r\n\t\t\t$var_retour = $var_retour.\"<option value=\\\"\".$sfiles[$y].\"\\\">\".$sfiles[$y].\"</option>\"; \r\n\t\t }\r\n\t }\r\n\r\n\t return $var_retour;\r\n}",
"public function __construct() {\r\n $directoryInfo = new DirectoryInfo(getcwd());\r\n $this->directoryRoot = $directoryInfo->root();\r\n }",
"function concatenarPath($nombre, $seccion) {\n\t$path = \"img_\" . $seccion . \"/\" . $nombre;\n\treturn $path;\n}",
"function crearCarpeta($ruta){\r\n if (!is_dir(($ruta))){\r\n mkdir($ruta);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}",
"function AnalizeDir(){\n\t\t$directorio=$this->getNameXML();\n\t\t$i=0;\n\t\t$archivosnom='';\n\t\tif (is_dir($directorio)) {\n\t\t if ($dh = opendir($directorio)) {\n\t\t while (($file = readdir($dh)) !== false) {\n\t\t\t\t\tif($file!='.' || $file!='..' || $file!='...'){\n\t\t\t\t\t\t$archivosnom[$i]=$file;\n\t\t\t\t\t}\n\t\t\t $i++;\n\t\t }\n\t\t closedir($dh);\n\t\t }\n\t\t}\n\t\telse{\n\t\t\tdie(\"El directorio no existe\");\n\t\t}\n\t\treturn $archivosnom;\n\t}",
"function Directorios($ruta) {\r\n $respuesta = array();\r\n /**\r\n * Valida se existe una ruta\r\n */\r\n if (is_dir($ruta)) {\r\n /**\r\n * Abre la carpetas\r\n */\r\n if ($aux = opendir($ruta)) {\r\n /**\r\n * recorre la carpeta\r\n */\r\n while (($archivo = readdir($aux)) !== false) {\r\n /**\r\n * No tome directorios superiores\r\n */\r\n if ($archivo != \".\" && $archivo != \"..\") {\r\n $ruta_completa = $ruta . '/' . $archivo;\r\n\r\n\r\n if (is_dir($ruta_completa)) {\r\n $otro[] = $ruta_completa;\r\n } else {\r\n $archivos[\"nombre\"] = $archivo;\r\n $archivos[\"size\"] = filesize($ruta_completa);\r\n $archivos[\"fecha\"] = date('Y-m-d H:i:s', filemtime($ruta_completa));\r\n $archivos[\"ruta\"] = $ruta_completa;\r\n\r\n $respuesta[] = $archivos;\r\n }\r\n }\r\n }\r\n closedir($aux);\r\n return $respuesta;\r\n }\r\n } else {\r\n\r\n return false;\r\n }\r\n }",
"private function assets()\n {\n $relative_location = 'assets/';\n $assets_directory = realpath($this->args['location'] . DIRECTORY_SEPARATOR . '..') . DIRECTORY_SEPARATOR . $relative_location;\n if (!is_dir($assets_directory))\n {\n if (mkdir($assets_directory, 0755))\n {\n $message = \"\\tCreated folder: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location;\n }\n else\n {\n $message .= $relative_location;\n }\n }\n }\n $assets_directories = array(\n 'css' => 'css' . DIRECTORY_SEPARATOR,\n 'img' => 'img' . DIRECTORY_SEPARATOR,\n 'js' => 'js' . DIRECTORY_SEPARATOR\n );\n foreach ($assets_directories as $asset_type => $asset_directory)\n {\n $ad = $assets_directory . $asset_directory;\n if (!is_dir($ad) && mkdir($ad, 0755))\n {\n $message = \"\\tCreated folder: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location . $asset_directory;\n }\n else\n {\n $message .= $relative_location . $asset_directory;\n }\n }\n\n if (!empty($this->args['subdirectories']))\n {\n $ad .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n if (!is_dir($assets_directory . $asset_directory . $this->args['subdirectories']) && mkdir($assets_directory . $asset_directory . $this->args['subdirectories'], 0755, TRUE))\n {\n $message = \"\\tCreated folder: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location . $asset_directory . $this->args['subdirectories'];\n }\n else\n {\n $message .= $relative_location . $asset_directory . $this->args['subdirectories'];\n }\n }\n }\n\n if (isset($message))\n {\n fwrite(STDOUT, $message . \"\\n\");\n unset($message);\n }\n\n if ($asset_type === 'img')\n {\n continue;\n }\n else\n {\n $ad .= $this->args['name'] . '.' . $asset_type;\n if (!is_file($ad) && touch($ad))\n {\n $message = \"\\tCreated asset: \";\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green') . $relative_location . $asset_directory;\n if (!empty($this->args['subdirectories']))\n {\n $message .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $message .= $this->args['name'] . '.' . $asset_type;\n }\n else\n {\n $message .= $relative_location . $asset_directory;\n if (!empty($this->args['subdirectories']))\n {\n $message .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $message .= $this->args['name'] . '.' . $asset_type;\n }\n \n fwrite(STDOUT, $message . \"\\n\");\n unset($message);\n }\n else\n {\n $message = \"\\tAsset already exists: \" . $relative_location . $asset_directory;\n if (!empty($this->args['subdirectories']))\n {\n $message .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n $message .= $this->args['name'] . '.' . $asset_type;\n \n fwrite(STDOUT, $message . \"\\n\");\n unset($message);\n }\n }\n\n unset($ad);\n }\n \n return true;\n }",
"static public function getDir(){\n return __DIR__ . '/Adapter/Format/';\n }",
"function pathtockfinder() \n{\n\t//return \"/hoainhon/ckfinder/\";\n\treturn \"/ckfinder/\";\n}",
"function autoload ($clase, $dir=null){\r\n if(is_null($dir)){\r\n $dirname = str_replace('/public','', dirname(__FILE__));\r\n $dir = realpath($dirname);\r\n }\r\n //escaneo la clase de forma recursiva\r\n foreach (scandir($dir)as $file){\r\n //si es un dirrectorio (y no es de sistema)accedo y busco la clase dentro de el\r\n if (is_dir($dir.\"/\".$file) AND substr($file, 0, 1) !== '.'){\r\n autoload($clase, $dir.\"/\".$file); \r\n }\r\n //si es un fichero y el nombre coincide con el de la clase\r\n else if(is_file($dir.\"/\".$file) AND $file == substr (strrchr ($clase, \"\\\\\"), 1).\".php\"){\r\n require ($dir.\"/\".$file);\r\n }\r\n }\r\n}",
"function dir_list($file)\n{\n $file_list = scandir($file);\n foreach($file_list as $item)\n {\n if($item == '.' || $item == '..')continue;\n \n $file_path = $file . '/' . $item;\n if(is_dir($file_path))\n {\n echo \"<font color='red'>$file_path</font><br/>\";\n dir_list($file_path);\n }\n else{\n echo $file_path . \"<br>\";\n }\n }\n}",
"function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }",
"abstract public function subfolder($manipulation_name = '');",
"function getDefaultFolder() ;",
"function base_path($path)\n{\n return __DIR__.'/../'.$path;\n}",
"public function plantilla(){\n\n\n include \"./vista/plantilla.php\";\n\n }",
"private function path($dir = ''){ \n return ($dir !== '') ? (path('app') . \"$dir/\") : path('app');\n }",
"public function getDirectory();",
"public function getDirectory();",
"private static function GetPath(){\r\n\t return System:::IO:::Path::Combine(\r\n\t self::GetFolder(),\"settings.xml\");\r\n\t }",
"function cl_rhgeracaofolhaarquivo() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhgeracaofolhaarquivo\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public static function listDirectoriesForRoute($ruta)\n {\n if (is_dir($ruta)) {\n\n if ($dh = opendir($ruta)) {\n while (($file = readdir($dh)) !== false) {\n //esta línea la utilizaríamos si queremos listar todo lo que hay en el directorio\n //mostraría tanto archivos como directorios\n if (is_dir($ruta . $file) && $file != \".\" && $file != \"..\") {\n self::listDirectoriesForRoute($ruta . $file . \"/\");\n } else {\n $mime = File::mimeType($ruta . $file);\n $originalSize = File::size($ruta . $file);\n usleep(600000);\n if (strcasecmp($mime, 'image/png') == 0) {\n try {\n if (self::tinify) {\n self::compress_with_tinify($ruta, $file);\n } else {\n self::compress_with_pngquant($ruta . $file);\n }\n $newSize = File::size($ruta . $file);\n $compressRatio = $originalSize * 100 / $newSize;\n self::echoFileInformation($ruta, $file, '<span style=\"color:green\"> ' . $compressRatio . '% OK</span>');\n } catch (\\Exception $ex) {\n self::echoFileInformation($ruta, $file, '<span style=\"color:red\">FAIL</span>');\n }\n } else if (strcasecmp($mime, 'image/jpg') == 0 || (strcasecmp($mime, 'image/jpeg') == 0)) {\n try {\n self::compress_with_jpegtran($ruta . $file);\n $newSize = File::size($ruta . $file);\n $compressRatio = $originalSize * 100 / $newSize;\n self::echoFileInformation($ruta, $file, '<span style=\"color:green\"> ' . $compressRatio . '% OK</span>');\n } catch (\\Exception $ex) {\n self::echoFileInformation($ruta, $file, '<span style=\"color:red\">FAIL</span><br>' . $ex->getMessage());\n //self::echoFileInformation($ruta, $file, '<span style=\"color:red\">FAIL</span>');\n }\n }\n }\n }\n closedir($dh);\n }\n } else\n return -1;\n }",
"function Comprobar_direccionedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->direccionedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"direccionedificio\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->direccionedificio)>150)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"direccionedificio\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9 ºª\\/]+$/\",$this->direccionedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"direccionedificio\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00050\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos y espacios, números y los símbolos “- / º ª”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}",
"function path_res ($path) {\r\n\tif (file_exists(DIR_RES.$path)) {\r\n\t\t$path = DIR_RES.$path;\r\n\t} else {\r\n\t\t$path = \"no file $path\";\r\n\t}\r\n\treturn $path;\r\n}",
"function thescandir($dir, $level){\n\t$is_dir = true;\n\t\n\tif( !($files = @scandir($dir)) ) // s'il y a une erreur au scandir c'est que c'est un fichier.\n\t{\n\t\t$basename = pathinfo($dir,PATHINFO_BASENAME);\n\t\t$is_dir = false;\n\t\t\n\t\t// si c'est bien un fichier PHP\n\t\tif( substr(strtolower(strrchr(basename($basename), \".\")), 1) == 'php' ){\n\t\t\t// On ajoute le fichier au listing\n\t\t\t$offset = count( $_SESSION['Listing_Fichiers'] );\n\t\t\t$_SESSION['Listing_Fichiers'][$offset] = $dir;//$basename;\n\t\t\t//echo \"base : \".$basename.\" | dir : \".$dir.\"<br/>\";\n\t\t}\n\t}\n\telse\n\t{\n\t\tif($dir != \".\" and $dir != \"..\" )\n\t\t{\n\n\t\t}\n\t\t$is_dir = true;\n\t\t$level ++;\n\t}\n\t\n\tif($dir != \".\" and $dir != \"..\" )\n\t{\n\t\t$extension = pathinfo($dir,PATHINFO_EXTENSION);\n\t\t$basename = pathinfo($dir,PATHINFO_BASENAME);\n\t\t\n\t}\n\t\n\t// recursivité\n\t$i=0;\n\twhile( @$files[$i] )\n\t{\n\t\tif($files[$i] != \".\" and $files[$i] != \"..\")\n\t\t{\t\t\t\t\n\t\t\t$newdir = $dir.\"/\".$files[$i];//concatène les noms de dossiers\n\t\t\t\t\n\t\t\tif($dir == \".\")\n\t\t\t\t$newdir = $files[$i];\n\t\t\t\t\n\t\t\tthescandir($newdir, $level); \n\t\t}\n\t\t\n\t\t$i++;\n\t}\n\n\t\n}",
"protected function defineOriginalRootPath() {}",
"public function getDirectory(): string;",
"function __construct() {\n $this->_determine_custom_dir( dirname( __FILE__ ) );\n }",
"function display_file($file) {\n\n return \"images\" . DS . $file;\n\n}",
"public function getResourcePath();",
"function check_dir() \n\t{\n @chmod($this->path_to_assets,0777);\n $this->createDir(ABSPATH.\"wp-includes/\".$this->books_dir);\n $this->createDir(ABSPATH.\"wp-includes/\".$this->images_dir);\n\t\t /// echo $this->plugin_path.$this->images_dir.\" \\n\";\n\t\t //echo $this->path_to_assets.\" \\n\";\n }",
"public function path(): string;",
"public function path(): string;",
"private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }",
"public function getFilepath();",
"public function getFolderPath(){}",
"function dosya_indir($link,$name=null)\n{\n$link_info = pathinfo($link); //Yol bilgilerini deðiþkene atýyoruz.\n$uzanti = strtolower($link_info['extension']); //Dosyanýn uzantýsýný deðiþkene atýyoruz.\n$file = ($name) ? $name.'.'.$uzanti : $link_info['basename'];\n$yolcuk = \"capsler/\".$file; // Dosya/ buradan cektigimiz dosyanin kaydedilecegi yeri seciyoruz, sonunda / isareti olmak zorunda ve klasorun yazma izni (777) olmali.\n$curl = curl_init($link);\n$fopen = fopen($yolcuk,'w');\ncurl_setopt($curl, CURLOPT_HEADER,0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER,1);\ncurl_setopt($curl, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_0);\ncurl_setopt($curl, CURLOPT_FILE, $fopen);\ncurl_exec($curl);\ncurl_close($curl);\nfclose($fopen);\n$email = $_SESSION[\"email\"];\n$tarihcekbugun = date('d.m.Y H:i:s');\n\n\n$tarihsirala = date('Ymd');\n\n\n\nmysql_query(\"INSERT INTO `mezdeke_gonderi`(`id`, `email`, `icerik`, `resim`, `begeni`, `yorum`,`sabit`,`tarih`,`tarihler`,gosterim) VALUES ('','$email','','$yolcuk','0','0','0','$tarihcekbugun','$tarihsirala','0')\");\n\n}",
"function getSubfolders() ;",
"public function getFullPath();",
"protected abstract function getPath();",
"function getPathParser();",
"function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}",
"function set_dir($my_path ){\r\n\r\n $this->icons_dir = $my_path[0];\r\n $this->icons_url = $my_path[1];\r\n $this->is_dir_exist = $this->wpdev_mk_dir($this->icons_dir);\r\n\r\n }",
"public function setCarpetadestino($param) {\n if (!$param) {\n $this->error = 2.1;\n return;\n } else {\n $permitidos = \"ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz ÁÉÍÓÚáéíóú123456789\";\n for ($i = 0; $i < strlen($param); $i++) {\n if (strpos($permitidos, substr($param, $i, 1)) === false) {\n $this->error = 2.2;\n return;\n }\n }\n }\n $this->carpetadestino = Ruta::getRutaPadre(Ruta::getRutaServidor()).Configuracion::CARPETA. $param;\n//crear carpeta si no existe\n if (!file_exists($this->carpetadestino)) {\n mkdir($this->carpetadestino, 0777, true);\n }\n $param = \"/\";\n $this->carpetadestino .= $param;\n }",
"public function getDirectorySpool();",
"private function appConsolaDirectorioLectura() {\r\n\t\t\tif(is_readable($this->consolaRuta) == true):\r\n\t\t\t\t$this->appConsolaExistencia();\r\n\t\t\telse:\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El directorio de Consola de la aplicación: %s, no tiene permisos de lectura', $this->aplicacion));\r\n\t\t\tendif;\r\n\t\t}",
"function mostrarVista()\n\t{\n\t\t$nombre = \"sesion/index\";\n\t\t//Nombre del archivo \n\t\t$fileName = \"views/\" . $nombre . \".php\";\n\t\trequire_once($fileName);\n\t}",
"private function appDirectorioLectura() {\r\n\t\t\tif(is_readable($this->appRuta) == true):\r\n\t\t\t\t$this->appConsolaDirectorio();\r\n\t\t\telse:\r\n\t\t\t\tthrow new \\RuntimeException(sprintf('El directorio de la aplicación: %s, no tiene permisos de lectura', $this->aplicacion));\r\n\t\t\tendif;\r\n\t\t}",
"function set_base_dir($dir) {\n if($dir[strlen($dir)-1] != '/') {\n $dir .= '/'; \n }\n \n $this->base_dir = $dir;\n }",
"public function getProjectDir()\n {\n # Permet de récuprer des informations sur l'objet\n $r = new \\ReflectionObject($this);\n\n # Je récupère le nom du répertoire de mon fichier.\n $dir = dirname($r->getFileName(), 4);\n\n # Je recherche le dossier de mon projet.\n # Le dossier qui inclut le fichier composer.\n while(!file_exists($dir . '/composer.json')) {\n $dir = dirname($dir);\n }\n\n # On retourne le répertoire trouvé.\n return $dir;\n }",
"function RellenarImagenesDeLaMinuta($texto, $dir_img)\r\n {\r\n $this->Imprimir($texto, 20, 10, 12);\r\n\r\n $this->Cell(22);\r\n\r\n $this->Cell(155, 98, '', 1, 0, 'C');\r\n\r\n $this->Image(sfConfig::get('sf_web_dir') . '/' . $dir_img, 33, $this->GetY() + 1, 153, 95);\r\n }",
"static public function obtener($url_relativo) {\n\n $url_actual = getcwd();\n\n chdir($url_relativo);\n $nuevo_url = getcwd();\n\n chdir($url_actual);\n\n return $nuevo_url;\n }"
] | [
"0.6627353",
"0.6205105",
"0.616723",
"0.61662024",
"0.6151188",
"0.61188716",
"0.605855",
"0.60457575",
"0.6029456",
"0.602386",
"0.59780496",
"0.5905318",
"0.58719784",
"0.5846262",
"0.58400464",
"0.5830163",
"0.58189213",
"0.5818728",
"0.5810488",
"0.5809075",
"0.5806266",
"0.58003277",
"0.5796721",
"0.5790992",
"0.5779742",
"0.57700545",
"0.57691973",
"0.5733342",
"0.57254124",
"0.57232445",
"0.572152",
"0.56882536",
"0.56872064",
"0.56835645",
"0.5682649",
"0.5677137",
"0.5675213",
"0.56650484",
"0.5656584",
"0.56203324",
"0.56121933",
"0.56074005",
"0.56048346",
"0.56016815",
"0.5579499",
"0.5571562",
"0.556555",
"0.5562266",
"0.55565304",
"0.55525523",
"0.55435175",
"0.5536605",
"0.5520884",
"0.55142236",
"0.5499498",
"0.54972124",
"0.5488937",
"0.5471482",
"0.54672456",
"0.5464896",
"0.5455936",
"0.5455043",
"0.54491705",
"0.54476315",
"0.5447576",
"0.5436669",
"0.5436669",
"0.5435458",
"0.54346836",
"0.5430984",
"0.54300433",
"0.54233986",
"0.54225224",
"0.541286",
"0.54053867",
"0.5394791",
"0.5389716",
"0.53872186",
"0.5383936",
"0.5382365",
"0.5382365",
"0.5381832",
"0.53801346",
"0.5370811",
"0.53697205",
"0.53688794",
"0.53615105",
"0.53549033",
"0.5348415",
"0.5332315",
"0.53322965",
"0.5331572",
"0.5321982",
"0.5314343",
"0.5312093",
"0.53101456",
"0.53094244",
"0.5307138",
"0.53052855",
"0.5302055"
] | 0.60248816 | 9 |
required by \ElggEntity when setting the owner/container | public function setUp() {
_elgg_services()->setValue('session', \ElggSession::getMock());
$this->obj = $this->getMockBuilder('\ElggUpgrade')
->setMethods(null)
->getMock();
$this->obj->_callable_egefps = array($this, 'mock_egefps');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ownerClass()\n\t{\n\t\t$this->m_owner = array('pkowner_id'=>\"\", 'organization_name'=>\"\", 'owner_name'=>\"\", 'owner_address'=>\"\", 'owner_phone_bus'=>\"\", 'owner_phone_res'=>\"\", 'owner_fax'=>\"\", 'email'=>\"\", 'foip'=>\"\", 'owner_type'=>\"\"); \n\t}",
"public function setOwner($owner)\n {\n parent::setOwner($owner);\n if ($owner) {\n Hacks::addCallbackMethodToInstance(\n $owner,\n 'get'.$this->contentField(),\n function () use ($owner) {\n return $owner->getContentField();\n }\n );\n }\n }",
"function set_owner($owner)\n {\n $this->set_default_property(self :: PROPERTY_OWNER, $owner);\n }",
"protected function setOwner($owner) {\r\n $this->owner = $this->create($owner);\r\n }",
"public function setOwner($owner) {\n\t\t$this->owner = $owner;\n\t}",
"public function setOwner($owner) {\n\t\t$this->owner = $owner;\n\t}",
"protected function setOrganization() {}",
"public function setOwner(\\SetaPDF_Core_Type_Owner $owner) {}",
"public function setOwner(\\SetaPDF_Core_Type_Owner $owner) {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner() {}",
"public function getOwner();",
"public function getOwner();",
"public function getOwner();",
"public function set_owner_id($owner)\n {\n $this->set_default_property(self::PROPERTY_OWNER_ID, $owner);\n }",
"abstract protected function getEntitySetWithDefaults();",
"function getOwner() \n {\n return $this->instance->getOwner();\n }",
"public function getOwnerEntity() {\n\t\treturn get_entity($this->owner_guid);\n\t}",
"public function setOwner(HTML_QuickForm2_Node $owner)\r\n {\r\n if (!$owner instanceof HTML_QuickForm2_Container) {\r\n throw new HTML_QuickForm2_InvalidArgumentException(\r\n 'Each Rule can only validate Containers, '.\r\n get_class($owner) . ' given'\r\n );\r\n }\r\n parent::setOwner($owner);\r\n }",
"public function createOwner();",
"function __construct($aowner=null)\r\n {\r\n //Calls the inherited constructor\r\n parent::__construct($aowner);\r\n\r\n //List of children\r\n $this->components=new Collection();\r\n\r\n //Initializes the owner\r\n $this->owner=null;\r\n\r\n //Initializes the name\r\n $this->_name=\"\";\r\n\r\n $this->_controlstate=0;\r\n\r\n if ($aowner!=null)\r\n {\r\n //If there is an owner\r\n if (is_object($aowner))\r\n {\r\n //Stores it\r\n $this->owner=$aowner;\r\n\r\n //Adds itself to the list of components from the owner\r\n $this->owner->insertComponent($this);\r\n }\r\n else\r\n {\r\n throw new Exception(\"Owner must be an object\");\r\n }\r\n }\r\n\r\n }",
"public function attach ( $owner ) {\n\t\tparent::attach($owner);\n\t}",
"public function getOwner() {\r\n return $this->owner;\r\n }",
"function get_owner()\n {\n return $this->get_default_property(self :: PROPERTY_OWNER);\n }",
"function getOwner()\n\t{\n\t\treturn $this->m_owner;\t\t\t\t// return class attributes \n\t}",
"protected function setupObject()\n {\n try {\n $dom = $this->getAttribute(\"domain\");\n if ($dom) {\n $this->getDomain()->copy($this->getTable()->getDatabase()->getDomain($dom));\n } else {\n $type = strtoupper($this->getAttribute(\"type\"));\n if ($type) {\n if ($platform = $this->getPlatform()) {\n $this->getDomain()->copy($this->getPlatform()->getDomainForType($type));\n } else {\n // no platform - probably during tests\n $this->setDomain(new Domain($type));\n }\n } else {\n if ($platform = $this->getPlatform()) {\n $this->getDomain()->copy($this->getPlatform()->getDomainForType(self::DEFAULT_TYPE));\n } else {\n // no platform - probably during tests\n $this->setDomain(new Domain(self::DEFAULT_TYPE));\n }\n }\n }\n\n $this->name = $this->getAttribute(\"name\");\n $this->phpName = $this->getAttribute(\"phpName\");\n $this->phpType = $this->getAttribute(\"phpType\");\n\n if ($this->getAttribute(\"prefix\", null) !== null) {\n $this->namePrefix = $this->getAttribute(\"prefix\");\n } elseif ($this->getTable()->getAttribute('columnPrefix', null) !== null) {\n $this->namePrefix = $this->getTable()->getAttribute('columnPrefix');\n } else {\n $this->namePrefix = '';\n }\n\n // Accessor visibility\n if ($this->getAttribute('accessorVisibility', null) !== null) {\n $this->setAccessorVisibility($this->getAttribute('accessorVisibility'));\n } elseif ($this->getTable()->getAttribute('defaultAccessorVisibility', null) !== null) {\n $this->setAccessorVisibility($this->getTable()->getAttribute('defaultAccessorVisibility'));\n } elseif ($this->getTable()->getDatabase()->getAttribute('defaultAccessorVisibility', null) !== null) {\n $this->setAccessorVisibility($this->getTable()->getDatabase()->getAttribute('defaultAccessorVisibility'));\n } else {\n $this->setAccessorVisibility(self::DEFAULT_VISIBILITY);\n }\n\n // Mutator visibility\n if ($this->getAttribute('mutatorVisibility', null) !== null) {\n $this->setMutatorVisibility($this->getAttribute('mutatorVisibility'));\n } elseif ($this->getTable()->getAttribute('defaultMutatorVisibility', null) !== null) {\n $this->setMutatorVisibility($this->getTable()->getAttribute('defaultMutatorVisibility'));\n } elseif ($this->getTable()->getDatabase()->getAttribute('defaultMutatorVisibility', null) !== null) {\n $this->setMutatorVisibility($this->getTable()->getDatabase()->getAttribute('defaultMutatorVisibility'));\n } else {\n $this->setMutatorVisibility(self::DEFAULT_VISIBILITY);\n }\n\n $this->peerName = $this->getAttribute(\"peerName\");\n\n // retrieves the method for converting from specified name to a PHP name, defaulting to parent tables default method\n $this->phpNamingMethod = $this->getAttribute(\"phpNamingMethod\", $this->parentTable->getDatabase()->getDefaultPhpNamingMethod());\n\n $this->isPrimaryString = $this->booleanValue($this->getAttribute(\"primaryString\"));\n\n $this->isPrimaryKey = $this->booleanValue($this->getAttribute(\"primaryKey\"));\n\n $this->isNodeKey = $this->booleanValue($this->getAttribute(\"nodeKey\"));\n $this->nodeKeySep = $this->getAttribute(\"nodeKeySep\", \".\");\n\n $this->isNestedSetLeftKey = $this->booleanValue($this->getAttribute(\"nestedSetLeftKey\"));\n $this->isNestedSetRightKey = $this->booleanValue($this->getAttribute(\"nestedSetRightKey\"));\n $this->isTreeScopeKey = $this->booleanValue($this->getAttribute(\"treeScopeKey\"));\n\n $this->isNotNull = ($this->booleanValue($this->getAttribute(\"required\")) || $this->isPrimaryKey); // primary keys are required\n\n //AutoIncrement/Sequences\n $this->isAutoIncrement = $this->booleanValue($this->getAttribute(\"autoIncrement\"));\n $this->isLazyLoad = $this->booleanValue($this->getAttribute(\"lazyLoad\"));\n\n // Add type, size information to associated Domain object\n $this->getDomain()->replaceSqlType($this->getAttribute(\"sqlType\"));\n if (!$this->getAttribute(\"size\") && $this->getDomain()->getType() == 'VARCHAR' && $this->hasPlatform() && !$this->getAttribute(\"sqlType\") && !$this->getPlatform()->supportsVarcharWithoutSize()) {\n $size = 255;\n } else {\n $size = $this->getAttribute(\"size\");\n }\n $this->getDomain()->replaceSize($size);\n $this->getDomain()->replaceScale($this->getAttribute(\"scale\"));\n\n $defval = $this->getAttribute(\"defaultValue\", $this->getAttribute(\"default\"));\n if ($defval !== null && strtolower($defval) !== 'null') {\n $this->getDomain()->setDefaultValue(new ColumnDefaultValue($defval, ColumnDefaultValue::TYPE_VALUE));\n } elseif ($this->getAttribute(\"defaultExpr\") !== null) {\n $this->getDomain()->setDefaultValue(new ColumnDefaultValue($this->getAttribute(\"defaultExpr\"), ColumnDefaultValue::TYPE_EXPR));\n }\n\n if ($this->getAttribute('valueSet', null) !== null) {\n if (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n $valueSet = str_getcsv($this->getAttribute(\"valueSet\"));\n } else {\n // unfortunately, no good fallback for PHP 5.2\n $valueSet = explode(',', $this->getAttribute(\"valueSet\"));\n }\n $valueSet = array_map('trim', $valueSet);\n $this->valueSet = $valueSet;\n } elseif (preg_match('/enum\\((.*?)\\)/i', $this->getAttribute('sqlType', ''), $matches)) {\n if (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n $valueSet = str_getcsv($matches['1'], ',', '\\'');\n } else {\n // unfortunately, no good fallback for PHP 5.2\n $valueSet = array();\n foreach (explode(',', $matches['1']) as $value) {\n $valueSet[] = trim($value, \" '\");\n }\n }\n $this->valueSet = $valueSet;\n }\n\n $this->inheritanceType = $this->getAttribute(\"inheritance\");\n // here we are only checking for 'false', so don't use booleanValue()\n $this->isInheritance = ($this->inheritanceType !== null && $this->inheritanceType !== \"false\");\n\n $this->description = $this->getAttribute(\"description\");\n } catch (Exception $e) {\n throw new EngineException(\"Error setting up column \" . var_export($this->getAttribute(\"name\"), true) . \": \" . $e->getMessage());\n }\n }",
"public function setOwner($val)\n {\n $this->_propDict[\"owner\"] = $val;\n return $this;\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"public function owner()\n {\n return $this->morphTo('owner');\n }",
"private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }",
"public function setContainer($container);",
"public static function ownerOnly(){\n return TRUE;\n }",
"public function getUOwner()\n {\n return null;\n }",
"public function getUOwner()\n {\n return null;\n }",
"public function setContainer(Container $container);",
"public function setEntity( $entity )\n {\n \n $this->entity = $entity;\n \n }",
"function setOwner($user) \n {\n return $this->instance->setOwner($user);\n }",
"public function beforeSave() {\n $this->owner->{$this->column} = Yii::$app->db->createCommand(\"SELECT UUID()\")->queryScalar();\n }",
"function set_parent($value) {\n $this->set_mapped_property('parent', $value);\n }",
"function set_entity($ent){\n $this -> table = $ent;\n }",
"final public function addItemOwner() {\n $this->addUserByField('users_id', true);\n }",
"public function setContainer($container)\n {\n if ($container instanceof Space) {\n $this->space_id = $container->id;\n } elseif ($container instanceof User) {\n $this->user_id = $container->id;\n } else {\n throw new Exception(\"Invalid container type!\");\n }\n\n $this->_container = $container;\n }",
"public function getOwner()\n {\n return $this->_owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function getOwner()\n {\n return $this->owner;\n }",
"public function addOwnerField(BeforeFormRenderEvent $event)\n {\n $environment = $event->getTwigEnvironment();\n $data = $event->getFormData();\n $form = $event->getForm();\n\n $ownerField = $environment->render(\n \"OroOrganizationBundle::owner.html.twig\",\n array(\n 'form' => $form\n )\n );\n /**\n * Setting owner field as last field in first data block\n */\n if (!empty($data['dataBlocks'])) {\n if (isset($data['dataBlocks'][0]['subblocks'])) {\n $data['dataBlocks'][0]['subblocks'][0]['data'][] = $ownerField;\n }\n }\n\n $event->setFormData($data);\n }",
"public function prePersist(LifecycleEventArgs $args): void\n {\n $entity = $args->getEntity();\n\n if (property_exists($entity, self::CREATED_AT_FIELD)) {\n $entity->setCreatedAt(new \\DateTimeImmutable());\n }\n\n if (property_exists($entity, self::UPDATED_AT_FIELD)) {\n $entity->setUpdatedAt(new \\DateTime());\n }\n\n if (($entity instanceof Offer || $entity instanceof Resume) && $user = $this->authService->getUserOrNull()) {\n $entity->setOwner($user);\n }\n }",
"function testDefaultOwner() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->save(false);\r\n\t\t$this->assertEquals($obj->owner_id, $this->user->id);\r\n\t\t$obj->removeHard();\r\n\t\tunset($obj);\r\n\t}",
"public function setOwner(User $owner)\n {\n $this->owner = $owner;\n }",
"public function onBeforeWrite()\n {\n $owner = $this->owner;\n $type = $owner->Type;\n\n // If type change clear all information.\n if ($owner->isChanged('Type')) {\n $owner->AuthorName = null;\n $owner->AuthorUrl = null;\n $owner->Language = null;\n $owner->Category = null;\n $owner->Media = null;\n $owner->PublishedDate = null;\n $owner->License = null;\n }\n\n switch ($type) {\n case 'URL':\n if ($sourceURL = $owner->URL) {\n $information = Embed::create($sourceURL);\n $owner->AuthorName = $information->AuthorName;\n $owner->AuthorUrl = $information->AuthorUrl;\n $owner->Language = $information->Language;\n $owner->Media = ucfirst($information->providerName) ? : 'Link';\n $owner->PublishedDate = $information->PublishedDate;\n $owner->License = $information->License;\n if ($information->Type == 'photo') {\n $owner->Category = 'Image';\n } else {\n $owner->Category = ucfirst($information->Type);\n }\n }\n break;\n case 'Email':\n case 'Phone':\n $owner->Category = $type;\n $owner->Media = $type;\n break;\n case 'File':\n $file = $owner->File();\n if ($file->exists()) {\n if ($file->hasMethod('appCategory') && $file->hasMethod('getExtension')) {\n $owner->Category = ucfirst($file->appCategory());\n $owner->Media = ucfirst($file->getExtension());\n }\n }\n break;\n case 'SiteTree':\n $owner->Category = 'Link';\n $owner->Media = $owner->SiteTree()->i18n_singular_name();\n break;\n }\n }",
"abstract protected function getNewEntityInstance();",
"public function getOwner() {\n\t\treturn $this->owner;\n\t}",
"public function isOwner();",
"public function setOwner(ActiveRecord $owner): self\n {\n $this->globalParentNode = $owner->id;\n $this->companyIdentify = $owner->getAttribute('companyId');\n $db = $this->getDb();\n $nodes = $db->createCommand('SELECT id from ' . self::tableName() . ' where companyId=' . $this->companyIdentify)\n ->queryAll();\n $this->nodeIdList = array_column($nodes, 'id');\n\n return $this;\n }",
"public function setOwnerAndLockForm(FormProcessEvent $event): void\n {\n $request = $this->requestStack->getCurrentRequest();\n\n if (!$request) {\n return;\n }\n\n $action = $this->entityRoutingHelper->getAction($request);\n\n if ($action !== self::ACTION_ASSIGN) {\n return;\n }\n\n $targetEntityClass = $this->entityRoutingHelper->getEntityClassName($request);\n\n if (!$targetEntityClass || !is_a($targetEntityClass, User::class, true)) {\n return;\n }\n\n $targetEntityId = $this->entityRoutingHelper->getEntityId($request);\n\n if (!$targetEntityId) {\n return;\n }\n\n $data = $event->getData();\n $form = $event->getForm();\n\n $data->setOwner(\n $this->entityRoutingHelper->getEntity($targetEntityClass, $targetEntityId)\n );\n\n FormUtils::replaceFieldOptionsRecursive($form, 'owner', [\n 'attr' => ['readonly' => true],\n ]);\n }",
"public function setOwner($value)\n {\n return $this->set(self::_OWNER, $value);\n }",
"function setParent(IBabylonModel $parent);",
"function readOwner()\r\n {\r\n return(null);\r\n }",
"public function beforeSave()\n {\n foreach ($this->fields as $f) {\n\n $post = !yii::$app->request->isConsoleRequest ? yii::$app->request->post($this->owner->shortClassName) : null;\n if ($post && isset($post[$f])) {\n if (is_array($post[$f])) {\n $this->owner->{$f} = ArrayHelper::merge((is_array($this->owner->{$f}) ? $this->owner->{$f} : []), $post[$f]);\n } else {\n $this->owner->{$f} = $post[$f];\n }\n }\n\n $data = $this->owner->{$f};\n if ($f == 'additional_data') {\n if (yii::$app->request->isConsoleRequest) {\n $defaultData['info'] = [\n 'triggered by console application'\n ];\n } else {\n $defaultData['info'] = [\n 'user' => (yii::$app->user->isGuest ? 'guest' : yii::$app->user->id),\n 'ip' => yii::$app->request->userIP,\n ];\n }\n $data = is_array($data) ? array_merge($defaultData, $data) : $defaultData;\n }\n $this->owner->{$f} = Json::encode($data);\n }\n }",
"protected function get_owner_id()\n {\n return $this->owner_id;\n }",
"public function getowner_id()\n {\n return $this->owner_id;\n }",
"public function owner()\n {\n return $this->belongsTo('TypiCMS\\Modules\\Partners\\Shells\\Models\\Partner', 'partner_id')->withoutGlobalScopes();\n }",
"function getOwnerIdentifier()\n {\n return $this->ownerIdentifier;\n }",
"function roomify_conversations_add_owner_user_reference_field() {\n field_info_cache_clear();\n\n // \"conversation_owner_user_ref\" field.\n if (field_read_field('conversation_owner_user_ref') === FALSE) {\n $field = array(\n 'field_name' => 'conversation_owner_user_ref',\n 'type' => 'entityreference',\n 'cardinality' => 1,\n 'locked' => 1,\n 'settings' => array(\n 'target_type' => 'user',\n ),\n );\n field_create_field($field);\n }\n\n // \"conversation_owner_user_ref\" field instance.\n if (field_read_instance('roomify_conversation', 'conversation_owner_user_ref', 'standard') === FALSE) {\n $instance = array(\n 'field_name' => 'conversation_owner_user_ref',\n 'entity_type' => 'roomify_conversation',\n 'label' => 'Owner',\n 'bundle' => 'standard',\n 'required' => FALSE,\n 'widget' => array(\n 'type' => 'entityreference_autocomplete',\n ),\n );\n field_create_instance($instance);\n }\n}",
"public function setOwner($user_id)\r\n {\r\n $this->owner = $user_id;\r\n }",
"public function isOwnerOf( $attr )\n {\n // SOL TICKET #2\n // Dependiendo del tipo de relacion se si un objeto es duenio de otro:\n // - 1) Si la relacion es A (1)->(1) B entonces se necesita belongsTo explicito para no salvar en cascada relaciones que en realidad son blandas (p.e. modelado de *->1 donde el lado * en realidad es blando). (desde el modelo, esto es igual a (*)->(1))\n // - 2) Si la relacion es A (1)<->(1) B entonces se necesita belongsTo para saber cual es el lado fuerte.\n // - 3) Si la relacion es A (1)->(*) B entonces B belongsTo A.\n // - 4) Si la relacion es A (1)<->(*) B entonces B belongsTo A.\n // - 5) Si la relacion es A (*)->(*) B entonces B belongsTo A. (desde el modelo, es lo mismo que (1)->(*))\n // - 6) Si la relacion es A (*)<->(*) B entonces se necesita belongsTo en algun lado.\n //\n // La clase actual es A, el obj es de clase B.\n\n $_thisClass = get_class($this); //self::$thisClass; // get_class da PO, deberia usar otro valor y no la clase...\n\n // Verifico si tengo el atributo y esta en una relacion (hasMany o hasOne).\n //\n if (array_key_exists( $attr, $this->hasOne ))\n {\n $obj = new $this->hasOne[$attr]();\n\n // Si la relacion es unidireccional, se es duenio del otro solo si el otro declara belongsTo mi clase.\n if ($obj->hasOneOfThis( $_thisClass )) // 2) bidireccional 1..1\n {\n return $obj->belonsToClass( $_thisClass ); // Si el objeto que quiero saber si soy duenio pertenece a mi => si soy duenio de el.\n }\n else // 1) unidireccional 1..1\n {\n //return true;\n return $obj->belonsToClass( $_thisClass ); // Ahora se pide belongsTo obligatorio para 1..1 unidireccional (esto evita que se salven en cascada links que realmente son blandos)\n }\n }\n else if (array_key_exists( $attr, $this->hasMany ))\n {\n // Si tengo una relacion hasMany con migo mismo, tengo 1->* o *->*, para ambos casos debería devolver true.\n if ($this->hasMany[$attr] == $_thisClass) return true;\n \n $obj = new $this->hasMany[$attr]();\n\n if ($obj->hasOneOfThis( $_thisClass )) // 4) bidireccional 1..*\n {\n return true;\n }\n else\n {\n // 6) bidireccional *..*\n if ($obj->hasManyOfThis( $_thisClass ))\n {\n return $obj->belonsToClass( $_thisClass ); // problema: get_class(this) tira PO...\n }\n else // casos 3 o 5, como es unidireccional, toma el control la clase del lado que no es visto de la otra.\n {\n return true;\n }\n }\n }\n\n // Si llega aca deberia tirar un warning xq el atributo que me pasaron no es de una relacion...\n return false;\n \n }",
"public function setOwner(NotificationManager $owner);",
"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 }",
"function readOwner() { return($this->owner); }",
"public function __construct()\n {\n $this->dependency = new ReferencedEntity();\n }",
"abstract protected function getEntity();",
"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 setOwner(NotificationManager $owner)\n {\n $this->owner = $owner;\n }",
"public function setOwner(NotificationManager $owner)\n {\n $this->owner = $owner;\n }",
"public function __construct()\n {\n $this->entities = array();\n }",
"abstract public function setRecordEntity();",
"function isOwner() {\n return $this->getIsOwner();\n }",
"public function afterFind()\n {\n foreach ($this->fields as $f) {\n $this->owner->{$f} = Json::decode(($this->owner->{$f} ? $this->owner->{$f} : null));\n }\n }",
"function Product() {\r\n\t\treturn $this->owner;\r\n\t}",
"public function edit(Owner $owner)\n {\n //\n }",
"public function setup()\n {\n parent::setup();\n \n $formClass = $this->getChildFormClass();\n $collection = $this->getParentObject()->{$this->getRelationAlias()};\n $nbChilds = 0;\n $min = $this->getMinNbChilds();\n $max = $this->getMaxNbChilds();\n \n if ($min > $max && $max > 0)\n throw new RuntimeException('min cannot be greater than max.');\n \n // embed forms for each child element that is already persisted\n foreach ($collection as $childObject)\n {\n $form = new $formClass($childObject);\n $pk = $childObject->identifier();\n \n if ($childObject->exists() === false)\n throw new RuntimeException('Transient child objects are not supported.');\n \n if (count($pk) !== 1)\n throw new RuntimeException('Composite primary keys are not supported.');\n \n $this->embedForm(self::PERSISTENT_PREFIX.reset($pk), $form);\n $nbChilds += 1;\n }\n \n // embed as many additional forms as are needed to reach the minimum\n // number of required child objects\n for (; $nbChilds < $min; $nbChilds += 1)\n {\n $form = new $formClass($collection->get(null));\n $this->embedForm(self::TRANSIENT_PREFIX.$nbChilds, $form);\n }\n \n $this->validatorSchema->setPostValidator(new sfValidatorCallback(array(\n 'callback' => array($this, 'validateLogic'),\n )));\n }",
"public function setOwnerNameId($username) {\n $this->_owner = $username;\n }",
"public function owning(){ return $this->morphTo();}",
"protected function childEntities()\n {\n return null;\n }",
"public function setId_Entree($Id_Entree)\n{\n$this->Id_Entree = $Id_Entree;\n\nreturn $this;\n}",
"public function usesEntityWithSameName(){\n return true;\n }",
"protected function retrieveParent()\n {\n }",
"abstract protected function createEntityInstance();",
"public function get_owner_id()\n {\n return $this->get_default_property(self::PROPERTY_OWNER_ID);\n }",
"function __construct($aowner = null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n }",
"public function getOwnerId()\n {\n return $this->owner_id;\n }",
"public function getOwnerId()\n {\n return $this->owner_id;\n }",
"public function __construct(string $owner_eid)\n {\n $this->owner_eid = $owner_eid;\n }",
"function onBeforeCheckForParent($db, $format, &$object, &$parentObject) {\n\t}",
"protected function set_owner_id($owner_id)\n {\n $this->owner_id = $owner_id;\n }",
"public function attach($owner)\n\t{\n\t\tparent::attach($owner);\n\n\t\t$metadata = $this->owner->getMetadata();\n\n\t\t// Add many-many relation\n\t\t$metadata->addRelation($this->xrefRelationName, array(\n\t\t\tCActiveRecord::MANY_MANY,\n\t\t\t$this->xrefClass,\n\t\t\t$this->modelClass.'('.$this->ownerFkName.','.$this->indexFkName.')',\n\t\t));\n\t}",
"function setParent( $value )\r\n {\r\n if ( is_a( $value, \"eZImageCategory\" ) )\r\n {\r\n $this->ParentID = $value->id();\r\n }\r\n }",
"function set_parent($parent)\r\n {\r\n $this->parent = $parent;\r\n }"
] | [
"0.6673393",
"0.65395683",
"0.64460945",
"0.63913244",
"0.63568753",
"0.63568753",
"0.62809",
"0.626706",
"0.626706",
"0.626608",
"0.626608",
"0.626608",
"0.6264501",
"0.61453485",
"0.61453485",
"0.61453485",
"0.59189296",
"0.58522445",
"0.5807902",
"0.5784922",
"0.5742636",
"0.5714231",
"0.5610618",
"0.5582723",
"0.5573345",
"0.5567929",
"0.5554004",
"0.55177194",
"0.5504259",
"0.5485026",
"0.5485026",
"0.5468815",
"0.54664546",
"0.5455852",
"0.54496753",
"0.54496753",
"0.54173315",
"0.54157484",
"0.5413593",
"0.54094577",
"0.539827",
"0.5393876",
"0.5391679",
"0.53849244",
"0.53810334",
"0.5380737",
"0.5380737",
"0.5380737",
"0.5379264",
"0.535643",
"0.534195",
"0.53298324",
"0.5310953",
"0.5299275",
"0.5296666",
"0.5289508",
"0.5286103",
"0.5279026",
"0.52712154",
"0.52628064",
"0.52613854",
"0.5251195",
"0.52260244",
"0.52161413",
"0.52152014",
"0.5199638",
"0.5185595",
"0.51835644",
"0.51807463",
"0.51753587",
"0.51680255",
"0.5157903",
"0.51497805",
"0.51492095",
"0.51488626",
"0.51370203",
"0.51370203",
"0.51361895",
"0.5128457",
"0.51261437",
"0.5125776",
"0.5123529",
"0.51227474",
"0.5120297",
"0.51197904",
"0.51154995",
"0.5105103",
"0.5099553",
"0.5094081",
"0.50905967",
"0.5090396",
"0.50863826",
"0.50854623",
"0.5083413",
"0.5083413",
"0.5080584",
"0.5075635",
"0.5071662",
"0.5065609",
"0.50653607",
"0.5064327"
] | 0.0 | -1 |
return sprintf('Type: %d', get_called_class()::SHAPE_TYPE); | public static function getTypeDescription(): string
{
$class = get_called_class()::SHAPE_TYPE;
return <<<EOF
Type: $class
EOF;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_type() { return substr( strrchr( get_called_class(), '\\\\' ), 1 ); }",
"private function get_type() {\n\n\t}",
"public function shape(): string\n\t{\n\t\treturn \"Rectangle\";\n\t}",
"public function type_name(){\r\n \r\n //sends back the name of the class running\r\n return $this->type_name;\r\n \r\n }",
"abstract public function getTypeName(): string;",
"abstract protected function get_typeid();",
"private function GetType()\n\t\t{\n\t\t\t$type = get_called_class();\n\t\t\t$type = explode(\"\\\\\",$type);\n\t\t\t$type = $type[(count($type)-1)];\n\t\t\t\n\t\t\treturn $type;\n\t\t}",
"abstract public function type(): string;",
"public function get_type(): string;",
"public function __toString()\n {\n return get_called_class();\n }",
"public function getName()\n {\n return self::POINT;\n }",
"public function type() : string;",
"public function getShape1()\n {\n }",
"public function getMarkerFactoryClassStr();",
"public function type(): string;",
"function getType(): string;",
"function getType(): string;",
"abstract protected function get_typestring();",
"public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}",
"abstract public function getTypeName();",
"public static function getType(): string\n {\n return self::TYPE;\n }",
"public function type() { }",
"function positionTypeName( $position_type )\n{\n $database = eZDB::globalDatabase();\n $res_array = array();\n $name = false;\n\n $query= \"SELECT Name FROM eZClassified_PositionType WHERE ID='$position_type'\";\n $database->array_query( $res_array, $query );\n if ( count( $res_array ) < 0 )\n die( \"eZPosition::positionTypeName(): No position type found with id=$position_type\" );\n else if ( count( $res_array ) == 1 )\n {\n $name = $res_array[0][\"Name\"];\n }\n else\n die( \"eZPosition::positionTypeName(): Found more than one position type with id=$position_type\" );\n\n return $name;\n}",
"function _get_type() {\n\t\treturn $this->type();\n\n\t}",
"public function toString()\n {\n return __CLASS__;\n }",
"function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }",
"public static function className() : string {\n return get_called_class();\n }",
"function getType()\n {\n return get_class($this);\n }",
"function getName()\n {\n return get_class($this);\n }",
"function getShape() { return $this->_shape; }",
"public function appliesToType(): string\n {\n return $this->requireConstant('TYPE_CLASS');\n }",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function workType(): string\n {\n return 'type';\n }",
"public function __toString() {\n\t\treturn __CLASS__ . '(' . $this->type . ')';\n\t}",
"public function getName(){\n\t\treturn get_class($this);\n\t}",
"abstract public function getType(): int;",
"abstract public function type();",
"abstract public function type();",
"public function getType()\n {\n return $this->i18n_singular_name();\n }",
"function getType() ;",
"function getType() ;",
"function getType() ;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function getType(): string;",
"public function __toString()\n {\n return get_called_class()\n . \"[\"\n . \"{$this->getDimension()},\"\n . \"{$this->getCoordinate()}\"\n . \"]\";\n }",
"function type() {\n\t\treturn Inflector::underscore(str_replace('model', '', strtolower(get_class($this))));\n\t}",
"public function getTypeName(): string;",
"public static function getType()\n {\n return substr(get_called_class(), 0, -4); // Remove 'List'.\n }",
"public function get_type();",
"function getClass() {\n\t\treturn $this->classname ? $this->classname : \"theme\".\"1\";//rand(1, 6);\n\t}",
"public function shapeString() : string\n {\n return (string) $this->m . ' x ' . (string) $this->n;\n }",
"function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}",
"public function get_type_name() { \n\n\t\tswitch ($this->type) { \n\t\t\tcase 'xml-rpc': \n\t\t\tcase 'rpc':\n\t\t\t\treturn _('API/RPC');\n\t\t\tbreak;\n\t\t\tcase 'network':\n\t\t\t\treturn _('Local Network Definition');\n\t\t\tbreak;\n\t\t\tcase 'interface':\n\t\t\t\treturn _('Web Interface');\n\t\t\tbreak;\n\t\t\tcase 'stream':\n\t\t\tdefault: \n\t\t\t\treturn _('Stream Access');\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}",
"abstract public function type(): int;",
"public function getClassName()\n {\n return __CLASS__;;\n }",
"function toString() {\n\t\treturn get_class ( $this );\n\t}",
"function initiateTypeName( $initiate_type )\n{\n $database = eZDB::globalDatabase();\n\n $res_array = array();\n $name = false;\n\n $query= \"SELECT Name FROM eZClassified_InitiateType WHERE ID='$initiate_type'\";\n $database->array_query( $res_array, $query );\n if ( count( $res_array ) < 0 )\n die( \"eZPosition::initiateTypeName(): No initiate type found with id='$initiate_type'\" );\n else if ( count( $res_array ) == 1 )\n {\n $name = $res_array[0][\"Name\"];\n }\n else\n die( \"eZPosition::initiateTypeName(): Found more than one initiate type with id='$initiate_type'\" );\n\n return $name;\n}",
"public function getType() : string;",
"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()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}",
"public static function label()\n {\n return Str::singular(class_basename(get_called_class()));\n }",
"public function getName()\n {\n return __CLASS__;\n }",
"function toString()\n\t{\n\t\treturn get_class($this);\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 getType(){ }",
"public function get_type()\n {\n }",
"public function __toString()\r\n {\r\n return __CLASS__;\r\n }",
"public function __toString()\r\n {\r\n return __CLASS__;\r\n }",
"function getShape() { return $this->_shape; }",
"public abstract function type();",
"public abstract function type();",
"public function __toString()\n {\n return get_called_class().'('.$this->_id.')';\n }",
"public function getType(): string\n {\n return self::$BOX_TYPE;\n }",
"public function getType()\n {\n return $this->_glue;\n }",
"protected function _getType()\n\t{\n\t\t$class = preg_replace('/.*\\\\\\([^\\\\\\]+)$/', '$1', get_called_class());\n\t\t$class = preg_replace('/C(.*)FormElement/i', '$1', $class);\n\t\t$class = strtolower($class);\n\n\t\treturn $class;\n\t}",
"#[Pure]\n public function getType() {}",
"public function type();",
"public function type();",
"public function type();",
"public function type();",
"public function getType(): string\n {\n }",
"function getType()\t { return $this->type;\t }"
] | [
"0.678919",
"0.65449953",
"0.65407544",
"0.65268636",
"0.64523995",
"0.6403081",
"0.64014417",
"0.63031447",
"0.62598175",
"0.625583",
"0.6250725",
"0.61975014",
"0.6178347",
"0.61620945",
"0.61575496",
"0.61400235",
"0.61400235",
"0.6136779",
"0.61318934",
"0.61282885",
"0.6084323",
"0.60727686",
"0.6071597",
"0.60546124",
"0.6014108",
"0.6013414",
"0.6005854",
"0.6002896",
"0.5999742",
"0.59943867",
"0.599314",
"0.5989356",
"0.5979964",
"0.59784436",
"0.5977052",
"0.5973785",
"0.5953195",
"0.5953195",
"0.5951091",
"0.594826",
"0.59481597",
"0.59471166",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.59465337",
"0.5934389",
"0.59303117",
"0.5930082",
"0.5929653",
"0.5913019",
"0.59057325",
"0.5887412",
"0.58762854",
"0.58706516",
"0.58664876",
"0.58637536",
"0.5861235",
"0.58610576",
"0.5858292",
"0.58473915",
"0.58473915",
"0.58473915",
"0.58473915",
"0.58473915",
"0.58473915",
"0.58408505",
"0.58396894",
"0.58359915",
"0.5822348",
"0.5818709",
"0.5818512",
"0.5818361",
"0.5818361",
"0.5818358",
"0.5817771",
"0.5815621",
"0.5815621",
"0.5814492",
"0.58116704",
"0.58116704",
"0.5809148",
"0.58004785",
"0.57863104",
"0.5783017",
"0.5780141",
"0.5779115",
"0.5779115",
"0.5779115",
"0.5779115",
"0.5777787",
"0.5771628"
] | 0.68682086 | 0 |
Register the package routes. | private function registerRoutes()
{
Route::group($this->routeConfiguration(), function () {
$this->loadRoutesFrom(__DIR__.'/Http/routes.php');
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}",
"private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }",
"protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }",
"protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }",
"protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }",
"public function registerRoutes() {\n $this->addRoute('default');\n }",
"protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('dashkit.path'),\n 'middleware' => config('dashkit.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }",
"public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}",
"public function register_routes() {\n $namespace = 'junglehunter/v1';\n register_rest_route(\n $namespace,\n '/all',\n array(\n 'methods' => 'GET',\n 'callback' => array($this, 'junglehunter_get_all')\n )\n );\n }",
"protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('paystacksubscription.webhook_path'),\n 'namespace' => 'Digikraaft\\PaystackSubscription\\Http\\Controllers',\n 'as' => 'paystack.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }",
"protected function registerRoutes(): void\n {\n Route::group([\n 'prefix' => 'fairqueue',\n 'namespace' => 'Aloware\\FairQueue\\Http\\Controllers',\n 'middleware' => config('fair-queue.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }",
"protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('documentation.domain', null),\n 'prefix' => config('documentation.path'),\n 'namespace' => 'Sonover\\Docs\\Http\\Controllers',\n 'middleware' => config('documentation.middleware', 'web'),\n ], function () {\n Route::get('/', 'DocumentationController@showRootPage');\n Route::get('{version}/{page?}', 'DocumentationController@show');\n });\n }",
"public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}",
"protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }",
"protected function defineRoutes()\n {\n $this->register(ImageServiceProvider::class);\n if (! $this->app->routesAreCached()) {\n $router = app('router');\n $router->group([\n 'namespace' => 'Socieboy\\Jupiter\\Http\\Controllers',\n 'middleware' => 'web',\n ], function ($router) {\n require __DIR__.'/../Http/routes.php';\n });\n }\n }",
"public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}",
"public function register_routes() {\n\n\t\t// Get current user per the JWT token. Depends on JWT plugin.\n\t\tregister_rest_route(\n\t\t\t'wpcampus',\n\t\t\t'/auth/user/',\n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => [ $this, 'get_current_user' ],\n\t\t\t]\n\t\t);\n\t}",
"public static function register_endpoints() {\n\t\t\n $namespace = sprintf( 'wp/%s', API_VERSION );\n \n // Create a new blank package\n register_rest_route( $namespace, API_PREFIX . 'package/add', array(\n 'methods' => 'GET',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'add' ),\n ) );\n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/delete', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'delete' ),\n 'args' => array(\n 'post_ids' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package post_ids',\n ) \n )\n ) );\n \n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/update', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'update' ),\n 'args' => array(\n 'data' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package form',\n ) \n )\n ) );\n\t}",
"public function routes()\n {\n register_rest_route('can', '/donation-forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'fundraisingPages'\n ],\n ]);\n\n register_rest_route('can', '/forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'forms'\n ],\n ]);\n\n register_rest_route('can', '/petitions', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'petitions'\n ],\n ]);\n\n register_rest_route('can', '/person/add', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'addPerson'\n ],\n ]);\n }",
"public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}",
"protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }",
"protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }",
"protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }",
"public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}",
"public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}",
"public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }",
"protected function registerRoutes(): void\n {\n Route::prefix('permission_makr')\n ->namespace('AlvariumDigital\\\\PermissionsMakr\\\\Http\\\\Controllers')\n ->as('permission_makr.')\n ->middleware(config('permission_makr.routes_middleware'))\n ->group(__DIR__ . '/routes/web.php');\n }",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}",
"protected function registerRoutes()\n {\n if (EfaasProvider::$registersRoutes) {\n Route::group([\n 'as' => 'efaas.',\n 'namespace' => '\\Javaabu\\EfaasSocialite\\Http\\Controllers',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n });\n }\n }",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\n }",
"public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}",
"public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }",
"protected function registerRoutes()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n Route::group([\n 'prefix' => config('laratrust.panel.path'),\n 'namespace' => 'Laratrust\\Http\\Controllers',\n 'middleware' => config('laratrust.panel.middleware', 'web'),\n ], function () {\n Route::redirect('/', '/'. config('laratrust.panel.path'). '/roles-assignment');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }",
"protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\n }",
"public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}",
"protected function registerRouteBindings()\n {\n //\n }",
"public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}",
"public function register()\n {\n if (!file_exists(base_path(self::FILE_NAME))) {\n file_put_contents(base_path(self::FILE_NAME), sprintf(\"<?php%s%suse MatthewMoray\\Assessment\\Route;%s%s\", PHP_EOL, PHP_EOL, PHP_EOL, PHP_EOL)); \n }\n Route::namespace($this->namespace)\n ->group(base_path(self::FILE_NAME));\n }",
"protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('knet.path'),\n 'namespace' => 'Asciisd\\Knet\\Http\\Controllers',\n 'as' => 'knet.',\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');\n });\n }",
"protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->prefix('nova-vendor/media-library')\n ->group(__DIR__.'/../routes/api.php');\n }",
"protected function registerRoutes(): void\n {\n Route::group([\n 'domain' => $this->app['config']['support-chat.domain'] ?? null,\n 'prefix' => $this->app['config']['support-chat.path'] ?? null,\n 'name' => 'support-chat.',\n 'namespace' => 'TTBooking\\\\SupportChat\\\\Http\\\\Controllers',\n 'middleware' => $this->app['config']['support-chat.middleware'] ?? 'web',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n\n require __DIR__.'/../routes/channels.php';\n }",
"public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}",
"public function register_routes( Collection $routes );",
"protected function registerRoutes()\n {\n $middleware = ['exposable.signature', 'exposable.expire', 'exposable.guard'];\n\n if (! empty(config('exposable.middleware'))) {\n $middleware = array_merge($middleware, (array) config('exposable.middleware'));\n }\n\n $uri = config('exposable.url-prefix').'/{exposable}/{id}';\n\n $this->app['router']->get($uri, 'ArjanWestdorp\\Exposable\\Http\\Controllers\\ExposableController@show')->middleware($middleware)->name('exposable.show');\n }",
"protected function configureRoutes()\n {\n if (Fortify::$registersRoutes) {\n Route::group([\n 'namespace' => 'Laravel\\Fortify\\Http\\Controllers',\n 'domain' => config('fortify.domain', null),\n 'prefix' => config('fortify.prefix'),\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/routes.php');\n });\n }\n }",
"protected function registerRoutes()\n {\n if (TwilioVerify::$registersRoutes) {\n Route::group([\n 'prefix' => config('twilio-verify.path'),\n 'namespace' => 'IvanSotelo\\TwilioVerify\\Http\\Controllers',\n 'as' => 'twilio-verify.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }\n }",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/location', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'update_user_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/quiz-result', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'save_quiz_result' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/ranking/(?P<park>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_ranking' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<slug>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_point' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'set_point_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/option/(?P<key>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_option' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/user', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_user' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/photo', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'upload_photo' ),\n\t\t\t)\n\t\t) );\n\t}",
"public function register_routes() {\n\n\t\t\t$collection_params = $this->get_collection_params();\n\t\t\t$schema = $this->get_item_schema();\n\n\t\t\t$get_item_args = array(\n\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t);\n\n\t\t\tregister_rest_route(\n\t\t\t\t$this->namespace,\n\t\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)/' . $this->rest_sub_base,\n\t\t\t\tarray(\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'description' => esc_html__( 'User ID', 'learndash' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'get_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'update_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'update_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to add to User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'delete_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'delete_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to remove from User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function register()\n {\n Route::group([\n 'namespace' => 'WooCommerce\\ProductAttributeGroup\\Controllers'\n ], function () {\n require themosis_path('plugin.woocommerce-product-attribute-group.resources').'routes.php';\n });\n }",
"public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/totals',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_totals' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_totals_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}",
"public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }",
"function register_rest_routes() {\n\tif ( class_exists( '\\WP_REST_Controller' ) ) {\n\t\tinclude_once __DIR__ . '/wprest-shortcodes-controller.php';\n\t\t$controller = new rest\\WPREST_Shortcodes_Controller();\n\t\t$controller->register_routes();\n\t}\n}",
"public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}",
"public function register_routes() {\n\n register_rest_route( $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this->service, 'create' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( true ),\n 'accept_json' => true\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this->service, 'get' ),\n 'permission_callback' => array( $this, 'getAllUserCheck' ),\n 'args' => array(\n 'context' => array(\n 'default' => 'view',\n )\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this->service, 'update' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( false ),\n 'accept_json' => true\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this->service, 'delete' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => array(\n 'force' => array(\n 'default' => false,\n ),\n ),\n ),\n ) );\n }",
"public function registerRoutes()\n {\n $namespace = $this->getNameSpace();\n\n register_rest_route($namespace, '/' . self::ROUTE_UPDATE_CALLBACK, [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'updateTrapp' ),\n 'permission_callback' => array( $this, 'updateTrappPermissions' ),\n ]);\n }",
"private function registerApiRoutes(): void\n {\n $detect = app(Detect::class);\n $monitor = app(Monitor::class);\n\n $type = Settings::TYPE__ROUTE_API_FILE;\n if (!$detect->resourceEnabled($type)) {\n return;\n }\n\n $monitor->startTimer('register ' . $type);\n\n foreach ($detect->getRouteApiFiles() as $path) {\n Route::middleware($detect->routeApiMiddleware())\n ->group($detect->basePath($path));\n }\n $monitor->incRegCount($type, count($detect->getRouteApiFiles()));\n\n $monitor->stopTimer('register ' . $type);\n }",
"public function register_routes() {\n\t\tparent::register_routes();\n\n\t\t// Add a route for listing variations without specifying the parent product ID.\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/variations',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}",
"public function register()\n {\n include __DIR__ . '/../routes/admin.php';\n include __DIR__ . '/../routes/api.php';\n include __DIR__ . '/../routes/manage.php';\n include __DIR__ . '/../routes/web.php';\n }",
"protected function routes()\n\t{\n\t\tif ($this->app->routesAreCached()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tRoute::middleware(['nova', Authorize::class])\n\t\t\t->prefix('nova-vendor/nova-permissions')\n\t\t\t->group(__DIR__ . '/../routes/api.php');\n\t}",
"public function register_routes() {\n\t\t$public_post_types = $this->post_type_helper->get_public_post_types();\n\n\t\tforeach ( $public_post_types as $post_type ) {\n\t\t\t\\register_rest_field( $post_type, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post' ] ] );\n\t\t}\n\n\t\t$public_taxonomies = $this->taxonomy_helper->get_public_taxonomies();\n\n\t\tforeach ( $public_taxonomies as $taxonomy ) {\n\t\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\t\t$taxonomy = 'tag';\n\t\t\t}\n\t\t\t\\register_rest_field( $taxonomy, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_term' ] ] );\n\t\t}\n\n\t\t\\register_rest_field( 'user', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_author' ] ] );\n\n\t\t\\register_rest_field( 'type', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post_type_archive' ] ] );\n\t}",
"function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}",
"public static function register(): void\n {\n if (! Route::hasMacro('apiMediaResource')) {\n Route::macro('apiMediaResource', function ($name, $controller) {\n Route::get(\"$name\", \"$controller@index\")->name(\"$name.index\");\n Route::get(\"$name/{media}\", \"$controller@show\")->where('media', '.*')->name(\"$name.show\");\n Route::patch(\"$name/{media}/rename\", \"$controller@rename\")->where('media', '.*')->name(\"$name.rename\");\n Route::post(\"$name/{media}/copy\", \"$controller@copy\")->where('media', '.*')->name(\"$name.copy\");\n Route::patch(\"$name/{media}/move\", \"$controller@move\")->where('media', '.*')->name(\"$name.move\");\n Route::post(\"$name/{media}/download\", \"$controller@download\")->where('media', '.*')->name(\"$name.download\");\n Route::delete(\"$name/delete\", \"$controller@delete\")->name(\"$name.delete\");\n Route::post(\"$name/upload\", \"$controller@upload\")->name(\"$name.upload\");\n Route::post(\"$name/add\", \"$controller@add\")->name(\"$name.add\");\n Route::post(\"$name/zip\", \"$controller@zip\")->name(\"$name.zip\");\n });\n }\n }",
"function registerEndpoints()\n{\n $namespace = 'travel-review-app/v1';\n\n register_rest_route(\n $namespace,\n '/destinations-default-wordpress',\n [\n 'methods' => 'GET',\n 'callback' => 'listDestinationsDefaultWordPress',\n ]\n );\n}",
"protected function routes()\n {\n if ($this->app->routesAreCached()) {\n return;\n }\n\n Route::middleware(['nova', Authorize::class])\n ->namespace('Energon7\\MenuBuilder\\Http\\Controllers')\n ->prefix('nova-vendor/menu-builder')\n ->group(__DIR__.'/../routes/api.php');\n }"
] | [
"0.7811851",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7811813",
"0.7660386",
"0.75480694",
"0.7515003",
"0.74692124",
"0.74692124",
"0.7394859",
"0.73744756",
"0.73568463",
"0.7339587",
"0.7324571",
"0.7323311",
"0.7321925",
"0.7302012",
"0.7278249",
"0.72775215",
"0.72409636",
"0.7239761",
"0.7235047",
"0.7224016",
"0.7208857",
"0.7165933",
"0.7155532",
"0.7155532",
"0.71539706",
"0.71470064",
"0.7144519",
"0.7126134",
"0.71154374",
"0.7092797",
"0.70921695",
"0.7080419",
"0.70789087",
"0.7056346",
"0.70557684",
"0.7044308",
"0.69591033",
"0.6951999",
"0.6950797",
"0.6922706",
"0.69098777",
"0.68916005",
"0.68825334",
"0.68819606",
"0.68680423",
"0.68675715",
"0.68546426",
"0.6851418",
"0.6842297",
"0.68419296",
"0.6828446",
"0.6806868",
"0.6798682",
"0.67714",
"0.6771357",
"0.6767315",
"0.6753253",
"0.6746628",
"0.67419595",
"0.6704903",
"0.6689892",
"0.6672217",
"0.66669047",
"0.6647758",
"0.66188866",
"0.66149294"
] | 0.73670006 | 42 |
Get the SmsUp route group configuration array. | private function routeConfiguration()
{
return [
'domain' => null,
'namespace' => 'SquareetLabs\LaravelSmsUp\Http\Controllers',
'prefix' => 'smsup'
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModuleRoutes()\n {\n return isset($this->config['module']['routes']) ? $this->config['modules']['routes'] : [];\n }",
"private function channelRouteConfiguration(): array\n {\n return [\n 'domain' => config('messenger.routing.channels.domain'),\n 'prefix' => config('messenger.routing.channels.prefix'),\n 'middleware' => $this->mergeApiMiddleware(config('messenger.routing.channels.middleware')),\n ];\n }",
"private function routeConfiguration()\n {\n return [\n 'prefix' => config('faithgen-events.prefix'),\n 'middleware' => config('faithgen-events.middlewares'),\n ];\n }",
"public function getGroupConfig()\n {\n $groups = [];\n $config = $this->getAllConfigInfo();\n\n foreach ($config as $process) {\n $groupName = $process['group'];\n\n if (! isset($groups[$groupName])) {\n $groups[$groupName] = [\n 'name' => $groupName,\n 'priority' => $process['group_prio'],\n 'inuse' => $process['inuse'],\n 'processes' => [],\n ];\n }\n\n $groups[$groupName]['processes'][$process['name']] = [\n 'name' => $process['name'],\n 'priority' => $process['process_prio'],\n 'autostart' => $process['autostart'],\n ];\n }\n\n return $groups;\n }",
"public function getRouteGroup()\n {\n return isset($this->route_group) ? $this->route_group : null;\n }",
"public function getRoutes(): array\r\n {\r\n return $this->routes;\r\n }",
"public function getRoutes(): array\r\n {\r\n return $this->routes;\r\n }",
"protected function getUsps()\n {\n $setting = Mage::getStoreConfig('usps/general/usps');\n $usps = array();\n if ($setting)\n {\n $setting = unserialize($setting);\n\n if (is_array($setting))\n {\n foreach ($setting as $usp)\n {\n $usps[] = current($usp);\n }\n return $usps;\n }\n return false;\n }\n }",
"public function getSectionGroupsUrl()\n {\n return $this->getProperty(\"SectionGroupsUrl\");\n }",
"public function getRoutes() {\n \treturn $this->routes;\n }",
"function recurringdowntime_get_servicegroup_cfg($servicegroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"servicegroup\") {\n continue;\n }\n }\n if ($servicegroup && !(strtolower($schedule[\"servicegroup_name\"]) == strtolower($servicegroup))) {\n continue;\n }\n if (array_key_exists('servicegroup_name', $schedule)) {\n if (is_authorized_for_servicegroup(0, $schedule[\"servicegroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}",
"public function routes()\r\n {\r\n return $this->routes;\r\n }",
"public function getRoutes(){\n return $this->routes;\n }",
"public function getRoutes(): array\n\t{\n\t\treturn $this->_routes;\n\t}",
"private function routeConfiguration()\n {\n return [\n 'domain' => config('flowdash.domain'),\n 'namespace' => 'App\\FlowDash\\Http\\Controllers',\n 'prefix' => config('flowdash.path', 'flowdash'),\n 'middleware' => 'flowdash',\n ];\n }",
"function getRoutes()\n {\n return $this->_routes;\n }",
"public function getConfig()\r\n {\r\n\r\n $config = array(\r\n 'enabled' => $this->_scopeConfig->getValue('vicomage_megamenu_setting/accordion_menu/enabled',\r\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE),\r\n 'group' => $this->_scopeConfig->getValue('vicomage_megamenu_setting/accordion_menu/group',\r\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE),\r\n\r\n );\r\n return $config;\r\n }",
"public function navGroup() {\n return $this->app[\"config\"]->get(\"laravel-admin::nav_group\");\n }",
"public function getAclGroups()\n {\n $aclGroupsConfig = include(__DIR__ . '/Acl/AclGroupsConfig.php');\n return $aclGroupsConfig;\n }",
"#[Pure]\n public function groups(): array\n {\n return array_keys($this->routes);\n }",
"function getRoutes() {\n return $this->routes;\n }",
"public function getRoutes ()\n {\n return $this->routes;\n }",
"public function getRoutes()\n {\n if ($this->_routes === null) {\n $filename = 'routes.' . (!$this->_subdomain ? 'php' : $this->_subdomain . '.php');\n $path = App::getInstance()->getPath('configs') . '/' . $filename;\n include $path;\n $this->_routes = $routes;\n }\n\n return $this->_routes;\n }",
"public static function routes()\n {\n return self::$routes;\n }",
"public function getRoutes()\n {\n return $this->routes;\n }",
"public function getRoutes()\n {\n return $this->routes;\n }",
"public function getRoutes()\n {\n return $this->routes;\n }",
"public function getRoutes()\n {\n return $this->routes;\n }",
"public function getRoutes()\n {\n return $this->routes;\n }",
"public function getRoutes()\n {\n return $this->routes;\n }",
"static function routes() {\n return self::$_routes;\n }",
"private function _getUPGroups()\n\t{\n\t\ttry{\n\t\t\t$preferences = trim(Factory::service(\"UserPreference\")->getOption(Core::getUser(), self::PREFERENCE_PARAM_NAME));\n\t\t\t$return = ($preferences === '' ? array() : json_decode($preferences,true));\n\t\t\treturn $return;\n\t\t}\n\t\tcatch(Exception $ex){\n\t\t\treturn array();\n\t\t}\n\t}",
"public function getAllConfigs()\r\n\t{\r\n\t\treturn $this->arrConfig;\r\n\t}",
"public function getRoutes() {\n return $this->routes;\n }",
"public function getRoutes() {\n return $this->routes;\n }",
"public function getRoutes() {\n return $this->routes;\n }",
"public function getRoutes() {\n\t\treturn $this->routes;\n\t}",
"public function getConfig()\n {\n if (!$this->config->getIsActive()) {\n return [];\n }\n\n return [\n 'payment' => [\n 'collector_checkout' => [\n 'image_remove_item' => $this->getViewFileUrl('Webbhuset_CollectorCheckout::images/times-solid.svg'),\n 'image_plus_qty' => $this->getViewFileUrl('Webbhuset_CollectorCheckout::images/plus-solid.svg'),\n 'image_minus_qty' => $this->getViewFileUrl('Webbhuset_CollectorCheckout::images/minus-solid.svg'),\n 'newsletter_url' => $this->getNewsletterUrl(),\n 'reinit_url' => $this->getReinitUrl(),\n 'update_url' => $this->getUpdateUrl(),\n 'delivery_checkout' => $this->config->getIsDeliveryCheckoutActive(),\n ],\n ],\n ];\n }",
"public function getRoutes()\n\t{\n\t\treturn $this->routes;\n\t}",
"public function getRoutes()\n\t{\n\t\treturn $this->routes;\n\t}",
"public function getRoutes()\n\t{\n\t\treturn $this->routes;\n\t}",
"public function getRoutes() {\n\t\treturn $this->_routes;\n\t}",
"public static function getRoutes(): array\n {\n return self::$routes;\n }",
"function router_config_items()\n{\n return array();\n}",
"public function getRoutes() {\n\n\t\treturn $this->_routes;\n\t}",
"public function configureSequence(): array\n {\n return $this->config['configureSequence'];\n }",
"public function getRouteConfig()\n {\n return [\n [\n 'name' => 'login',\n 'path' => '/login',\n 'middleware' => [\n SlimFlashMiddleware::class,\n LoginPageAction::class,\n ],\n 'allowed_methods' => ['GET', 'POST'],\n ],\n ];\n }",
"public function retrieve()\n {\n return (array) $this->routes;\n }",
"public function getRoutes() {\n\n\t\t// Hydrate or generate application routes.\n\t\t$routesCacheKey = \"__routes__\";\n\t\t$routes = Celsus_Cache_Manager::cache($this->_bootstrapCacheName)->shared()->load($routesCacheKey);\n\t\tif (!$routes) {\n\n\t\t\t// Create a new route config object\n\t\t\t$routes = new Zend_Config(array(), true);\n\n\t\t\t// Load routes\n\t\t\t$routesPath = CONFIG_PATH . '/routes';\r\n\t\t\t$files = scandir($routesPath);\r\n\n\t\t\t// Iterate all the YAML files in the directory and merge the configs.\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\t$routes->merge(new Zend_Config_Yaml($routesPath . \"/$file\"));\r\n\t\t\t}\r\n\r\n\t\t\t$routes->setReadOnly();\n\r\n\t\t\tCelsus_Cache_Manager::cache($this->_bootstrapCacheName)->shared()->save($routes, $routesCacheKey, array('routes'));\n\t\t}\n\n\t\treturn $routes;\n\t}",
"public function getConfigArray() {}",
"public function getRoutes() {\n\t\treturn array_values($this->routes);\n\t}",
"public static function getRoutes()\n {\n return self::$routes;\n }",
"public static function getRoutes()\n {\n return self::$routes;\n }",
"public function getGroupNames()\n {\n $result = array();\n if (isset($this->configHandle->gateways)) {\n foreach ($this->configHandle->gateways->children() as $tag => $gw_group) {\n if ($tag == \"gateway_group\") {\n $result[] = (string)$gw_group->name;\n }\n }\n }\n return $result;\n }",
"protected function routeConfiguration()\n {\n return [\n 'namespace' => $this->namespace,\n 'as' => 'planet.',\n 'prefix' => Planet::path(),\n 'middleware' => ['web'],\n ];\n }",
"public function to_array() {\n\t\t$config = array();\n\t\t\n\t\tforeach( $this->sections as $id => $section ) {\n\t\t\t$config[$id] = $section->to_array();\n\t\t}\n\t\t\n\t\treturn $config;\n\t}",
"function recurringdowntime_get_hostgroup_cfg($hostgroup = false)\n{\n $cfg = recurringdowntime_get_cfg();\n $ret = array();\n foreach ($cfg as $sid => $schedule) {\n if (array_key_exists('schedule_type', $schedule)) {\n if ($schedule[\"schedule_type\"] != \"hostgroup\") {\n continue;\n }\n }\n if ($hostgroup && !(strtolower($schedule[\"hostgroup_name\"]) == strtolower($hostgroup))) {\n continue;\n }\n if (array_key_exists('hostgroup_name', $schedule)) {\n if (is_authorized_for_hostgroup(0, $schedule[\"hostgroup_name\"])) {\n $ret[$sid] = $schedule;\n }\n }\n }\n return $ret;\n}",
"protected function routeConfiguration(): array\n {\n return [\n 'namespace' => 'Philo\\ArtisanRemote\\Http\\Controllers',\n 'prefix' => config('artisan-remote.route_prefix', 'artisan-remote'),\n 'middleware' => Authenticate::class,\n ];\n }",
"public function getGatewayConfig() {\r\n return $this->gatewayConfig;\r\n }",
"public function getConfig()\n {\n return [\n 'payment' => [\n self::CODE => [\n // get setting values using events.xml section/group/field ids for path\n 'apiKey' => $this->helper->getConfig('payment/payio/integration/api_key'),\n 'apiTransactionPath' => $this->helper->getApiTransactionPath(),\n 'apiSettingsPath' => $this->helper->getApiSettingPath(),\n 'gatewayPath' => $this->helper->getGatewayPath(),\n 'checkoutUrl' => $this->helper->getCheckoutUrl(),\n 'paymentSuccessUrl' => $this->helper->getPaymentSuccessUrl(),\n 'currency' => $this->helper->getCurrentCurrencyCode(),\n 'cartTax' => $this->helper->getUKTaxRate(),\n 'shippingMethods' => $this->helper->getActiveShippingMethods()\n ]\n ]\n ];\n }",
"public function getRoutes() : array;",
"public function getRoutes() : array;",
"private function getConfig()\n {\n return [\n self::API_COUNTRY => [\n 'url' => 'https://restcountries.eu/rest/v2/',\n 'routes' => [\n 'name' => [\n 'route' => 'name',\n 'params' => [\n 'fullText' => 'bool'\n ],\n ],\n 'dialingCode' => [\n 'route' => 'callingcode',\n ],\n 'countryCode' => [\n 'route' => 'alpha',\n 'params' => [\n 'codes' => 'array'\n ],\n ],\n 'currency' => [\n 'route' => 'currency',\n ],\n 'languages' => [\n 'route' => 'lang',\n ],\n 'capital' => [\n 'route' => 'capital',\n ],\n 'region' => [\n 'route' => 'region',\n ],\n 'regionalbloc' => [\n 'route' => 'regionalbloc',\n ],\n ]\n ]\n ];\n }",
"public function getRouteList() {\n return $this->routes;\n }",
"protected function get_settings_array() {\n\t\t$plugin_path = Tribe__Events__Main::instance()->plugin_path;\n\t\treturn (array) include $plugin_path . 'src/admin-views/tribe-options-timezones.php';\n\t}",
"final public static function getRouter(){\n $url = self::getUrl();\n\n $path = array(\n 'route' => $url[0],\n 'controller' => $url[1],\n 'action' => $url[2],\n );\n\n if(empty($path['route'])){\n $path['route'] =self::getConfig()->path->router_default;\n }\n\n\n return $path;\n }",
"public function getRoutes() {\n return array();\n }",
"private function getBreakPointConfig($breakpoint_group) {\n $data = [];\n $breakpoint_group_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/breakpoint_groups');\n foreach ($breakpoint_group_config_files as $file) {\n $breakpoint_group_config = parent::getConfig($file);\n if ($breakpoint_group_config['machine_name'] == $breakpoint_group) {\n // return $breakpoint_group_config;\n foreach ($breakpoint_group_config['breakpoints'] as $map) {\n $data[$map['machine_name']] = $map;\n }\n break;\n }\n }\n return $data;\n }",
"public function getStmpOptions()\n {\n $stmpOptionsArr = array(\n 'host' => 'mx1.hostinger.com.br',\n 'connection_class' => 'login',\n 'connection_config' => array(\n 'ssl' => 'tls',\n 'username' => '[email protected]',\n 'password' => '92557234'\n ),\n 'port' => 587,\n );\n\n return $stmpOptionsArr;\n }",
"protected function getOptionsGridConfig()\n {\n return [\n 'children' => [\n 'record' => [\n 'children' => [\n CustomOptions::CONTAINER_OPTION => [\n 'children' => [\n CustomOptions::CONTAINER_COMMON_NAME => $this->getCommonContainerConfig(),\n CustomOptions::CONTAINER_TYPE_STATIC_NAME => $this->getStaticTypeContainerConfig(20),\n ]\n ],\n ]\n ]\n ]\n ];\n }",
"public static function get_allowed_settings_by_group()\n {\n }",
"protected function getAwsConfig()\n {\n return [\n 'region' => $this->region,\n 'bucket' => $this->bucket,\n 'version' => 'latest',\n 'credentials' => [\n 'key' => $this->key,\n 'secret' => $this->secret\n ]\n ];\n }",
"public static function load_routes_conf() {\n $routes_config = include(CONFIGPATH.'routes.conf.php');\n return $routes_config;\n }",
"public function getSitemapConfig() {\n\t\treturn $this->sitemapConfig;\n\t}",
"public function getSettings()\n {\n $settings_default = config('topredmedia-saml.default');\n $settings_isp = config('topredmedia-saml.endpoints.' . $this->isp, null);\n if (is_null($settings_isp)) {\n throw new ISPSettingsNotFoundException('No settings for endpoint ' . $this->isp);\n }\n $settings = array_merge($settings_default, $settings_isp);\n\n // Alter the settings to always use default routes for this package\n $saml_base_url = config('app.url', '') . config('topredmedia-saml.route_prefix', '') . '/' . $this->isp . '/';\n\n $settings['sp']['assertionConsumerService']['url'] = $saml_base_url . 'acs';\n $settings['sp']['singleLogoutService']['url'] = $saml_base_url . 'sls';\n $settings['sp']['entityId'] = $saml_base_url.'metadata';\n\n return $settings;\n }",
"private function getRouteObjectConfig() {\n $r = new ReflectionObject($this->object);\n $prop = $r->getProperty('_config');\n $prop->setAccessible(true);\n return $prop->getValue($this->object);\n }",
"function getRoute() {\n\t\treturn $this->config()->route;\n\t}",
"protected function getRouteParams(): array {\n return [];\n }",
"public function getSections(): array {\n\t\t\n\t\tif (isset($this->sections)) {\n\t\t\treturn $this->sections;\n\t\t}\n\t\t\n\t\t$this->sections = [];\n\t\t\n\t\t$sections = elgg_extract('sections', $this->config, []);\n\t\tforeach ($sections as $section) {\n\t\t\t$this->sections[] = new Section($section);\n\t\t}\n\t\t\n\t\treturn $this->sections;\n\t}",
"private function getSessionConfig()\n {\n $sessionCreds = $this->getSessionCreds();\n $senderCreds = $sessionCreds->getSenderCredentials();\n $endpoint = $sessionCreds->getEndpoint();\n\n $config = [\n 'sender_id' => $senderCreds->getSenderId(),\n 'sender_password' => $senderCreds->getPassword(),\n 'endpoint_url' => $endpoint->getEndpoint(),\n 'verify_ssl' => $endpoint->getVerifySSL(),\n 'session_id' => $sessionCreds->getSessionId(),\n 'logger' => $sessionCreds->getLogger(),\n 'log_formatter' => $sessionCreds->getLogMessageFormat(),\n 'log_level' => $sessionCreds->getLogLevel(),\n ];\n\n return $config;\n }",
"public function getRoutes(): array\r\n {\r\n return [\r\n [\r\n 'name' => 'admin/post/admin',\r\n 'path' => '/admin',\r\n 'middleware' => 'Admin\\Action\\Post\\Admin',\r\n 'allowed_methods' => ['POST']\r\n ],\r\n [\r\n 'name' => 'admin/form/admin',\r\n 'path' => '/admin/form[/{id:\\d+}]',\r\n 'middleware' => 'Admin\\Action\\Form\\Admin',\r\n 'allowed_methods' => ['GET']\r\n ],\r\n [\r\n 'name' => 'admin/user/view/resultset',\r\n 'path' => '/admin/user/resultset',\r\n 'middleware' => 'Admin\\User\\Action\\View\\ResultSet',\r\n 'allowed_methods' => ['GET']\r\n ]\r\n ];\r\n }",
"private function getExposedRoutes() : array\n {\n $routes = [];\n $routeCollection = $this->router->getRouteCollection();\n\n foreach ($routeCollection as $name => $route) {\n if ($route->hasOption('sitemap') === true\n && $route->getOption('sitemap') === true\n ) {\n $routes[] = $name;\n }\n }\n\n return $routes;\n }",
"public function getConfig(): array\n {\n return $this->_config;\n }",
"public function getSettings(): array\n {\n return [];\n }",
"static public function routes()\n\t{\n\t\tglobal $core;\n\t\tstatic $constructed;\n\n\t\tif (!$constructed)\n\t\t{\n\t\t\t$constructed = true;\n\n\t\t\tself::$routes += $core->configs->fuse('routes', array(__CLASS__, 'routes_constructor'));\n\t\t}\n\n\t\treturn self::$routes;\n\t}",
"public function getRoutes()\n {\n return $this->_routeList->toArray();\n }",
"protected function getGroup(ReflectionClass $reflectClass): array\n {\n $group = [\n 'prefix' => '',\n 'middlewares' => null,\n 'routes' => []\n ];\n\n foreach ($reflectClass->getAttributes(JslRouteGroup::class) as $attribute) {\n $args = $attribute->getArguments();\n\n $group['prefix'] = $args['prefix'] ?? '';\n $group['middlewares'] = $args['middlewares'] ?? [];\n }\n\n foreach ($reflectClass->getMethods(ReflectionMethod::IS_PUBLIC) as $reflectMethod) {\n $group['routes'] = array_merge($group['routes'], $this->getRoutes($reflectMethod));\n }\n\n return $group;\n }",
"function give_get_settings_groups() {\n\n\t$current_section = give_get_current_setting_section();\n\n\treturn apply_filters( 'give_get_groups_' . $current_section, array() );\n}",
"public function getAdapterRoutes()\n {\n return $this->adapter->getRoutes();\n }",
"public function config(): array\n {\n return $this->config;\n }",
"public function getPluginConfigAction()\n {\n /** @var \\Enlight_Config $config */\n $config = Shopware()->Plugins()->Backend()->SwagBackendOrder()->Config();\n\n $desktopTypes = $config->get('desktopTypes');\n $desktopTypes = explode(',', $desktopTypes);\n $validationMail = $config->get('validationMail');\n\n $config = [];\n $config['desktopTypes'] = [];\n $count = 0;\n\n foreach ($desktopTypes as $desktopType) {\n $config['desktopTypes'][$count]['id'] = $count;\n $config['desktopTypes'][$count]['name'] = $desktopType;\n $count++;\n }\n\n $config['validationMail'] = $validationMail;\n\n $total = count($config);\n\n $this->view->assign(\n [\n 'success' => true,\n 'data' => $config,\n 'total' => $total\n ]\n );\n }",
"private function getOptOutConfiguration(){\n $optout_config = $this->config->get('plugins.ganalytics.optOutEnabled', false);\n if (!$optout_config) return [];\n\n $optout_config = [\n 'optoutMessage' => addslashes(trim($this->config->get('plugins.ganalytics.optOutMessage', 'Google tracking is now disabled.'))),\n 'cookieExpires' => gmdate (\"D, d-M-Y H:i:s \\U\\T\\C\", $this->config->get('plugins.ganalytics.cookieExpires', 63072000) + time()),\n ];\n\n return $optout_config;\n }",
"private function getConfig()\n\t{\n\t\t$apiKey = $this->getApiKey();\n\t\t$configArray = array('api_key'=> $apiKey,'outputtype'=>Wp_WhitePages_Model_Api::API_OUTPUT_TYPE);\n\t\t\n\t\treturn $configArray;\n\t}",
"public function getRoutes()\n {\n return $this->routeNodes;\n }",
"public function configAll() {\n \n return $this->config;\n \n }",
"public function getRoutes() {}",
"public function config($group)\n {\n return Twig_Functions::get_config($group, $this->_module_name);\n }",
"public static function optsRoute()\n {\n return \\Yii::$app->getModule('pages')->availableRoutes;\n }",
"private function lazy_get_config(): array\n\t{\n\t\treturn array_merge_recursive($this->configs['app'], $this->construct_options);\n\t}",
"public function getListRoutes()\r\n {\r\n $result = array();\r\n \r\n if (count( $this->routes ))\r\n {\r\n foreach ( $this->routes as $act )\r\n {\r\n \r\n $route_str = '';\r\n if (isset( $this->default_params['url_prefix'] ) && ! empty( $this->default_params['url_prefix'] ))\r\n {\r\n $route_str = $this->default_params['url_prefix'];\r\n }\r\n \r\n if (is_array( $act['type'] ))\r\n {\r\n $route_str = implode( '|', $act['type'] ) . ' ' . $route_str;\r\n }\r\n else\r\n {\r\n $route_str = $act['type'] . ' ' . $route_str;\r\n }\r\n $route_str .= $act['route'];\r\n \r\n if (isset( $act['params']['ajax'] ) && (bool) ($act['params']['ajax']))\r\n {\r\n $route_str .= ' [ajax]';\r\n }\r\n \r\n $action_str = '';\r\n if (isset( $act['params']['namespace'] ) && ! empty( $act['params']['namespace'] ))\r\n {\r\n $action_str = (string) $act['params']['namespace'];\r\n }\r\n else\r\n {\r\n if (isset( $this->default_params['namespace'] ) && ! empty( $this->default_params['namespace'] ))\r\n {\r\n $action_str = $this->default_params['namespace'];\r\n }\r\n }\r\n $action_str .= '\\\\';\r\n \r\n if (isset( $act['params']['controller'] ))\r\n {\r\n $action_str .= (string) $act['params']['controller'];\r\n }\r\n else\r\n {\r\n if (isset( $this->default_params['controller'] ) && ! empty( $this->default_params['controller'] ))\r\n {\r\n $action_str .= $this->default_params['controller'];\r\n }\r\n }\r\n $action_str .= '->' . (string) $act['params']['action'];\r\n \r\n $kbps = $this->default_params['kbps'];\r\n if( isset( $act['params']['kbps'] ) ){\r\n \t$kbps = $act['params']['kbps'];\r\n }\r\n $ttl = $this->default_params['ttl'];\r\n if( isset( $act['params']['ttl'] ) ){\r\n \t$ttl = $act['params']['ttl'];\r\n }\r\n \r\n $route = new \\stdclass();\r\n $route->pattern = $route_str;\r\n $route->handler = $action_str;\r\n $route->ttl = $ttl;\r\n $route->kbps = $kbps;\r\n $result[] = $route;\r\n }\r\n }\r\n \r\n return $result;\r\n }"
] | [
"0.6031849",
"0.58362293",
"0.56833667",
"0.55728996",
"0.5564905",
"0.5552051",
"0.5552051",
"0.549341",
"0.5482768",
"0.54676056",
"0.5458091",
"0.5456056",
"0.54407257",
"0.5424809",
"0.5396576",
"0.5396225",
"0.5386024",
"0.53809965",
"0.5367173",
"0.5355695",
"0.53519416",
"0.5342935",
"0.5338446",
"0.5315127",
"0.53047645",
"0.53047645",
"0.53047645",
"0.53047645",
"0.53047645",
"0.53047645",
"0.52902627",
"0.52857584",
"0.5275167",
"0.52742183",
"0.52742183",
"0.52742183",
"0.52647644",
"0.526206",
"0.5255824",
"0.5255824",
"0.5255824",
"0.52513707",
"0.5228713",
"0.52170455",
"0.51927066",
"0.5190797",
"0.5182452",
"0.5173917",
"0.5168644",
"0.5164995",
"0.51446503",
"0.5143385",
"0.5143385",
"0.509365",
"0.50895125",
"0.5072363",
"0.50650257",
"0.5057884",
"0.502104",
"0.50190425",
"0.50181496",
"0.50181496",
"0.5014217",
"0.5007007",
"0.49912748",
"0.4989214",
"0.49785486",
"0.49748963",
"0.49501482",
"0.494531",
"0.4938619",
"0.49102214",
"0.49059314",
"0.4901534",
"0.48902106",
"0.48795226",
"0.4849355",
"0.48453638",
"0.4841033",
"0.48402175",
"0.48399475",
"0.48291135",
"0.48269767",
"0.48256278",
"0.48246324",
"0.48232263",
"0.48204353",
"0.481708",
"0.48170212",
"0.48143458",
"0.48108262",
"0.4796477",
"0.47944644",
"0.47914436",
"0.47894925",
"0.47885832",
"0.4781092",
"0.47782028",
"0.47773632",
"0.4773935"
] | 0.6102408 | 0 |
Init and hook in the integration. | public function __construct() {
global $woocommerce;
$this->id = 'integration-demo';
$this->method_title = __( 'Integration Demo', PLUGIN_TXT );
$this->method_description = __( 'An integration demo to show you how easy it is to extend WooCommerce.', PLUGIN_TXT );
// Load the settings.
$this->init_form_fields();
$this->init_settings();
// Define user set variables.
$this->api_key = $this->get_option( 'api_key' );
$this->debug = $this->get_option( 'debug' );
// Actions.
add_action( 'woocommerce_update_options_integration_' . $this->id, array( $this, 'process_admin_options' ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init() {\n\n // register plugin controller under /gallery/\n DatawrapperHooks::register(DatawrapperHooks::GET_PLUGIN_CONTROLLER, array($this, 'process'));\n\n DatawrapperHooks::register(DatawrapperHooks::ALTERNATIVE_SIGNIN, array($this, 'showTwitterSignInButton'));\n\n $this->checkLogin();\n }",
"protected function _init(){\n\t\t//Hook called at the beginning of self::run();\n\t}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function onInit() {}",
"public function init() {\n // The settings variable will hold our plugin settings.\n self::$instance->plugin_settings = self::$instance->get_plugin_settings();\n\n // The subs variable won't be interacted with directly.\n // Instead, the subs() methods will act as wrappers for it.\n self::$instance->subs = new NF_Subs();\n\n // Get our notifications up and running.\n self::$instance->notifications = new NF_Notifications();\n\n // Get our step processor up and running.\n // We only need this in the admin.\n if ( is_admin() ) {\n self::$instance->step_processing = new NF_Step_Processing();\n self::$instance->download_all_subs = new NF_Download_All_Subs();\n }\n\n // Fire our Ninja Forms init action.\n // This will allow other plugins to register items to the instance.\n do_action( 'nf_init', self::$instance );\n }",
"protected function init() {\n }",
"protected function init() {\n }",
"private function __construct() {\r\n $this->initHooks();\r\n }",
"public function _init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function _before_init(){}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"public function init() {}",
"protected function _init()\n {\n }",
"public static function init()\n {\n add_action('plugins_loaded', array(self::instance(), '_setup'));\n }",
"protected function init(): void\n {\n //\n }",
"protected function __onInit()\n\t{\n\t}",
"protected function init()\n {\n\n }",
"public function init() {\r\n\r\n // Check WooLentor Free version\r\n if( !is_plugin_active('woolentor-addons/woolentor_addons_elementor.php') ){\r\n add_action( 'admin_notices', [ $this, 'admin_notice_missing_main_plugin' ] );\r\n return;\r\n }\r\n\r\n // Include File\r\n $this->include_files();\r\n\r\n // After Active Plugin then redirect to setting page\r\n $this->plugin_redirect_option_page();\r\n\r\n }",
"protected function __construct(){\n\n $this->setup_hooks();\n }",
"public function init()\n {\n try {\n if (!defined('ITEMBASE_PLUGIN_BUILD')) {\n throw new \\Exception(\"No build key is set!\");\n }\n\n if (!defined('ITEMBASE_PLUGIN_SERVICE')) {\n define('ITEMBASE_PLUGIN_SERVICE', self::PLUGIN_SERVER_URL);\n }\n\n try {\n $httpClient = new HttpClient();\n $response = $httpClient->sendData(ITEMBASE_PLUGIN_SERVICE . '/builds/' . ITEMBASE_PLUGIN_BUILD);\n $response = json_decode($response, true);\n\n if (empty($response)) {\n throw new \\Exception(\"No configuration data is available for the plugin!\");\n }\n\n if (!empty($response['constants'])) {\n foreach ($response['constants'] as $constant => $value) {\n if (!defined($constant)) {\n define('ITEMBASE_' . strtoupper($constant), $value);\n }\n }\n }\n\n if (!empty($response['client_id']) && !defined('ITEMBASE_BRANDED_ID')) {\n define('ITEMBASE_BRANDED_ID', $response['client_id']);\n }\n } catch (\\Exception $ex) {\n define('ITEMBASE_OAUTH_SERVER_URL', self::OAUTH_SERVER_URL);\n }\n\n if (!defined('ITEMBASE_VENDOR_DIR')) {\n // according to composer (and PSR-4) folder structure vendor dir is the 6th level from current file\n define('ITEMBASE_VENDOR_DIR', dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))));\n }\n\n $extensionLoader = new ExtensionsLoader($this->serviceContainer);\n $extensionLoader->loadExtensions();\n\n $this->eventDispatcher->initAwareServices();\n\n $this->serviceContainer->verifyServices(array(\n array(self::SERVICE_STORAGE => 'Itembase\\Psdk\\Platform\\StorageInterface'),\n array(self::SERVICE_MULTISHOP => 'Itembase\\Psdk\\Platform\\MultiShop\\MultishopAbstract'),\n array(self::SERVICE_PLATFORM => 'Itembase\\Psdk\\Platform\\PlatformInterface')\n ));\n\n // adding ping service to handle ping request\n $pingService = new PingHandler();\n $this->serviceContainer->bindService($pingService->getExtensionName(), $pingService);\n\n // we are ready to go\n $this->eventDispatcher->dispatch(self::EVENT_INITIALIZED);\n } catch (\\Exception $ex) {\n $this->logger->log(Logger::IB_LOG_ERR, $ex);\n\n $this->eventDispatcher->dispatch(self::EVENT_EXCEPTION, $ex);\n $this->httpHandler->sendResponses();\n exit;\n }\n\n return $this;\n }",
"protected function init()\n {\n }",
"protected function init()\n {\n }",
"protected function init()\n {\n }",
"function __construct(){\n\t\tadd_action('init', array($this, 'stockIntegrateWithVC'));\n\t}",
"protected function init() {\n\t}",
"protected function init() {\n\t}",
"protected function _init()\n {\n }",
"protected function init()\n {\n }",
"protected function init()\n {\n }",
"protected function init()\n {\n }",
"protected function init()\n {\n }",
"protected function init()\n {\n }",
"public function init() {\n }",
"public function init() {\n\t\tglobal $wpdb;\n\n\t\t$this->incrementor = new Incrementor();\n\n\t\t$this->file_locator = new File_Locator();\n\n\t\t$this->block_recognizer = new Block_Recognizer();\n\n\t\t$this->dependencies = new Dependencies();\n\n\t\t// @todo Pass options for verbosity, which filters to wrap, whether to output annotations that have no output, etc.\n\t\t$this->output_annotator = new Output_Annotator(\n\t\t\t$this->dependencies,\n\t\t\t$this->incrementor,\n\t\t\t$this->block_recognizer,\n\t\t\t[\n\t\t\t\t'can_show_queries_callback' => function() {\n\t\t\t\t\treturn current_user_can( $this->show_queries_cap );\n\t\t\t\t},\n\t\t\t]\n\t\t);\n\n\t\t$this->database = new Database( $wpdb );\n\n\t\t$this->hook_wrapper = new Hook_Wrapper();\n\n\t\t$this->invocation_watcher = new Invocation_Watcher(\n\t\t\t$this->file_locator,\n\t\t\t$this->output_annotator,\n\t\t\t$this->dependencies,\n\t\t\t$this->database,\n\t\t\t$this->incrementor,\n\t\t\t$this->hook_wrapper\n\t\t);\n\n\t\t$this->output_annotator->set_invocation_watcher( $this->invocation_watcher );\n\n\t\t$this->server_timing_headers = new Server_Timing_Headers( $this->invocation_watcher );\n\t}",
"public function _init(){}",
"public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n Event::on(DataTypes::class, DataTypes::EVENT_AFTER_FETCH_FEED, function(FeedDataEvent $event) {\n if ($event->response['success']) {\n $this->_processFeed($event);\n }\n });\n\n Event::on(DataTypes::class, DataTypes::EVENT_AFTER_PARSE_FEED, function(FeedDataEvent $event) {\n if ($event->response['success']) {\n $this->_enhanceFeed($event);\n }\n });\n }",
"public function _init() {\r\n\r\n }",
"public static function init(){\n \n }",
"private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function initialize() {}",
"protected function _init()\r\n\t{\r\n\t}",
"protected function init(): void\n {\n }",
"public function init() {\n\n\t\t\t// WPML String Translation plugin exist check\n\t\t\tif ( defined( 'WPML_ST_VERSION' ) ) {\n\t\t\t\tadd_filter( 'wpml_elementor_widgets_to_translate', array( $this, 'add_translatable_nodes' ) );\n\t\t\t\tadd_filter( 'jet-woo-builder/current-template/template-id', array( $this, 'jet_woo_builder_modify_template_id' ) );\n\t\t\t}\n\n\t\t\t// Polylang Translation plugin exist check\n\t\t\tif ( class_exists( 'Polylang' ) ) {\n\t\t\t\trequire jet_woo_builder()->plugin_path( 'includes/lib/compatibility/packages/polylang.php' );\n\t\t\t}\n\n\t\t}",
"public function init() {\r\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n }",
"public function init() {\n\t\t$this->license_helpers();\n\t}",
"public function init() {\n\t\t$this->define_constants();\n\t\t$this->load_dependencies();\n\t\tdo_action( 'wprmprc_init' );\n\t\tadd_filter( 'wprm_addon_active', array( $this, 'addon_active' ), 10, 2 );\n\t}"
] | [
"0.73466086",
"0.7142319",
"0.7132424",
"0.7132424",
"0.7132424",
"0.7132424",
"0.7131661",
"0.7131661",
"0.7131661",
"0.7131661",
"0.7131661",
"0.7131661",
"0.71309155",
"0.71309155",
"0.7108623",
"0.7004135",
"0.6973049",
"0.6973049",
"0.69557065",
"0.69180995",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6912076",
"0.6911448",
"0.6910665",
"0.6910665",
"0.6910665",
"0.6910665",
"0.6910665",
"0.69058365",
"0.68972737",
"0.6881386",
"0.68784827",
"0.6877697",
"0.6863275",
"0.68599427",
"0.6855276",
"0.6852531",
"0.6852531",
"0.6852531",
"0.68491554",
"0.68483794",
"0.68483794",
"0.6845283",
"0.68427587",
"0.68427587",
"0.68427587",
"0.68427587",
"0.68427587",
"0.68381757",
"0.6831818",
"0.6825056",
"0.6815766",
"0.68060356",
"0.67829823",
"0.6780221",
"0.67791355",
"0.67791355",
"0.67791355",
"0.67791355",
"0.67748964",
"0.67746",
"0.67730045",
"0.67654383",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.6765065",
"0.676002",
"0.67469746"
] | 0.70193917 | 15 |
Initialize integration settings form fields. | public function init_form_fields() {
$this->form_fields = array(
'api_key' => array(
'title' => __( 'API Key', PLUGIN_TXT ),
'type' => 'text',
'description' => __( 'Enter with your API Key. You can find this in "User Profile" drop-down (top right corner) > API Keys.', PLUGIN_TXT ),
'desc_tip' => true,
'default' => ''
),
'debug' => array(
'title' => __( 'Debug Log', PLUGIN_TXT ),
'type' => 'checkbox',
'label' => __( 'Enable logging', PLUGIN_TXT ),
'default' => 'no',
'description' => __( 'Log events such as API requests', PLUGIN_TXT ),
),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init_form_fields() {\n\t\t$this->form_fields = include( 'settings-xendit.php' );\n\t}",
"public function init_form_fields() {\n\t\t$this->form_fields = include( 'data/data-settings.php' );\n\t}",
"public function init_settings() {\n // Load form_field settings\n $this->settings = get_option($this->plugin_id . $this->id . '_settings', null);\n\n if (!$this->settings || !is_array($this->settings)) {\n\n $this->settings = array();\n\n // If there are no settings defined, load defaults\n if ($form_fields = $this->get_form_fields())\n foreach ($form_fields as $k => $v)\n $this->settings[$k] = isset($v['default']) ? $v['default'] : '';\n }\n\n if ($this->settings && is_array($this->settings)) {\n $this->settings = array_map(array($this, 'format_settings'), $this->settings);\n $this->enabled = isset($this->settings['enabled']) && $this->settings['enabled'] == 'yes' ? 'yes' : 'no';\n }\n }",
"public function init_form_fields() {\n $this->form_fields = require( dirname(__FILE__) . '/../class/midtrans-admin-settings.php' );\n // Currency conversion rate if currency is not IDR\n if (get_woocommerce_currency() != 'IDR') {\n $this->form_fields['to_idr_rate'] = array(\n 'title' => __(\"Current Currency to IDR Rate\", 'midtrans-woocommerce'),\n 'type' => 'text',\n 'description' => 'The current currency to IDR rate',\n 'default' => '10000',\n );\n }\n }",
"public function init_form_fields(){\n \n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => 'Enable/Disable',\n\t\t\t\t'label' => 'Enable Vortex Gateway',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => 'Title',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'This controls the title which the user sees during checkout.',\n\t\t\t\t'default' => 'Vortex Payment',\n\t\t\t\t'desc_tip' => true,\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => 'Description',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'description' => 'This controls the description which the user sees during checkout.',\n\t\t\t\t'default' => 'Paga con Vortex Payment.',\n\t\t\t),\n\t\t\t'BID' => array(\n\t\t\t\t'title' => 'Business ID',\n\t\t\t\t'type' => 'text'\n\t\t\t)\n\n\t\t\t);\n \n\t \t}",
"public function settings_fields() {\n\t\t$this->create_sections();\n\t\t$this->create_fields();\n\t\tregister_setting( $this->token, $this->token, array( $this, 'validate_fields' ) );\n\t}",
"private function _initArticleSettingsForm()\n\t{\n\t\t// instantiate the article form\n\t\t$this->_articleSettingsForm = new Settings_Form(Settings_Form::DB_ADAPTER);\n\n\t\t$config_vars = array(\n\t\t\tarray('check', 'sp_articles_index'),\n\t\t\tarray('int', 'sp_articles_index_per_page'),\n\t\t\tarray('int', 'sp_articles_index_total'),\n\t\t\tarray('int', 'sp_articles_length'),\n\t\t\t'',\n\t\t\tarray('int', 'sp_articles_per_page'),\n\t\t\tarray('int', 'sp_articles_comments_per_page'),\n\t\t\t'',\n\t\t\tarray('text', 'sp_articles_attachment_dir')\n\t\t);\n\n\t\t$this->_articleSettingsForm->setConfigVars($config_vars);\n\t}",
"function init_form_fields() {\r\n $this->form_fields = array(\r\n 'enabled' => array(\r\n 'title' => __('Enable/Disable', 'mondido'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Enable mondido Payment Module.', 'mondido'),\r\n 'default' => 'no'),\r\n 'merchant_id' => array(\r\n 'title' => __('Merchant ID', 'mondido'),\r\n 'type' => 'text',\r\n 'description' => __('Merchant ID for Mondido')),\r\n 'secret' => array(\r\n 'title' => __('Secret', 'mondido'),\r\n 'type' => 'text',\r\n 'description' => __('Given secret code from Mondido', 'mondido'),\r\n ),\r\n 'test' => array(\r\n 'title' => __('Test', 'mondido'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Set in testmode.', 'mondido'),\r\n 'default' => 'no')\r\n );\r\n }",
"public function init_form_fields() {\n\n\t\t$this->form_fields = array(\n\n\t\t\t'api_settings_section' => array(\n\t\t\t\t'title' => __( 'API Settings', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Enter your API key to start tracking.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'section',\n\t\t\t\t'default' => ''\n\t\t\t),\n\n\t\t\t'api_key' => array(\n\t\t\t\t'title' => __( 'API Key', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Log into your account and go to Site Settings. Leave blank to disable tracking.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => ''\n\t\t\t),\n\n\t\t\t'identity_pref' => array(\n\t\t\t\t'title' => __( 'Identity Preference', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Select how to identify logged in users.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => '',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'email' => __( 'Email Address', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'username' => __( 'Wordpress Username', WC_KISSmetrics::TEXT_DOMAIN )\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t'logging' => array(\n\t\t\t\t'title' => __( 'Logging', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Select whether to log nothing, queries, errors, or both queries and errors to the WooCommerce log. Careful, this can fill up log files very quickly on a busy site.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => '',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'off' => __( 'Off', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'queries' => __( 'Queries', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'errors' => __( 'Errors', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'queries_and_errors' => __( 'Queries & Errors', WC_KISSmetrics::TEXT_DOMAIN )\n\t\t\t\t)\n\t\t\t),\n\n\t\t\t'event_names_section' => array(\n\t\t\t\t'title' => __( 'Event Names', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Customize the event names. Leave a field blank to disable tracking of that event.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'section',\n\t\t\t\t'default' => ''\n\t\t\t),\n\n\t\t\t'signed_in_event_name' => array(\n\t\t\t\t'title' => __( 'Signed In', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer signs in.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'signed in'\n\t\t\t),\n\n\t\t\t'signed_out_event_name' => array(\n\t\t\t\t'title' => __( 'Signed Out', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer signs out.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'signed out'\n\t\t\t),\n\n\t\t\t'viewed_signup_event_name' => array(\n\t\t\t\t'title' => __( 'Viewed Signup', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views the registration form.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'viewed signup'\n\t\t\t),\n\n\t\t\t'signed_up_event_name' => array(\n\t\t\t\t'title' => __( 'Signed Up', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer registers a new account.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'signed up'\n\t\t\t),\n\n\t\t\t'viewed_homepage_event_name' => array(\n\t\t\t\t'title' => __( 'Viewed Homepage', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views the homepage.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'viewed homepage'\n\t\t\t),\n\n\t\t\t'viewed_product_event_name' => array(\n\t\t\t\t'title' => __( 'Viewed Product', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views a single product', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'viewed product'\n\t\t\t),\n\n\t\t\t'added_to_cart_event_name' => array(\n\t\t\t\t'title' => __( 'Added to Cart', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer adds an item to the cart.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'added to cart'\n\t\t\t),\n\n\t\t\t'removed_from_cart_event_name' => array(\n\t\t\t\t'title' => __( 'Removed from Cart', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer removes an item from the cart.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'removed from cart'\n\t\t\t),\n\n\t\t\t'changed_cart_quantity_event_name' => array(\n\t\t\t\t'title' => __( 'Changed Cart Quantity', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer changes the quantity of an item in the cart.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'changed cart quantity'\n\t\t\t),\n\n\t\t\t'viewed_cart_event_name' => array(\n\t\t\t\t'title' => __( 'Viewed Cart', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views the cart.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'viewed cart'\n\t\t\t),\n\n\t\t\t'applied_coupon_event_name' => array(\n\t\t\t\t'title' => __( 'Applied Coupon', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer applies a coupon', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'applied coupon'\n\t\t\t),\n\n\t\t\t'started_checkout_event_name' => array(\n\t\t\t\t'title' => __( 'Started Checkout', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer starts the checkout.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'started checkout'\n\t\t\t),\n\n\t\t\t'started_payment_event_name' => array(\n\t\t\t\t'title' => __( 'Started Payment', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views the payment page (used with direct post payment gateways)', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'started payment'\n\t\t\t),\n\n\t\t\t'completed_purchase_event_name' => array(\n\t\t\t\t'title' => __( 'Completed Purchase', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer completes a purchase.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'completed purchase'\n\t\t\t),\n\n\t\t\t'wrote_review_event_name' => array(\n\t\t\t\t'title' => __( 'Wrote Review', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer writes a review.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'wrote review'\n\t\t\t),\n\n\t\t\t'commented_event_name' => array(\n\t\t\t\t'title' => __( 'Commented', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer write a comment.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'commented'\n\t\t\t),\n\n\t\t\t'viewed_account_event_name' => array(\n\t\t\t\t'title' => __( 'Viewed Account', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views the My Account page.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'viewed account'\n\t\t\t),\n\n\t\t\t'viewed_order_event_name' => array(\n\t\t\t\t'title' => __( 'Viewed Order', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer views an order', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'viewed order'\n\t\t\t),\n\n\t\t\t'updated_address_event_name' => array(\n\t\t\t\t'title' => __( 'Updated Address', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer updates their address.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'updated address'\n\t\t\t),\n\n\t\t\t'changed_password_event_name' => array(\n\t\t\t\t'title' => __( 'Changed Password', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer changes their password.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'changed password'\n\t\t\t),\n\n\t\t\t'estimated_shipping_event_name' => array(\n\t\t\t\t'title' => __( 'Estimated Shipping', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer estimates shipping.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'estimated shipping'\n\t\t\t),\n\n\t\t\t'tracked_order_event_name' => array(\n\t\t\t\t'title' => __( 'Tracked Order', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer tracks an order.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'tracked order'\n\t\t\t),\n\n\t\t\t'cancelled_order_event_name' => array(\n\t\t\t\t'title' => __( 'Cancelled Order', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer cancels an order.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'cancelled order'\n\t\t\t),\n\n\t\t\t'reordered_event_name' => array(\n\t\t\t\t'title' => __( 'Reordered', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Triggered when a customer reorders a previous order.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'reordered'\n\t\t\t),\n\n\t\t\t'property_names_section' => array(\n\t\t\t\t'title' => __( 'Property Names', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Customize the property names. Leave a field blank to disable tracking of that property.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'section',\n\t\t\t\t'default' => ''\n\t\t\t),\n\n\t\t\t'product_name_property_name' => array(\n\t\t\t\t'title' => __( 'Product Name', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer views a product, adds / removes / changes quantities in the cart, or writes a review.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'product name'\n\t\t\t),\n\n\t\t\t'quantity_property_name' => array(\n\t\t\t\t'title' => __( 'Product Quantity', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer adds a product to their cart or changes the quantity in their cart.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'quantity'\n\t\t\t),\n\n\t\t\t'category_property_name' => array(\n\t\t\t\t'title' => __( 'Product Category', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer adds a product to their cart.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'category'\n\t\t\t),\n\n\t\t\t'coupon_code_property_name' => array(\n\t\t\t\t'title' => __( 'Coupon Code', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer applies a coupon.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'coupon code'\n\t\t\t),\n\n\t\t\t'order_id_property_name' => array(\n\t\t\t\t'title' => __( 'Order ID', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer completes their purchase.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'order id'\n\t\t\t),\n\n\t\t\t'order_total_property_name' => array(\n\t\t\t\t'title' => __( 'Order Total', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer completes their purchase.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'order total'\n\t\t\t),\n\n\t\t\t'shipping_total_property_name' => array(\n\t\t\t\t'title' => __( 'Shipping Total', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer completes their purchase.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'shipping total'\n\t\t\t),\n\n\t\t\t'total_quantity_property_name' => array(\n\t\t\t\t'title' => __( 'Total Quantity', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer completes their purchase.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'total quantity'\n\t\t\t),\n\n\t\t\t'payment_method_property_name' => array(\n\t\t\t\t'title' => __( 'Payment Method', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer completes their purchase.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'payment method'\n\t\t\t),\n\n\t\t\t'post_title_property_name' => array(\n\t\t\t\t'title' => __( 'Post Title', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer leaves a comment on a post.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'post title'\n\t\t\t),\n\n\t\t\t'country_property_name' => array(\n\t\t\t\t'title' => __( 'Shipping Country', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'description' => __( 'Tracked when a customer estimates shipping.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => 'country'\n\t\t\t),\n\t\t);\n\n\t\t// WooCommerce Subscriptions support, since 1.1\n\n\t\tif( $this->is_subscriptions_active() ) :\n\n\t\t\t$this->form_fields = array_merge( $this->form_fields, array(\n\n\t\t\t\t'subscription_event_names_section' => array(\n\t\t\t\t\t'title' => __( 'Subscription Event Names', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Customize the event names for Subscription events. Leave a field blank to disable tracking of that event.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'section',\n\t\t\t\t),\n\n\t\t\t\t'activated_subscription_event_name' => array(\n\t\t\t\t\t'title' => __( 'Activated Subscription', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a customer activates their subscription.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'activated subscription',\n\t\t\t\t),\n\n\t\t\t\t'subscription_trial_ended_event_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Free Trial Ended', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a the free trial ends for a subscription.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription trial ended',\n\t\t\t\t),\n\n\t\t\t\t'subscription_expired_event_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Expired', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a subscription expires.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription expired',\n\t\t\t\t),\n\n\t\t\t\t'suspended_subscription_event_name' => array(\n\t\t\t\t\t'title' => __( 'Suspended Subscription', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a customer suspends their subscription.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'suspended subscription',\n\t\t\t\t),\n\n\t\t\t\t'reactivated_subscription_event_name' => array(\n\t\t\t\t\t'title' => __( 'Reactivated Subscription', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a customer reactivates their subscription.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'reactivated subscription',\n\t\t\t\t),\n\n\t\t\t\t'cancelled_subscription_event_name' => array(\n\t\t\t\t\t'title' => __( 'Cancelled Subscription', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a customer cancels their subscription.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'cancelled subscription',\n\t\t\t\t),\n\n\t\t\t\t'renewed_subscription_event_name' => array(\n\t\t\t\t\t'title' => __( 'Renewed Subscription', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Triggered when a customer is automatically billed for a subscription renewal.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription billed',\n\t\t\t\t),\n\n\t\t\t\t'subscription_property_names_section' => array(\n\t\t\t\t\t'title' => __( 'Subscription Property Names', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Customize the property names for Subscription events. Leave a field blank to disable tracking of that property.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'section',\n\t\t\t\t),\n\n\t\t\t\t'subscription_name_property_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Name', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracked anytime a subscription event occurs.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription name'\n\t\t\t\t),\n\n\t\t\t\t'total_initial_payment_property_name' => array(\n\t\t\t\t\t'title' => __( 'Total Initial Payment', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracked for subscription activations. Includes the Recurring amount and Sign Up Fee.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription name'\n\t\t\t\t),\n\n\t\t\t\t'initial_sign_up_fee_property_name' => array(\n\t\t\t\t\t'title' => __( 'Initial Sign Up Fee', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracked for subscription activations. This will be zero if the subscription has no sign up fee.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'initial sign up fee'\n\t\t\t\t),\n\n\t\t\t\t'subscription_period_property_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Period', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the period (e.g. Day, Month, Year) for subscription activations.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription period'\n\t\t\t\t),\n\n\t\t\t\t'subscription_interval_property_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Interval', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the interval (e.g. every 1st, 2nd, 3rd, etc.) for subscription activations.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription interval'\n\t\t\t\t),\n\n\t\t\t\t'subscription_length_property_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Length', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the length (e.g. infinite, 12 months, 2 years, etc.) for subscription activations.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription length'\n\t\t\t\t),\n\n\t\t\t\t'subscription_trial_period_property_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Trial Period', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the trial period (e.g. Day, Month, Year) for subscription activations with a free trial.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription trial period'\n\t\t\t\t),\n\n\t\t\t\t'subscription_trial_length_property_name' => array(\n\t\t\t\t\t'title' => __( 'Subscription Trial Length', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the trial length (e.g. 1-90 periods) for subscription activations with a free trial.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription trial length'\n\t\t\t\t),\n\n\t\t\t\t'billing_amount_property_name' => array(\n\t\t\t\t\t'title' => __( 'Billing Amount for Subscription Renewal', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the amount billed to the customer when their subscription automatically renews.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription billing amount'\n\t\t\t\t),\n\n\t\t\t\t'billing_description_property_name' => array(\n\t\t\t\t\t'title' => __( 'Billing Description for Subscription Renewal', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'description' => __( 'Tracks the name of the subscription billed to the customer when the subscription automatically renews.', WC_KISSmetrics::TEXT_DOMAIN ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => 'subscription billing description'\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\tendif;\n\t}",
"public function init_form_fields() {\n\t\t\t$this->form_fields = array(\n\t\t\t\t\t// required plugin entries\n\t\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t'title'=>__('Enable/disable', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'checkbox',\n\t\t\t\t\t\t'label'=>__('Enable CoinSimple payments for woocommerce', 'woocommerce'),\n\t\t\t\t\t\t'default'=>'yes',\n\t\t\t\t\t\t),\n\t\t\t\t\t'notes'=>array(\n\t\t\t\t\t\t'title'=>__('Invoice Notes', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'textarea',\n\t\t\t\t\t\t'placeholder'=>__('Replace this text with your message!', 'woocommerce'),\n\t\t\t\t\t\t'description'=>__('Message customer will see on the invoice', 'woocommerce'),\n\t\t\t\t\t\t'default'=>__('Thank you for using CoinSimple.', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t),\n\t\t\t\t\t'api_key'=>array(\n\t\t\t\t\t\t'title'=>__('API key', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'text',\n\t\t\t\t\t\t'placeholder'=>__('Replace this text with your API key!', 'woocommerce'),\n\t\t\t\t\t\t'description'=>__('The API key can be found on the setting page of a business on CoinSimple.', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t),\n\t\t\t\t\t'redirect_url'=>array(\n\t\t\t\t\t\t\t'title'=>__('Redirect URL', 'woocommerce'),\n\t\t\t\t\t\t\t'type'=>'text',\n\t\t\t\t\t\t\t'placeholder'=>__('Replace this text with the redirect url', 'woocommerce'),\n\t\t\t\t\t\t\t'description'=>__('This is the page where the customer will be redirected to after payment', 'woocommerce'),\n\t\t\t\t\t\t\t'default'=> '',\n\t\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t),\n\t\t\t\t\t'business_id'=>array(\n\t\t\t\t\t\t'title'=>__('Business ID', 'woocommerce'),\n\t\t\t\t\t\t'type'=>'text',\n\t\t\t\t\t\t'placeholder'=>__('Replace this text with your Business ID!', 'woocommerce'),\n\t\t\t\t\t\t'description'=>__('The Business ID can be found on the setting page of a business on CoinSimple.', 'woocommerce'),\n\t\t\t\t\t\t'desc_tip'=>true,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t}",
"function init_form_fields() {\n /**\n * Build array of configurations that will be displayed on Admin Panel\n */\n parent::init_form_fields();\n WC_Midtrans_Utils::array_insert( $this->form_fields, 'enable_3d_secure', array(\n 'acquring_bank' => array(\n 'title' => __( 'Acquiring Bank', 'midtrans-woocommerce'),\n 'type' => 'text',\n 'label' => __( 'Acquiring Bank', 'midtrans-woocommerce' ),\n 'description' => __( 'You should leave it empty, it will be auto configured. </br> Alternatively may specify your card-payment acquiring bank for this payment option. </br> Options: BCA, BRI, DANAMON, MAYBANK, BNI, MANDIRI, CIMB, etc (Only choose 1 bank).' , 'midtrans-woocommerce' ),\n 'default' => ''\n )\n ));\n // Make this payment method enabled by default\n $this->form_fields['enabled']['default'] = 'yes';\n }",
"function init_form_fields() {\n\n $default_site_name = home_url() ;\n\n\t\t\t$this->form_fields = array(\n\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __( 'Enable/Disable', 'woothemes' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Enable Payment Express', 'woothemes' ),\n\t\t\t\t\t'default' => 'yes'\n\t\t\t\t),\n\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __( 'Title', 'woothemes' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woothemes' ),\n\t\t\t\t\t'default' => __( 'Payment Express', 'woothemes' ),\n\t\t\t\t\t'css' => 'width: 400px;'\n\t\t\t\t),\n\n\t\t\t\t'description' => array(\n\t\t\t\t\t'title' => __( 'Description', 'woothemes' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'woothemes' ),\n\t\t\t\t\t'default' => __(\"Allows credit card payments by Payment Express PX-Pay method\", 'woothemes')\n\t\t\t\t),\n\n\t\t\t\t'site_name' => array(\n\t\t\t\t\t//'title' => __( 'Px-Pay Access Key', 'woothemes' ),\n 'title' => 'Merchant Reference',\n 'description' => 'A name (or URL) to identify this site in the \"Merchant Reference\" field (shown when viewing transactions in the site\\'s Digital Payment Express back-end). This name <b>plus</b> the longest Order/Invoice Number used by the site must be <b>no longer than 53 characters</b>.',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => $default_site_name,\n\t\t\t\t\t'css' => 'width: 400px;',\n 'custom_attributes' => array( 'maxlength' => '53' )\n ),\n\n\t\t\t\t'access_userid' => array(\n\t\t\t\t\t//'title' => __( 'Access User Id', 'woothemes' ),\n\t\t\t\t\t'title' => __( 'Px-Pay Access User ID', 'woothemes' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'css' => 'width: 400px;'\n\t\t\t\t),\n\n\t\t\t\t'access_key' => array(\n\t\t\t\t\t//'title' => __( 'Access Key', 'woothemes' ),\n\t\t\t\t\t'title' => __( 'Px-Pay Access Key', 'woothemes' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'css' => 'width: 400px;'\n\t\t\t\t)\n\n\t\t\t);\n\n\t\t}",
"public function page_init()\n {\n register_setting(\n 'mj_groups_fields', // group name\n 'mj_option_theme',\n array($this, 'sanitize') // sanitize\n );\n\n add_settings_section(\n 'section_default',\n '',\n '',\n 'config-theme-options'\n );\n\n foreach ($this->formRenderInputs as $key => $value) {\n add_settings_field(\n $value['args']['atributos']['name'],\n $value['titulo'],\n array($this, 'render_field_input'),\n 'config-theme-options',\n 'section_default',\n array('valores' => $value)\n );\n }\n }",
"public function init_form_fields() {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', $this->domain ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable Custom Payment', $this->domain ),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __( 'Title', $this->domain ),\n 'type' => 'text',\n 'description' => __( 'This controls the title which the user sees during checkout.', $this->domain ),\n 'default' => __( 'Cartão de Crédito', $this->domain ),\n 'desc_tip' => true,\n ),\n 'order_status' => array(\n 'title' => __( 'Order Status', $this->domain ),\n 'type' => 'select',\n 'class' => 'wc-enhanced-select',\n 'description' => __( 'Choose whether status you wish after checkout.', $this->domain ),\n 'default' => 'wc-completed',\n 'desc_tip' => true,\n 'options' => wc_get_order_statuses()\n ),\n 'description' => array(\n 'title' => __( 'Description', $this->domain ),\n 'type' => 'textarea',\n 'description' => __( 'Payment method description that the customer will see on your checkout.', $this->domain ),\n 'default' => __('Informação do método de pagamento', $this->domain),\n 'desc_tip' => true,\n ),\n 'instructions' => array(\n 'title' => __( 'Instructions', $this->domain ),\n 'type' => 'textarea',\n 'description' => __( 'Instructions that will be added to the thank you page and emails.', $this->domain ),\n 'default' => '',\n 'desc_tip' => true,\n ),\n );\n }",
"public function init_form_fields() {\n\n $gatewayids = $this->get_gatewayids();\n $this->form_fields = apply_filters( 'wc_fabric_form_fields', array(\n 'enabled' => array(\n 'title' => 'Enable/Disable',\n 'type' => 'checkbox',\n 'label' => 'Enable PayFabric',\n 'default' => 'yes',\n ),\n 'title' => array(\n 'title' => 'Title',\n 'type' => 'text',\n 'description' => '',\n 'default' => 'PayFabric',\n 'desc_tip' => true,\n ),\n 'description' => array(\n 'title' => 'Description',\n 'type' => 'textarea',\n 'description' => '',\n 'default' => 'Description here',\n 'desc_tip' => true,\n ),\n 'instructions' => array(\n 'title' => 'Instructions',\n 'type' => 'textarea',\n 'description' => '',\n 'default' => 'Instructions here',\n 'desc_tip' => true,\n ),\n 'deviceId' => array(\n 'title' => 'Device ID',\n 'type' => 'text',\n 'description' => '',\n 'default' => '',\n 'desc_tip' => true,\n ),\n 'password' => array(\n 'title' => 'Device Password',\n 'type' => 'password',\n 'description' => '',\n 'default' => '',\n 'desc_tip' => true,\n ),\n 'gatewayid' => array(\n 'title' => 'Gateway Account Name',\n 'type' => 'select',\n 'description' => 'Required set Device ID and Password',\n 'default' => '',\n 'desc_tip' => true,\n 'options' => $gatewayids,\n ),\n 'book' => array(\n 'title' => 'Book',\n 'type' => 'checkbox',\n 'default' => 'no',\n 'description' => 'Enable Pre-Authorization Only',\n ),\n 'production' => array(\n 'title' => 'Production',\n 'type' => 'checkbox',\n 'default' => 'no',\n 'description' => 'Enable Production',\n ),\n ));\n }",
"function init_form_fields() {\n \n \t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'label' => __( 'Enable Authorize.Net SIM Payment Module', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'checkbox', \n\t\t\t\t'description' => '', \n\t\t\t\t'default' => 'no'\n\t\t\t), \n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title' ), \n\t\t\t\t'type' => 'text', \n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => __( 'Authorize.net SIM', WC_Authorize_SIM::TEXT_DOMAIN ),\n\t\t\t\t'css' => \"width: 300px;\"\n\t\t\t), \n\t\t\t'description' => array(\n\t\t\t\t'title' => __( 'Description', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'textarea', \n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => 'Pay with your credit card via Authorize.net.'\n\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'checkbox', \n\t\t\t\t'label' => __( 'Enable logging (<code>woocommerce/logs/authorize_sim.txt</code>)', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'testmode' => array(\n\t\t\t\t'title' => __( 'Test mode', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'label' => __( 'Test Mode allows you to submit test transactions to the payment gateway', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'checkbox', \n\t\t\t\t'description' => __( 'You may want to set to true if testing against production', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => 'no'\n\t\t\t), \n\t\t\t'login_id' => array(\n\t\t\t\t'title' => __( 'API Login ID', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'text', \n\t\t\t\t'description' => __( 'This is API Lgoin supplied by Authorize.', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => ''\n\t\t\t), \n\t\t\t'tran_key' => array(\n\t\t\t\t'title' => __( 'Transaction Key', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'text', \n\t\t\t\t'description' => __( 'This is Transaction Key supplied by Authorize.', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'md5_hash' => array(\n\t\t\t\t'title' => __( 'MD5 Hash', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'text', \n\t\t\t\t'description' => __( 'The MD5 hash value to verify transactions', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'type' => array(\n\t\t\t\t'title' => __( 'Sale Method', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'select', \n\t\t\t\t'description' => __( 'Select which sale method to use. Authorize Only will authorize the customers card for the purchase amount only. Authorize & Capture will authorize the customer\\'s card and collect funds.', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'options' => array(\n\t\t\t\t\t'AUTH_CAPTURE'=>'Authorize & Capture',\n\t\t\t\t\t'AUTH_ONLY'=>'Authorize Only'\n\t\t\t\t),\n\t\t\t\t'default' => 'AUTH_CAPTURE'\n\t\t\t),\n\t\t\t'tran_mode' => array(\n\t\t\t\t'title' => __( 'Transaction Mode', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'type' => 'select', \n\t\t\t\t'description' => __( 'Transaction mode used for processing orders', WC_Authorize_SIM::TEXT_DOMAIN ), \n\t\t\t\t'options' => array('live'=>'Live', 'sandbox'=>'Sandbox'),\n\t\t\t\t'default' => 'live'\n\t\t\t),\n\t\t\t\n\t\t);\n }",
"function init_form_fields() {\n parent::init_form_fields();\n WC_Midtrans_Utils::array_insert( $this->form_fields, 'enable_3d_secure', array(\n 'method_enabled' => array(\n 'title' => __( 'Allowed Payment Method', 'midtrans-woocommerce' ),\n 'type' => 'text',\n 'description' => __( 'Customize allowed payment method, separate payment method code with coma. e.g: bank_transfer,credit_card. <br>Leave it default if you are not sure.', 'midtrans-woocommerce' ),\n 'default' => 'credit_card'\n ),\n 'bin_number' => array(\n 'title' => __( 'Allowed CC BINs', 'midtrans-woocommerce'),\n 'type' => 'text',\n 'label' => __( 'Allowed CC BINs', 'midtrans-woocommerce' ),\n 'description' => __( 'Fill with CC BIN numbers (or bank name) that you want to allow to use this payment button. </br> Separate BIN number with coma Example: 4,5,4811,bni,mandiri', 'midtrans-woocommerce' ),\n 'default' => ''\n ),\n 'promo_code' => array(\n 'title' => __( 'Promo Code', 'midtrans-woocommerce' ),\n 'type' => 'text',\n 'description' => __( 'Promo Code that would be used for discount. Leave blank if you are not using promo code.', 'midtrans-woocommerce' ),\n 'default' => 'onlinepromomid'\n )\n ));\n }",
"function init_form_fields() {\n\n \tinclude ( SUMO_SAGEPLUGINPATH . 'includes/sagepay-form-admin.php' );\n\n }",
"function init_form_fields() {\n\t\t\t\n\t\t\t$abs_path = str_replace('/wp-admin', '', getcwd());\n\t\t\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Activer/Désactiver:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'checkbox', \n\t\t\t\t\t\t\t\t'label' => __( 'Activer le module de paiement Atos.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => 'yes'\n\t\t\t\t\t\t\t), \n\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Nom:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Intitulé affiché à l\\'utilisateur lors de la commande.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __( 'Paiement sécurisé par carte bancaire', 'woothemes' )\n\t\t\t\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Description:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'textarea', \n\t\t\t\t\t\t\t\t'description' => __( 'Description affichée à l\\'utilisateur lors de la commande.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Payez en toute sécurité grâce à notre système de paiement Atos.', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'merchant_id' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Identifiant commerçant:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Identifiant commerçant fourni par votre banque. Ex: 014295303911112', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('014295303911112', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'pathfile' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier pathfile:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier de configuration \"pathfile\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/param/pathfile', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'request_file' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier request:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier exécutable \"request\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/bin/request', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'response_file' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Chemin du fichier response:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Chemin absolu vers le fichier exécutable \"response\" du kit de paiement, sans le / final', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __($abs_path . '/atos/bin/response', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'payment_means' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Cartes acceptées:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Moyens de paiement acceptés. Ex pour CB, Visa et Mastercard: CB,2,VISA,2,MASTERCARD,2', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('CB,2,VISA,2,MASTERCARD,2', 'woothemes')\n\t\t\t\t\t\t\t),\n\n\t\t\t\t'currency_code' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Devise:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'select', \n\t\t\t\t\t\t\t\t'description' => __( 'Veuillez sélectionner une devise pour les paiemenents.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => '978',\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'840' => 'USD',\n\t\t\t\t\t\t\t\t\t'978' => 'EUR',\n\t\t\t\t\t\t\t\t\t'124' => 'CAD',\n\t\t\t\t\t\t\t\t\t'392' => 'JPY',\n\t\t\t\t\t\t\t\t\t'826' => 'GBP',\n\t\t\t\t\t\t\t\t\t'036' => 'AUD' \n\t\t\t\t\t\t\t\t ) \t\t\t\t\t\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\n\t\t\t\t'paybtn' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Texte bouton de paiement:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Texte affiché sur le bouton qui redirige vers le terminal de paiement.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Régler la commande.', 'woothemes')\n\t\t\t\t\t\t\t),\n\t\t\t\t'paymsg' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Message page de paiement:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'textarea', \n\t\t\t\t\t\t\t\t'description' => __( 'Message affiché sur la page de commande validée, avant passage sur le terminal de paiement.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Merci pour votre commande. Veuillez cliquer sur le bouton ci-dessous pour effectuer le règlement.', 'woothemes')\n\t\t\t\t\t\t\t)\n\t\t\t\t/*'payreturn' => array(\n\t\t\t\t\t\t\t\t'title' => __( 'Texte bouton retour:', 'woothemes' ), \n\t\t\t\t\t\t\t\t'type' => 'text', \n\t\t\t\t\t\t\t\t'description' => __( 'Texte affiché sur le bouton de retour ver la boutique.', 'woothemes' ), \n\t\t\t\t\t\t\t\t'default' => __('Retour', 'woothemes')\n\t\t\t\t\t\t\t)*/\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\t}",
"public function init_form_fields() {\n\n $this->form_fields = apply_filters( 'wc_barter_form_fields', array(\n\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', 'wc-gateway-barter' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable Offline Payment', 'wc-gateway-barter' ),\n 'default' => 'yes'\n ),\n\n 'title' => array(\n 'title' => __( 'Title', 'wc-gateway-barter' ),\n 'type' => 'text',\n 'description' => __( 'This controls the title for the payment method the customer sees during checkout.', 'wc-gateway-barter' ),\n 'default' => __( 'Offline Payment', 'wc-gateway-barter' ),\n 'desc_tip' => true,\n ),\n\n 'description' => array(\n 'title' => __( 'Description', 'wc-gateway-barter' ),\n 'type' => 'textarea',\n 'description' => __( 'Payment method description that the customer will see on your checkout.', 'wc-gateway-barter' ),\n 'default' => __( 'Please remit payment to Store Name upon pickup or delivery.', 'wc-gateway-barter' ),\n 'desc_tip' => true,\n ),\n\n 'instructions' => array(\n 'title' => __( 'Instructions', 'wc-gateway-barter' ),\n 'type' => 'textarea',\n 'description' => __( 'Instructions that will be added to the thank you page and emails.', 'wc-gateway-barter' ),\n 'default' => '',\n 'desc_tip' => true,\n ),\n ) );\n }",
"function init_form_fields()\n {\n\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => __('Enable'),\n 'type' => 'checkbox',\n 'description' => __('Enable this shipping.'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title'),\n 'type' => 'text',\n 'description' => __('Title to be display on site'),\n 'default' => __('CDEK Shipping')\n ),\n 'priceSet' => array(\n 'title' => __('Delivery cost'),\n 'type' => 'text',\n 'description' => __('Default delivery cost'),\n 'default' => __('405')\n ),\n );\n }",
"function init_form_fields() {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => '启用',\n 'type' => 'checkbox',\n 'label' => '启用交通银行支付',\n 'default' => 'no'\n ),\n 'title' => array(\n 'title' => '',\n 'type' => 'text',\n 'description' => '支付过程中所显示的支付名称',\n 'default' => '交通银行支付'\n ),\n 'description' => array(\n 'title' => '交通银行',\n 'type' => 'textarea',\n 'default' => '',\n ),\n 'merchantID' => array(\n 'title' => '商户编号',\n 'type' => 'text',\n 'description' => '',\n 'css' => 'width:400px'\n ),\n 'debug' => array(\n 'title' => 'debug模式',\n 'type' => 'checkbox',\n 'label' => '启用log',\n 'default' => 'no',\n 'description' => '选项无效,LOG始终启用,woocommerce/logs/bocpay',\n )\n );\n }",
"private function _initGeneralSettingsForm()\n\t{\n\t\tglobal $txt, $context;\n\n\t\t// Instantiate the form\n\t\t$this->_generalSettingsForm = new Settings_Form(Settings_Form::DB_ADAPTER);\n\n\t\t$config_vars = array(\n\t\t\tarray('select', 'sp_portal_mode', explode('|', $txt['sp_portal_mode_options'])),\n\t\t\tarray('check', 'sp_maintenance'),\n\t\t\tarray('text', 'sp_standalone_url'),\n\t\t\t'',\n\t\t\tarray('select', 'portaltheme', $context['SPortal']['themes']),\n\t\t\tarray('check', 'sp_disableColor'),\n\t\t\tarray('check', 'sp_disableForumRedirect'),\n\t\t\tarray('check', 'sp_disable_random_bullets'),\n\t\t\tarray('check', 'sp_disable_php_validation', 'subtext' => $txt['sp_disable_php_validation_desc']),\n\t\t\tarray('check', 'sp_disable_side_collapse'),\n\t\t\tarray('check', 'sp_resize_images'),\n\t\t\tarray('check', 'sp_disableMobile'),\n\t\t);\n\n\t\t$this->_generalSettingsForm->setConfigVars($config_vars);\n\t}",
"public function init_form_fields() {\n $this->form_fields = apply_filters('wc_openpay_settings', array(\n 'enabled' => array(\n 'title' => __('Enable/Disable', 'openpay-woosubscriptions'),\n 'label' => __('Enable Openpay', 'openpay-woosubscriptions'),\n 'type' => 'checkbox',\n 'description' => '',\n 'default' => 'no'\n ),\n 'testmode' => array(\n 'title' => __('Sandbox mode', 'openpay-woosubscriptions'),\n 'label' => __('Enable Sandbox', 'openpay-woosubscriptions'),\n 'type' => 'checkbox',\n 'description' => __('Place the payment gateway in test mode using test API keys.', 'openpay-woosubscriptions'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('This controls the title which the user sees during checkout.', 'openpay-woosubscriptions'),\n 'default' => __('Tarjeta de crédito o débito', 'openpay-woosubscriptions')\n ),\n 'description' => array(\n 'title' => __('Description', 'openpay-woosubscriptions'),\n 'type' => 'textarea',\n 'description' => __('This controls the description which the user sees during checkout.', 'openpay-woosubscriptions'),\n 'default' => __('Pay with your credit card via Openpay.', 'openpay-woosubscriptions')\n ),\n 'merchant_id' => array(\n 'title' => __('Production Merchant ID', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('Get your API keys from your openpay account.', 'openpay-woosubscriptions'),\n 'default' => ''\n ),\n 'secret_key' => array(\n 'title' => __('Production Secret Key', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('Get your API keys from your openpay account.', 'openpay-woosubscriptions'),\n 'default' => ''\n ),\n 'publishable_key' => array(\n 'title' => __('Production Public Key', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('Get your API keys from your openpay account.', 'openpay-woosubscriptions'),\n 'default' => ''\n ),\n 'test_merchant_id' => array(\n 'title' => __('Sandbox Merchant ID', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('Get your API keys from your openpay account.', 'openpay-woosubscriptions'),\n 'default' => ''\n ),\n 'test_secret_key' => array(\n 'title' => __('Sandbox Secret Key', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('Get your API keys from your openpay account.', 'openpay-woosubscriptions'),\n 'default' => ''\n ),\n 'test_publishable_key' => array(\n 'title' => __('Sandbox Public Key', 'openpay-woosubscriptions'),\n 'type' => 'text',\n 'description' => __('Get your API keys from your openpay account.', 'openpay-woosubscriptions'),\n 'default' => ''\n )\n ));\n }",
"public function init_form_fields() {\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __('Enable/Disable', 'Cointopay'),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __('Enable Cointopay', 'Cointopay'),\n\t\t\t\t\t'default' => 'yes',\n\t\t\t\t),\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __('Title', 'Cointopay'),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __('This controls the title the user can see during checkout.', 'Cointopay'),\n\t\t\t\t\t'default' => __('Cointopay', 'Cointopay'),\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'title' => __('Description', 'Cointopay'),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __('This controls the title the user can see during checkout.', 'Cointopay'),\n\t\t\t\t\t'default' => __('You will be redirected to cointopay.com to complete your purchase.', 'Cointopay'),\n\t\t\t\t),\n\t\t\t\t'merchantid' => array(\n\t\t\t\t\t'title' => __('Your MerchantID', 'Cointopay'),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __('Please enter your Cointopay Merchant ID, You can get this information in: <a href=\"' . esc_url( 'https://cointopay.com' ) . '\" target=\"_blank\">Cointopay Account</a>.', 'Cointopay'),\n\t\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t\t\t'secret' => array(\n\t\t\t\t\t'title' => __('SecurityCode', 'Cointopay'),\n\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t'description' => __('Please enter your Cointopay SecurityCode, You can get this information in: <a href=\"' . esc_url( 'https://cointopay.com' ) . '\" target=\"_blank\">Cointopay Account</a>.', 'Cointopay'),\n\t\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t\t);\n\n\t\t}",
"function init_form_fields() {\n $enabled_field = array(\n 'title' => __('Enable/Disable', 'wcis'),\n 'type' => 'checkbox',\n 'label' => __('Enable Indo Shipping', 'wcis'),\n 'default' => 'yes'\n );\n\n $key_field = array(\n 'title' => __('API Key', 'wcis'),\n 'type' => 'text',\n 'description' => __('Signup at <a href=\"http://rajaongkir.com/akun/daftar\" target=\"_blank\">rajaongkir.com</a> and choose Pro license (Paid). Paste the API Key here', 'wcis'),\n );\n\n $city_field = array(\n 'title' => __('City Origin', 'wcis'),\n 'type' => 'select',\n // 'class' => 'wc-enhanced-select', // bugged!! doesn't save the value\n 'description' => __('Ship from where? <br> Change your province at General > Base Location <br> Save this to refresh the City selection', 'wcis'),\n 'options' => array()\n );\n\n $this->form_fields = array(\n 'key' => $key_field\n );\n\n // if key is valid, show the other setting fields\n if($this->check_key_valid() ) {\n $city_field['options'] = $this->get_cities_origin();\n\n $this->form_fields['enabled'] = $enabled_field;\n $this->form_fields['city'] = $city_field;\n\n // set service fields by each courier\n $couriers = WCIS_Data::get_couriers();\n foreach($couriers as $id => $name) {\n $this->form_fields[$id . '_services'] = array(\n 'title' => $name,\n 'type' => 'multiselect',\n 'class' => 'wc-enhanced-select',\n 'description' => __(\"Choose allowed services by { $name }.\", 'wcis'),\n 'options' => WCIS_Data::get_services($id, true)\n );\n }\n\n } // if valid\n }",
"public function init_form_fields() {\n\t\t$this->form_fields = [\n\t\t\t'enabled' => [\n\t\t\t\t'title' => 'Enable/Disable',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => 'Enable this email digest',\n\t\t\t\t'default' => 'no'\n\t\t\t],\n\t\t\t'recipient' => [\n\t\t\t\t'title' => 'Recipient(s)',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'Enter recipients (comma separated) for this email. Defaults to ' . get_option( 'admin_email' ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t],\n\t\t\t'schedule' => [\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => 'Scheduled Frequency',\n\t\t\t\t'description' => 'Weekly emails will be sent on Mondays. All emails are sent at 7:00am.',\n\t\t\t\t'options' => [\n\t\t\t\t\t'daily' => 'Daily',\n\t\t\t\t\t'weekly' => 'Weekly'\n\t\t\t\t],\n\t\t\t\t'default' => 'daily'\n\t\t\t],\n\t\t\t'email_type' => [\n\t\t\t\t'title' => 'Email type',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'description' => 'Choose which format of email to send.',\n\t\t\t\t'default' => 'html',\n\t\t\t\t'class' => 'email_type wc-enhanced-select',\n\t\t\t\t'options' => $this->get_email_type_options(),\n\t\t\t\t'desc_tip' => true,\n\t\t\t],\n\t\t\t'send_now' => [\n\t\t\t\t'title' => 'Send now?',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => 'Yes, send the email digest on save',\n\t\t\t\t'default' => 'no'\n\t\t\t]\n\t\t];\n\t}",
"public function setup_settings() {\n\t\t$this->init_sections();\n\t\t$this->init_fields();\n\t\t$this->settings_fields();\n\t}",
"public function init_form_fields()\n {\n\n // Get available placeholders for this email\n $placeholder_text = sprintf(__('Available placeholders: %s', 'subscriptio'), '<code>' . esc_html(implode('</code>, <code>', array_keys($this->placeholders))) . '</code>');\n\n // Define form fields\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __('Enable/Disable', 'subscriptio'),\n 'type' => 'checkbox',\n 'label' => __('Enable this email notification', 'subscriptio'),\n 'default' => 'yes',\n ),\n 'send_to_admin' => array(\n 'title' => __('Send to admin', 'subscriptio'),\n 'type' => 'checkbox',\n 'label' => __('Send BCC copy to admin', 'subscriptio'),\n 'default' => 'no',\n ),\n 'subject' => array(\n 'title' => __('Subject', 'subscriptio'),\n 'type' => 'text',\n 'desc_tip' => true,\n 'description' => $placeholder_text,\n 'placeholder' => $this->get_default_subject(),\n 'default' => '',\n ),\n 'heading' => array(\n 'title' => __('Email heading', 'subscriptio'),\n 'type' => 'text',\n 'desc_tip' => true,\n 'description' => $placeholder_text,\n 'placeholder' => $this->get_default_heading(),\n 'default' => '',\n ),\n 'additional_content' => array(\n 'title' => __('Additional content', 'subscriptio'),\n 'description' => __( 'Text to appear to appear below the main email content.', 'subscriptio' ) . ' ' . $placeholder_text,\n 'css' => 'width: 400px; height: 75px;',\n 'placeholder' => __('N/A', 'subscriptio'),\n 'type' => 'textarea',\n 'default' => $this->get_default_additional_content(),\n 'desc_tip' => true,\n ),\n 'email_type' => array(\n 'title' => __('Email type', 'subscriptio'),\n 'type' => 'select',\n 'description' => __('Choose which format of email to send.', 'subscriptio'),\n 'default' => 'html',\n 'class' => 'email_type wc-enhanced-select',\n 'options' => $this->get_email_type_options(),\n 'desc_tip' => true,\n ),\n );\n }",
"public function init_form_fields() {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', 'woocommerce' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable this email notification', 'woocommerce' ),\n 'default' => 'yes'\n ),\n 'subject' => array(\n 'title' => __( 'Email Subject', 'woocommerce' ),\n 'type' => 'text',\n 'description' => sprintf( __( 'Defaults to <code>%s</code>', 'woocommerce' ), $this->subject ),\n 'placeholder' => '',\n 'default' => ''\n ),\n 'heading' => array(\n 'title' => __( 'Email Heading', 'woocommerce' ),\n 'type' => 'text',\n 'description' => sprintf( __( 'Defaults to <code>%s</code>', 'woocommerce' ), $this->heading ),\n 'placeholder' => '',\n 'default' => ''\n ),\n 'custom_message' => array(\n 'title' => __( 'Custom Message', 'yith-woocommerce-membership' ),\n 'type' => 'textarea',\n 'description' => sprintf( __( 'Defaults to <code>%s</code>', 'woocommerce' ), $this->custom_message ),\n 'placeholder' => '',\n 'default' => __( 'Dear Customer {firstname} {lastname}, your membership {membership_name} is cancelled.', 'yith-woocommerce-membership' )\n ),\n 'email_type' => array(\n 'title' => __( 'Email type', 'woocommerce' ),\n 'type' => 'select',\n 'description' => __( 'Choose which format of email to send.', 'woocommerce' ),\n 'default' => 'html',\n 'class' => 'email_type wc-enhanced-select',\n 'options' => $this->get_email_type_options()\n )\n );\n }",
"function init_form_fields() {\n\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => 'Активировать',\n 'type' => 'checkbox',\n 'description' => 'Активировать способ доставки КС2008',\n 'default' => 'yes'\n ),\n\n 'title' => array(\n 'title' => 'Заголовок',\n 'type' => 'text',\n 'description' => 'Заговок способа доствки КС2008',\n 'default' => 'Курьерская служба 2008 '\n ),\n\n 'description' => array(\n 'title' => 'Описание',\n 'type' => 'text',\n 'description' => 'Описание способа доставки КС2008',\n 'default' => 'Выберите для доставки через КС2008'\n ),\n\n );\n\n }",
"public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce' ),\n\t\t\t\t'label' => __( 'Enable Simplify Commerce', 'woocommerce' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),\n\t\t\t\t'default' => __( 'Pay with Card', 'woocommerce' ),\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => __( 'Description', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce' ),\n\t\t\t\t'default' => 'Pay with your card via Simplify Commerce by Mastercard.',\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t\t'modal_color' => array(\n\t\t\t\t'title' => __( 'Modal Color', 'woocommerce' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'description' => __( 'Set the color of the buttons and titles on the modal dialog.', 'woocommerce' ),\n\t\t\t\t'default' => '#a46497',\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t\t'sandbox' => array(\n\t\t\t\t'title' => __( 'Sandbox', 'woocommerce' ),\n\t\t\t\t'label' => __( 'Enable Sandbox Mode', 'woocommerce' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => __( 'Place the payment gateway in sandbox mode using sandbox API keys (real payments will not be taken).', 'woocommerce' ),\n\t\t\t\t'default' => 'yes'\n\t\t\t),\n\t\t\t'sandbox_public_key' => array(\n\t\t\t\t'title' => __( 'Sandbox Public Key', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),\n\t\t\t\t'default' => '',\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t\t'sandbox_private_key' => array(\n\t\t\t\t'title' => __( 'Sandbox Private Key', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),\n\t\t\t\t'default' => '',\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t\t'public_key' => array(\n\t\t\t\t'title' => __( 'Public Key', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),\n\t\t\t\t'default' => '',\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t\t'private_key' => array(\n\t\t\t\t'title' => __( 'Private Key', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),\n\t\t\t\t'default' => '',\n\t\t\t\t'desc_tip' => true\n\t\t\t),\n\t\t);\n\t}",
"public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable Coinbase Commerce Payment', 'coinbase' ),\n\t\t\t\t'default' => 'yes',\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),\n\t\t\t\t'default' => __( 'Bitcoin and other cryptocurrencies', 'coinbase' ),\n\t\t\t\t'desc_tip' => true,\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => __( 'Description', 'woocommerce' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'desc_tip' => true,\n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce' ),\n\t\t\t\t'default' => __( 'Pay with Bitcoin or other cryptocurrencies.', 'coinbase' ),\n\t\t\t),\n\t\t\t'api_key' => array(\n\t\t\t\t'title' => __( 'API Key', 'coinbase' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'default' => '',\n\t\t\t\t'description' => sprintf(\n\t\t\t\t\t// translators: Description field for API on settings page. Includes external link.\n\t\t\t\t\t__(\n\t\t\t\t\t\t'You can manage your API keys within the Coinbase Commerce Settings page, available here: %s',\n\t\t\t\t\t\t'coinbase'\n\t\t\t\t\t),\n\t\t\t\t\tesc_url( 'https://commerce.coinbase.com/dashboard/settings' )\n\t\t\t\t),\n\t\t\t),\n\t\t\t'webhook_secret' => array(\n\t\t\t\t'title' => __( 'Webhook Shared Secret', 'coinbase' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' =>\n\n\t\t\t\t// translators: Instructions for setting up 'webhook shared secrets' on settings page.\n\t\t\t\t__( 'Using webhooks allows Coinbase Commerce to send payment confirmation messages to the website. To fill this out:', 'coinbase' )\n\n\t\t\t\t. '<br /><br />' .\n\n\t\t\t\t// translators: Step 1 of the instructions for 'webhook shared secrets' on settings page.\n\t\t\t\t__( '1. In your Coinbase Commerce settings page, scroll to the \\'Webhook subscriptions\\' section', 'coinbase' )\n\n\t\t\t\t. '<br />' .\n\n\t\t\t\t// translators: Step 2 of the instructions for 'webhook shared secrets' on settings page. Includes webhook URL.\n\t\t\t\tsprintf( __( '2. Click \\'Add an endpoint\\' and paste the following URL: %s', 'coinbase' ), add_query_arg( 'wc-api', 'WC_Gateway_Coinbase', home_url( '/', 'https' ) ) )\n\n\t\t\t\t. '<br />' .\n\n\t\t\t\t// translators: Step 3 of the instructions for 'webhook shared secrets' on settings page.\n\t\t\t\t__( '3. Make sure to select \"Send me all events\", to receive all payment updates.', 'coinbase' )\n\n\t\t\t\t. '<br />' .\n\n\t\t\t\t// translators: Step 4 of the instructions for 'webhook shared secrets' on settings page.\n\t\t\t\t__( '4. Click \"Show shared secret\" and paste into the box above.', 'coinbase' ),\n\n\t\t\t),\n\t\t\t'show_icons' => array(\n\t\t\t\t'title' => __( 'Show icons', 'coinbase' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Display currency icons on checkout page.', 'coinbase' ),\n\t\t\t\t'default' => 'yes',\n\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug log', 'woocommerce' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable logging', 'woocommerce' ),\n\t\t\t\t'default' => 'no',\n\t\t\t\t// translators: Description for 'Debug log' section of settings page.\n\t\t\t\t'description' => sprintf( __( 'Log Coinbase API events inside %s', 'coinbase' ), '<code>' . WC_Log_Handler_File::get_log_file_path( 'coinbase' ) . '</code>' ),\n\t\t\t),\n\t\t);\n\t}",
"public function init_form_fields() {\n\t\t$this->form_fields = array_merge(\n\t\t\tarray(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __( 'Enable/Disable', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Enable Gateway', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'default' => 'no',\n\t\t\t\t),\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __( 'Title', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'default' => __( 'Credit Card', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t),\n\t\t\t$this->get_gateway_form_fields(),\n\t\t\tarray(\n\t\t\t\t'payment_action' => array(\n\t\t\t\t\t'title' => __( 'Payment Action', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'description' => __( 'Choose whether you wish to capture funds immediately, authorize payment only for a delayed capture, or verify and capture when the order ships.', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'default' => 'sale',\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\tself::TXN_TYPE_SALE => __( 'Authorize + Capture', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t\tself::TXN_TYPE_AUTHORIZE => __( 'Authorize only', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t\tself::TXN_TYPE_VERIFY => __( 'Verify only', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'allow_card_saving' => array(\n\t\t\t\t\t'title' => __( 'Allow Card Saving', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'label' => __( 'Allow Card Saving', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'description' => sprintf(\n\t\t\t\t\t\t/* translators: %s: Email address of support team */\n\t\t\t\t\t\t__( 'Note: to use the card saving feature, you must have multi-use token support enabled on your account. Please contact <a href=\"mailto:%s?Subject=WooCommerce%%20Transaction%%20Descriptor%%20Option\">support</a> with any questions regarding this option.', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t\t$this->get_first_line_support_email()\n\t\t\t\t\t),\n\t\t\t\t\t'default' => 'no',\n\t\t\t\t),\n\t\t\t\t'txn_descriptor' => array(\n\t\t\t\t\t'title' => __( 'Order Transaction Descriptor', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => sprintf(\n\t\t\t\t\t\t/* translators: %s: Email address of support team */\n\t\t\t\t\t\t__( 'During a Capture or Authorize payment action, this value will be passed along as the transaction-specific descriptor listed on the customer\\'s bank account. Please contact <a href=\"mailto:%s?Subject=WooCommerce%%20Transaction%%20Descriptor%%20Option\">support</a> with any questions regarding this option.', 'globalpayments-gateway-provider-for-woocommerce' ),\n\t\t\t\t\t\t$this->get_first_line_support_email()\n\t\t\t\t\t),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'class' => 'txn_descriptor',\n\t\t\t\t\t'custom_attributes' => array(\n\t\t\t\t\t\t'maxlength' => 18,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}",
"function buildSettingsForm() {}",
"public function init_form_fields()\n {\n $this->log(' [Info] Entered init_form_fields()...');\n $log_file = 'btcpay-' . sanitize_file_name( wp_hash( 'btcpay' ) ) . '-log';\n $logs_href = get_bloginfo('wpurl') . '/wp-admin/admin.php?page=wc-status&tab=logs&log_file=' . $log_file;\n\n $this->form_fields = array(\n 'title' => array(\n 'title' => __('Title', 'btcpay-for-woocommerce'),\n 'type' => 'text',\n 'description' => __('Controls the name of this payment method as displayed to the customer during checkout.', 'btcpay-for-woocommerce'),\n 'default' => __('Bitcoin', 'btcpay-for-woocommerce'),\n 'desc_tip' => true,\n ),\n 'description' => array(\n 'title' => __('Customer Message', 'btcpay-for-woocommerce'),\n 'type' => 'textarea',\n 'description' => __('Message to explain how the customer will be paying for the purchase.', 'btcpay-for-woocommerce'),\n 'default' => 'You will be redirected to BTCPay to complete your purchase.',\n 'desc_tip' => true,\n ),\n 'api_token' => array(\n 'type' => 'api_token'\n ),\n 'transaction_speed' => array(\n 'title' => __('Invoice pass to \"confirmed\" state after', 'btcpay-for-woocommerce'),\n 'type' => 'select',\n 'description' => 'An invoice becomes confirmed after the payment has...',\n 'options' => array(\n 'default' => 'Keep store level configuration',\n 'high' => '0 confirmation on-chain',\n 'medium' => '1 confirmation on-chain',\n 'low-medium' => '2 confirmations on-chain',\n 'low' => '6 confirmations on-chain',\n ),\n 'default' => 'default',\n 'desc_tip' => true,\n ),\n 'order_states' => array(\n 'type' => 'order_states'\n ),\n 'debug' => array(\n 'title' => __('Debug Log', 'btcpay-for-woocommerce'),\n 'type' => 'checkbox',\n 'label' => sprintf(__('Enable logging <a href=\"%s\" class=\"button\">View Logs</a>', 'btcpay-for-woocommerce'), $logs_href),\n 'default' => 'no',\n 'description' => sprintf(__('Log BTCPay events, such as IPN requests, inside <code>%s</code>', 'btcpay-for-woocommerce'), wc_get_log_file_path('btcpay')),\n 'desc_tip' => true,\n ),\n 'notification_url' => array(\n 'title' => __('Notification URL', 'btcpay-for-woocommerce'),\n 'type' => 'url',\n 'description' => __('BTCPay will send IPNs for orders to this URL with the BTCPay invoice data', 'btcpay-for-woocommerce'),\n 'default' => '',\n 'placeholder' => WC()->api_request_url('WC_Gateway_BtcPay'),\n 'desc_tip' => true,\n ),\n 'redirect_url' => array(\n 'title' => __('Redirect URL', 'btcpay-for-woocommerce'),\n 'type' => 'url',\n 'description' => __('After paying the BTCPay invoice, users will be redirected back to this URL', 'btcpay-for-woocommerce'),\n 'default' => '',\n 'placeholder' => $this->get_return_url(),\n 'desc_tip' => true,\n ),\n 'additional_tokens' => array(\n 'title' => __('Additional token configuration', 'btcpay-for-woocommerce'),\n 'type' => 'textarea',\n 'description' => __('You can configure additional tokens here, one per line. e.g. \"HAT;Hat Token;promotion\" See documentation for details. Each one will be available as their own payment method.', 'btcpay-for-woocommerce'),\n 'default' => '',\n 'desc_tip' => true,\n ),\n\t\t\t 'additional_tokens_limit_payment' => array(\n\t\t\t\t\t'title' => __('Additional tokens: Enforce payment tokens', 'btcpay-for-woocommerce'),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __('Limit default payment methods to listed \"payment\" tokens.', 'btcpay-for-woocommerce'),\n\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t'value' => 'yes',\n\t\t\t\t\t'description' => __('This will override the default btcpay payment method (defaults to all supported by BTCPay Server) and enforce to tokens of type \"payment\". This is useful if you want full control on what is available on BTCPay Server payment page.', 'btcpay-for-woocommerce'),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t ),\n 'support_details' => array(\n 'title' => __( 'Plugin & Support Information', 'btcpay' ),\n 'type' => 'title',\n 'description' => sprintf(__('This plugin version is %s and your PHP version is %s. If you need assistance, please come on our chat https://chat.btcpayserver.org. Thank you for using BTCPay!', 'btcpay-for-woocommerce'), constant(\"BTCPAY_VERSION\"), PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION),\n ),\n );\n\n $this->log(' [Info] Initialized form fields: ' . var_export($this->form_fields, true));\n $this->log(' [Info] Leaving init_form_fields()...');\n }",
"public function plugin_settings_fields() {\n\t\t\t\t\t\t\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'description' => $this->plugin_settings_description(),\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'app_id',\n\t\t\t\t\t\t'label' => esc_html__( 'Application ID', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'api_username',\n\t\t\t\t\t\t'label' => esc_html__( 'Account Username', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'api_password',\n\t\t\t\t\t\t'label' => esc_html__( 'API Password', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'input_type' => 'password',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'client_folder',\n\t\t\t\t\t\t'label' => esc_html__( 'Client Folder', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'choices' => version_compare( GFForms::$version, '2.5-dev-1', '>=' ) ? array( $this, 'client_folders_for_plugin_setting' ) : $this->client_folders_for_plugin_setting(),\n\t\t\t\t\t\t'dependency' => array( $this, 'initialize_api' ),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Client Folders.', 'gravityformsicontact' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'save',\n\t\t\t\t\t\t'messages' => array(\n\t\t\t\t\t\t\t'success' => esc_html__( 'iContact settings have been updated.', 'gravityformsicontact' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t\n\t}",
"public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable plugin', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => __( 'Invoice', 'payex-woocommerce-payments' )\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => __( 'Description', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => __( 'Invoice', 'payex-woocommerce-payments' ),\n\t\t\t),\n\t\t\t'merchant_token' => array(\n\t\t\t\t'title' => __( 'Merchant Token', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Merchant Token', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => $this->merchant_token\n\t\t\t),\n\t\t\t'payee_id' => array(\n\t\t\t\t'title' => __( 'Payee Id', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Payee Id', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => $this->payee_id\n\t\t\t),\n\t\t\t'testmode' => array(\n\t\t\t\t'title' => __( 'Test Mode', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable PayEx Test Mode', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => $this->testmode\n\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable logging', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => $this->debug\n\t\t\t),\n\t\t\t'culture' => array(\n\t\t\t\t'title' => __( 'Language', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'en-US' => 'English',\n\t\t\t\t\t'sv-SE' => 'Swedish',\n\t\t\t\t\t'nb-NO' => 'Norway',\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Language of pages displayed by PayEx during payment.', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => $this->culture\n\t\t\t),\n\t\t\t'terms_url' => array(\n\t\t\t\t'title' => __( 'Terms & Conditions Url', 'payex-woocommerce-payments' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Terms & Conditions Url', 'payex-woocommerce-payments' ),\n\t\t\t\t'default' => get_site_url()\n\t\t\t),\n\t\t);\n\t}",
"public function init_form_fields() {\n\n\t\t\t$this->form_fields = array(\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __( 'Enable/Disable', 'storefront-child' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Enable Gold Payment', 'storefront-child' ),\n\t\t\t\t\t'default' => 'yes'\n\t\t\t\t),\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __( 'Title', 'storefront-child' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'storefront-child' ),\n\t\t\t\t\t'default' => __( 'Gold Payment', 'storefront-child' ),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t\t'order_status' => array(\n\t\t\t\t\t'title' => __( 'Order Status', 'storefront-child' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'class' => 'wc-enhanced-select',\n\t\t\t\t\t'description' => __( 'Choose whether status you wish after checkout.', 'storefront-child' ),\n\t\t\t\t\t'default' => 'wc-completed',\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t'options' => wc_get_order_statuses()\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'title' => __( 'Description', 'storefront-child' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __( 'Payment method description that the customer will see on your checkout.', 'storefront-child' ),\n\t\t\t\t\t'default' => __( 'Payment Information', 'storefront-child' ),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t\t'instructions' => array(\n\t\t\t\t\t'title' => __( 'Instructions', 'storefront-child' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __( 'Instructions that will be added to the thank you page and emails.', 'storefront-child' ),\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t),\n\t\t\t);\n\t\t}",
"public function load_settings_fields() {\n\t\t\tglobal $wp_rewrite;\n\t\t\tif ( $wp_rewrite->using_permalinks() ) {\n\t\t\t\t$this->setting_option_fields = array(\n\t\t\t\t\t'courses' => array(\n\t\t\t\t\t\t'name' => 'courses',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Courses.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Courses', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'courses' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['courses'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t\t'lessons' => array(\n\t\t\t\t\t\t'name' => 'lessons',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Lessons.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Lessons', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'lessons' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['lessons'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t\t'topics' => array(\n\t\t\t\t\t\t'name' => 'topics',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Topics.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Topics', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'topics' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['topics'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t\t'quizzes' => array(\n\t\t\t\t\t\t'name' => 'quizzes',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Quizzes.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Quizzes', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quizzes' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['quizzes'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( $wp_rewrite->using_permalinks() ) {\n\t\t\t\t$example_regular_topic_url = get_option( 'home' ) . '/' . $this->setting_option_values['topics'] . '/topic-slug';\n\t\t\t\t$example_nested_topic_url = get_option( 'home' ) . '/' . $this->setting_option_values['courses'] . '/course-slug/' . $this->setting_option_values['lessons'] . '/lesson-slug/' . $this->setting_option_values['topics'] . '/topic-slug';\n\t\t\t} else {\n\t\t\t\t$example_regular_topic_url = add_query_arg( learndash_get_post_type_slug( 'topic' ), 'topic-slug', get_option( 'home' ) );\n\n\t\t\t\t$example_nested_topic_url = get_option( 'home' );\n\t\t\t\t$example_nested_topic_url = add_query_arg( learndash_get_post_type_slug( 'course'), 'course-slug', $example_nested_topic_url );\n\t\t\t\t$example_nested_topic_url = add_query_arg( learndash_get_post_type_slug( 'lesson' ), 'lesson-slug', $example_nested_topic_url );\n\t\t\t\t$example_nested_topic_url = add_query_arg( learndash_get_post_type_slug( 'topic' ), 'topic-slug', $example_nested_topic_url );\n\t\t\t}\n\n\t\t\t$this->setting_option_fields['nested_urls'] = array(\n\t\t\t\t'name' => 'nested_urls',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable Nested URLs', 'learndash' ),\n\t\t\t\t'desc' => sprintf(\n\t\t\t\t\t// translators: placeholders: Lesson, Topic, Quiz, Course, Site Home URL, URL to Course Builder Settings.\n\t\t\t\t\t_x(\n\t\t\t\t\t\t'This option will restructure %1$s, %2$s and %3$s URLs so they are nested hierarchically within the %4$s URL.<br />For example instead of the default topic URL <code>%5$s</code> the nested URL would be <code>%6$s</code>. If <a href=\"%7$s\">Course Builder Share Steps</a> has been enabled this setting is also automatically enabled.',\n\t\t\t\t\t\t'placeholders: Lesson, Topic, Quiz, Course, Site Home URL, URL to Course Builder Settings',\n\t\t\t\t\t\t'learndash'\n\t\t\t\t\t),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'lesson' ),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'topic' ),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quiz' ),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'course' ),\n\t\t\t\t\t$example_regular_topic_url,\n\t\t\t\t\t$example_nested_topic_url,\n\t\t\t\t\tadmin_url( 'admin.php?page=courses-options' )\n\t\t\t\t),\n\t\t\t\t'value' => isset( $this->setting_option_values['nested_urls'] ) ? $this->setting_option_values['nested_urls'] : '',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'yes' => __( 'Yes', 'learndash' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$this->setting_option_fields['nonce'] = array(\n\t\t\t\t'name' => 'nonce',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'label' => '',\n\t\t\t\t'value' => wp_create_nonce( 'learndash_permalinks_nonce' ),\n\t\t\t\t'class' => 'hidden',\n\t\t\t);\n\n\t\t\t$this->setting_option_fields = apply_filters( 'learndash_settings_fields', $this->setting_option_fields, $this->settings_section_key );\n\n\t\t\tparent::load_settings_fields();\n\t\t}",
"public function init_form_fields() {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', 'dokan' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable this email notification', 'dokan' ),\n 'default' => 'yes',\n ),\n 'subject' => array(\n 'title' => __( 'Subject', 'dokan' ),\n 'type' => 'text',\n 'desc_tip' => true,\n /* translators: %s: list of placeholders */\n 'description' => sprintf( __( 'Available placeholders: %s', 'dokan' ), '<code>{site_name},{amount},{seller_name},{order_id},{status}</code>' ),\n 'placeholder' => $this->get_default_subject(),\n 'default' => '',\n ),\n 'heading' => array(\n 'title' => __( 'Email heading', 'dokan' ),\n 'type' => 'text',\n 'desc_tip' => true,\n /* translators: %s: list of placeholders */\n 'description' => sprintf( __( 'Available placeholders: %s', 'dokan' ), '<code>{site_name},{amount},{seller_name},{order_id},{status}</code>' ),\n 'placeholder' => $this->get_default_heading(),\n 'default' => '',\n ),\n 'email_type' => array(\n 'title' => __( 'Email type', 'dokan' ),\n 'type' => 'select',\n 'description' => __( 'Choose which format of email to send.', 'dokan' ),\n 'default' => 'html',\n 'class' => 'email_type wc-enhanced-select',\n 'options' => $this->get_email_type_options(),\n 'desc_tip' => true,\n ),\n );\n }",
"function form_init_data()\r\n {\r\n // Initialize the form fields\r\n\r\n $this->set_hidden_element_value(\"_action\", FT_ACTION_ADD) ;\r\n\r\n $this->set_element_value(\"Meet Start\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n $this->set_element_value(\"Meet End\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n\r\n // If the config is set to US only, initialize the country\r\n\r\n if (FT_US_ONLY)\r\n $this->set_element_value(\"Meet Country\",\r\n FT_SDIF_COUNTRY_CODE_UNITED_STATES_OF_AMERICA_VALUE) ;\r\n\r\n $this->set_element_value(\"Pool Altitude\", \"0\") ;\r\n }",
"public function init_form_fields() {\n\n\t\t\t\t$this->form_fields = array(\n\t\t\t\t\t'enabled' => array(\n\t\t\t\t\t\t'title' => __( 'Enable/Disable', 'havanao' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __( 'Enable havanao payments', 'havanao' ),\n\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t),\n\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t'title' => __( 'Title', 'havanao' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'havanao' ),\n\t\t\t\t\t\t'default' => __( 'Havanao Payments', 'havanao' ),\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'description' => array(\n\t\t\t\t\t\t'title' => __( 'Description', 'havanao' ),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'description' => __( 'Payment method description that the customer will see on your checkout.', 'havanao' ),\n\t\t\t\t\t\t'default' => __( 'Please have your phone ready to confirm payment', 'havanao' ),\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'instructions' => array(\n\t\t\t\t\t\t'title' => __( 'Instructions', 'havanao' ),\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'description' => __( 'Instructions that will be added to the thank you page and emails.', 'havanao' ),\n\t\t\t\t\t\t'default' => __( 'Dial *182*7# on MTN to confirm pending payment', 'havanao' ),\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'success_payment_status' => array(\n\t\t\t\t\t\t'title' => __( 'Successful Payment Order Status', 'havanao' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'default' => 'wc-completed',\n\t\t\t\t\t\t'options' => wc_get_order_statuses(),\n\t\t\t\t\t),\n\t\t\t\t\t'pending_payment_status' => array(\n\t\t\t\t\t\t'title' => __( 'Pending Payment Order Status', 'havanao' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'default' => 'wc-on-hold',\n\t\t\t\t\t\t'options' => wc_get_order_statuses(),\n\t\t\t\t\t),\n\t\t\t\t\t'errored_payment_status' => array(\n\t\t\t\t\t\t'title' => __( 'Errored Payment Order Status', 'havanao' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'default' => 'wc-pending',\n\t\t\t\t\t\t'options' => wc_get_order_statuses(),\n\t\t\t\t\t),\n\t\t\t\t\t'test_enabled' => array(\n\t\t\t\t\t\t'title' => __( 'Enable/Disable Test Mode', 'havanao' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'label' => __( 'Enable Test Mode', 'havanao' ),\n\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t),\n\t\t\t\t\t'havanao_api_key' => array(\n\t\t\t\t\t\t'title' => __( 'Havanao API Key', 'havanao' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'description' => __( 'Havanao API Key required for authentication.' ),\n\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}",
"public function init_form_fields() {\r\n\r\n $this->form_fields = array(\r\n 'enabled' => array(\r\n 'title' => __('Enable/Disable', 'azericard'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Enable Azericard Payment Module.', 'azericard'),\r\n 'default' => 'no'),\r\n 'title' => array(\r\n 'title' => __('Title:', 'azericard'),\r\n 'type'=> 'text',\r\n 'description' => __('This controls the title which the user sees during checkout.', 'azericard'),\r\n 'default' => __('Azericard', 'azericard')),\r\n 'description' => array(\r\n 'title' => __('Description:', 'azericard'),\r\n 'type' => 'textarea',\r\n 'description' => __('This controls the description which the user sees during checkout.', 'azericard'),\r\n 'default' => __('Pay securely by Credit or Debit card or internet banking through Azericard Secure Servers.', 'azericard')),\r\n\r\n 'select_mode' => array(\r\n 'title' => __( 'Sale mode', 'azericard' ),\r\n 'type' => 'select',\r\n 'description' => __( 'Select which mode do you want to use.', 'azericard' ),\r\n 'options' => array(\r\n 'test' => 'Test mode',\r\n 'production' => 'Production mode'\r\n ),\r\n 'default' => 'Authorize & Capture'\r\n ),\r\n\r\n 'url_test' => array(\r\n 'title' => __('Azericard url (Test mode):', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'test-mode',\r\n 'description' => __('Azericard url.', 'azericard'),\r\n 'default' => __('https://213.172.75.248/cgi-bin/cgi_link', 'azericard')),\r\n 'terminal_test' => array(\r\n 'title' => __('Terminal (Test mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'test-mode',\r\n 'description' => __('This terminal id use at Azericard.'),\r\n 'default' => __('77777777', 'azericard')),\r\n 'key_for_sign_test' => array(\r\n 'title' => __('Key for sign (Test mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'test-mode',\r\n 'description' => __('Given to key by Azericard', 'azericard'),\r\n 'default' => __('00112233445566778899AABBCCDDEEFF', 'azericard')),\r\n\r\n 'url_production' => array(\r\n 'title' => __('Azericard url (Production mode):', 'azericard'),\r\n 'type'=> 'text',\r\n 'class' => 'production-mode',\r\n 'description' => __('Azericard url.', 'azericard'),\r\n 'default' => __('https://213.172.75.248/cgi-bin/cgi_link', 'azericard')),\r\n 'terminal_production' => array(\r\n 'title' => __('Terminal (Production mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'production-mode',\r\n 'description' => __('This terminal id use at Azericard.'),\r\n 'default' => __('77777777', 'azericard')),\r\n 'key_for_sign_production' => array(\r\n 'title' => __('Key for sign (Production mode)', 'azericard'),\r\n 'type' => 'text',\r\n 'class' => 'production-mode',\r\n 'description' => __('Given to key by Azericard', 'azericard'),\r\n 'default' => __('00112233445566778899AABBCCDDEEFF', 'azericard')),\r\n\r\n 'redirect_page_id' => array(\r\n 'title' => __('Return Page'),\r\n 'type' => 'select',\r\n 'options' => $this -> get_pages_az('Select Page'),\r\n 'description' => \"URL of success page\"\r\n )\r\n );\r\n }",
"public function initialize_settings_page()\n {\n }",
"public function init_form_fields(){\r\n \r\n $this->form_fields = array(\r\n 'enabled' => array(\r\n 'title' => 'Enable/Disable',\r\n 'label' => 'Enable Plaid Payment Gateway',\r\n 'type' => 'checkbox',\r\n 'description' => '',\r\n 'default' => 'yes'\r\n ),\r\n 'title' => array(\r\n 'title' => 'Title',\r\n 'type' => 'text',\r\n 'description' => 'This controls the title which the user sees during checkout.',\r\n 'default' => 'Plaid Checkout',\r\n 'desc_tip' => true,\r\n ),\r\n 'description' => array(\r\n 'title' => 'Description',\r\n 'type' => 'textarea',\r\n 'description' => 'This controls the description which the user sees during checkout.',\r\n 'default' => 'Pay with your Bank Account securely by connecting with Plaid',\r\n ),\r\n 'testmode' => array(\r\n 'title' => 'Test mode',\r\n 'label' => 'Enable Test Mode',\r\n 'type' => 'checkbox',\r\n 'description' => 'Place the payment gateway in test mode using test API keys.',\r\n 'default' => 'no',\r\n 'desc_tip' => true,\r\n ),\r\n /*'test_publishable_key' => array(\r\n 'title' => 'Test Publishable Key',\r\n 'type' => 'text'\r\n ),\r\n 'test_private_key' => array(\r\n 'title' => 'Test Private Key',\r\n 'type' => 'password',\r\n ),*/\r\n 'client_id' => array(\r\n 'title' => 'Live Client ID',\r\n 'type' => 'text'\r\n ),\r\n 'public_key' => array(\r\n 'title' => 'Live Public Key',\r\n 'type' => 'text'\r\n ),\r\n 'private_key' => array(\r\n 'title' => 'Live Private Key',\r\n 'type' => 'password'\r\n )\r\n );\r\n \r\n\t \t}",
"public function plugin_settings_fields() {\n\n\t\t// Get current plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\t// Prepare base fields.\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'accessToken',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'customAppEnable',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => null,\n\t\t\t\t'label' => null,\n\t\t\t\t'type' => 'auth_token_button',\n\t\t\t),\n\t\t);\n\n\t\t// If API is initialized, add custom app key/secret fields.\n\t\tif ( $this->initialize_api() ) {\n\t\t\t$fields[] = array( 'name' => 'customAppKey', 'type' => 'hidden' );\n\t\t\t$fields[] = array( 'name' => 'customAppSecret', 'type' => 'hidden' );\n\t\t}\n\n\t\t// Setup base fields.\n\t\treturn array( array( 'fields' => $fields ) );\n\n\t}",
"function init_form_fields() {\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable eSewa Payment Method', 'esewa-payment-gateway-for-woocommerce' ),\n 'default' => 'yes',\n ),\n 'title' => array(\n 'title' => __( 'Title', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'text',\n 'description' => __( 'This controls the title which the user sees during checkout.', 'esewa-payment-gateway-for-woocommerce' ),\n 'default' => __( 'eSewa', 'esewa-payment-gateway-for-woocommerce' ),\n 'desc_tip' => true,\n ),\n 'description' => array(\n 'title' => __( 'Customer Message', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'textarea',\n 'description' => __( 'Enter description of payment gateway', 'esewa-payment-gateway-for-woocommerce' ),\n 'default' => __( 'eSewa is the first online payment gateway of Nepal. It facilitates its users to pay and get paid online.', 'esewa-payment-gateway-for-woocommerce' ),\n ),\n 'merchant' => array(\n 'title' => __( 'Merchant ID', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'text',\n 'description' => __( 'Enter Merchant ID. Eg. 0000ETM', 'esewa-payment-gateway-for-woocommerce' ),\n 'default' => '',\n 'placeholder' => __( 'Enter Merchant ID', 'esewa-payment-gateway-for-woocommerce' ),\n ),\n 'testing' => array(\n 'title' => __( 'For Developers', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'title',\n 'description' => '',\n ),\n 'testmode' => array(\n 'title' => __( 'Test mode', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable Test mode', 'esewa-payment-gateway-for-woocommerce' ),\n 'default' => 'no',\n 'description' => __( 'Used for development purpose', 'esewa-payment-gateway-for-woocommerce' ),\n ),\n 'debug' => array(\n 'title' => __( 'Debug Log', 'esewa-payment-gateway-for-woocommerce' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable logging', 'esewa-payment-gateway-for-woocommerce' ),\n 'default' => 'no',\n 'description' => sprintf( __( 'Log eSewa events, inside <code>%s</code>', 'esewa-payment-gateway-for-woocommerce' ),\n wc_get_log_file_path( 'esewa' )\n ),\n ),\n );\n\n\t\t}",
"public function init_form_fields()\n {\n $this->form_fields = array(\n\n 'enabled' => array(\n 'title' => __('Of/Off', 'woocommerce'),\n 'type' => 'checkbox',\n 'label' => __('On', 'woocommerce'),\n 'default' => 'yes',\n ),\n\n 'title' => array(\n 'title' => __('Name of payment method', 'woocommerce'),\n 'type' => 'text',\n 'description' => __('User see this title in order checkout.', 'woocommerce'),\n 'default' => __('Paysto', 'woocommerce'),\n ),\n\n 'paysto_x_description' => array(\n 'title' => __('Comment for payment', 'woocommerce'),\n 'type' => 'text',\n 'required' => true,\n 'description' => __('Fill this field obligatory', 'woocommerce'),\n 'default' => __('Payment in my store throw Paysto payment system', 'woocommerce'),\n ),\n\n 'paysto_x_login' => array(\n 'title' => __('Code of your store', 'woocommerce'),\n 'type' => 'text',\n 'required' => true,\n 'description' => __('Please find your merchant id in merchant in Paysto merchant backoffice',\n 'woocommerce'),\n 'default' => '',\n ),\n\n 'paysto_secret' => array(\n 'title' => __('Secret', 'woocommerce'),\n 'type' => 'password',\n 'description' => __('Paysto secret word, please set it also in Paysto merchant backoffice',\n 'woocommerce'),\n 'default' => '',\n ),\n\n 'paysto_order_status' => array(\n 'title' => __('Order status', 'woocommerce'),\n 'type' => 'select',\n 'options' => wc_get_order_statuses(),\n 'description' => __('Setup order status after successfull payment', 'woocommerce'),\n ),\n\n 'paysto_vat_products' => array(\n 'title' => __('VAT for products', 'woocommerce'),\n 'type' => 'select',\n 'options' => array(\n 1 => __('With VAT', 'woocommerce'),\n 0 => __('Without VAT', 'woocommerce')\n ),\n 'description' => __('Set VAT for products in checkout', 'woocommerce'),\n 'default' => '0',\n ),\n\n 'paysto_vat_delivery' => array(\n 'title' => __('VAT for delivery', 'woocommerce'),\n 'type' => 'select',\n 'options' => array(\n 1 => __('With VAT', 'woocommerce'),\n 0 => __('Without VAT', 'woocommerce')\n ),\n 'description' => __('Set VAT for delivery in checkout', 'woocommerce'),\n 'default' => '0',\n ),\n\n 'paysto_ips_servers' => array(\n 'title' => __('IPs Addresses of Paysto callback servers', 'woocommerce'),\n 'type' => 'textarea',\n 'description' => __('This options need for security reason. Each server IP must begin in new line.',\n 'woocommerce'),\n 'default' => '95.213.209.218\n95.213.209.219\n95.213.209.220\n95.213.209.221\n95.213.209.222',\n ),\n\n 'paysto_only_from_ips' => array(\n 'title' => __('Only approved server', 'woocommerce'),\n 'type' => 'checkbox',\n 'label' => __('Use only callbacks from approved Paysto servers', 'woocommerce'),\n 'default' => 'yes',\n ),\n\n 'debug' => array(\n 'title' => __('Debug', 'woocommerce'),\n 'type' => 'checkbox',\n 'label' => __('Switch on logging in file (<code>woocommerce/logs/paysto.txt</code>)',\n 'woocommerce'),\n 'default' => 'no',\n ),\n\n 'description' => array(\n 'title' => __('Description', 'woocommerce'),\n 'type' => 'textarea',\n 'description' => __('Description of payment method which user can see in you site.',\n 'woocommerce'),\n 'default' => __('Payment with Paysto service.', 'woocommerce'),\n ),\n\n 'instructions' => array(\n 'title' => __('Instructions', 'woocommerce'),\n 'type' => 'textarea',\n 'description' => __('Instructions which can added in page of thank-you-payment page.',\n 'woocommerce'),\n 'default' => __('Payment with Paysto service. Thank you very much for you payment.',\n 'woocommerce'),\n ),\n );\n }",
"function settingsInit()\n\t{\n\t\t//Configuration variables: api_key, api_secret, callback_url\n\n\t\tadd_settings_section(\n\t\t\t\t'cvmaker_linkedin_settings', // ID\n\t\t\t\t'LinkedIn Integration Settings', // Title\n\t\t\t\tarray( $this, 'printHeaders' ), // Callback\n\t\t\t\t'cvmaker-admin' // Page\n\t\t\t\t);\n\t\t\n\t\tadd_settings_field(\n\t\t\t\t'li_api_key', // ID\n\t\t\t\t'Client ID', // Title\n\t\t\t\tarray( $this, 'printOption' ), // Callback\n\t\t\t\t'cvmaker-admin', // Page\n\t\t\t\t'cvmaker_linkedin_settings', // Section\n\t\t\t\tarray (\n\t\t\t\t\t\t'label_for' => 'li_api_key',\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t\t);\n\t\t\n\t\tadd_settings_field(\n\t\t\t\t'li_api_secret',\n\t\t\t\t'Client Secret',\n\t\t\t\tarray( $this, 'printOption' ),\n\t\t\t\t'cvmaker-admin',\n\t\t\t\t'cvmaker_linkedin_settings',\n\t\t\t\tarray (\n\t\t\t\t\t\t'label_for' => 'li_api_secret',\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t\t);\n\t\tadd_settings_field(\n\t\t\t\t'li_callback_url',\n\t\t\t\t'Callback URL',\n\t\t\t\tarray( $this, 'printOption' ),\n\t\t\t\t'cvmaker-admin',\n\t\t\t\t'cvmaker_linkedin_settings',\n\t\t\t\tarray (\n\t\t\t\t\t\t'label_for' => 'li_callback_url',\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t\t);\n\t\tregister_setting(\n\t\t\t\t'cvmaker-admin', // Option group\n\t\t\t\t'li_api_key' // Option name\n\t\t\t\t);\n\t\tregister_setting(\n\t\t\t\t'cvmaker-admin', // Option group\n\t\t\t\t'li_api_secret' // Option name\n\t\t\t\t);\n\t\tregister_setting(\n\t\t\t\t'cvmaker-admin', // Option group\n\t\t\t\t'li_callback_url' // Option name\n\t\t\t\t);\n\t}",
"public function settings_page_init() {\n $this->registration();\n $this->sections();\n }",
"public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable plugin', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => __( 'PayEx Financing', 'woocommerce-gateway-payex-payment' )\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title' => __( 'Description', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\t'account_no' => array(\n\t\t\t\t'title' => __( 'Account Number', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Account Number of PayEx Merchant.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'encrypted_key' => array(\n\t\t\t\t'title' => __( 'Encryption Key', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'PayEx Encryption Key of PayEx Merchant.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'mode' => array(\n\t\t\t\t'title' => __( 'Payment Type', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'SELECT' => __( 'User select', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t\t'FINANCING' => __( 'Financing Invoice', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t\t'CREDITACCOUNT' => __( 'Part Payment', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Default payment type.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'FINANCING'\n\t\t\t),\n\t\t\t'language' => array(\n\t\t\t\t'title' => __( 'Language', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'en-US' => 'English',\n\t\t\t\t\t'sv-SE' => 'Swedish',\n\t\t\t\t\t'nb-NO' => 'Norway',\n\t\t\t\t\t'da-DK' => 'Danish',\n\t\t\t\t\t'es-ES' => 'Spanish',\n\t\t\t\t\t'de-DE' => 'German',\n\t\t\t\t\t'fi-FI' => 'Finnish',\n\t\t\t\t\t'fr-FR' => 'French',\n\t\t\t\t\t'pl-PL' => 'Polish',\n\t\t\t\t\t'cs-CZ' => 'Czech',\n\t\t\t\t\t'hu-HU' => 'Hungarian'\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Language of pages displayed by PayEx during payment.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'en-US'\n\t\t\t),\n\t\t\t'testmode' => array(\n\t\t\t\t'title' => __( 'Test Mode', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable PayEx Test Mode', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'yes'\n\t\t\t),\n\t\t\t'debug' => array(\n\t\t\t\t'title' => __( 'Debug', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable logging', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'fee' => array(\n\t\t\t\t'title' => __( 'Fee', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'number',\n\t\t\t\t'custom_attributes' => array(\n\t\t\t\t\t'step' => 'any'\n\t\t\t\t),\n\t\t\t\t'description' => __( 'Financing fee. Set 0 to disable.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => '0'\n\t\t\t),\n\t\t\t'fee_is_taxable' => array(\n\t\t\t\t'title' => __( 'Fee is Taxable', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Fee is Taxable', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t\t'fee_tax_class' => array(\n\t\t\t\t'title' => __( 'Tax class of Fee', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => $this->getTaxClasses(),\n\t\t\t\t'description' => __( 'Tax class of fee.', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'standard'\n\t\t\t),\n\t\t\t'checkout_field' => array(\n\t\t\t\t'title' => __( 'SSN Field on Checkout page', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'SSN Field on Checkout page', 'woocommerce-gateway-payex-payment' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\t\t);\n\t}",
"function init_form_fields()\n\t{\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'topgroupshops' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable this email notification', 'topgroupshops' ),\n\t\t\t\t'default' => 'yes'\n\t\t\t),\n\t\t\t'subject' => array(\n\t\t\t\t'title' => __( 'Subject', 'topgroupshops' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', 'topgroupshops' ), $this->subject ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'heading' => array(\n\t\t\t\t'title' => __( 'Email Heading', 'topgroupshops' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', 'topgroupshops' ), $this->heading ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => ''\n\t\t\t),\n\t\t\t'email_type' => array(\n\t\t\t\t'title' => __( 'Email type', 'topgroupshops' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'description' => __( 'Choose which format of email to send.', 'topgroupshops' ),\n\t\t\t\t'default' => 'html',\n\t\t\t\t'class' => 'email_type',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'plain' => __( 'Plain text', 'topgroupshops' ),\n\t\t\t\t\t'html' => __( 'HTML', 'topgroupshops' ),\n\t\t\t\t\t'multipart' => __( 'Multipart', 'topgroupshops' ),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}",
"public function plugin_settings_init() {\n\t\tregister_setting( 'plugin-boilerplate', 'plugin_settings' );\n\n\t\t//create a settings section - there can be multiple settings sections, just make sure you attribute\n\t\t//the settings fields to the sections you want\n\t\tadd_settings_section( \n\t\t\t'settings-section-id', \n\t\t\t__( 'Plugin Settings Section Title', 'plugin-text-domain' ), \n\t\t\tarray( $this, 'settings_section_callback' ), \n\t\t\t'plugin-boilerplate' );\n\n\t\t//create the settings fields, associate them with the required settings sections\n\t\tadd_settings_field( \n\t\t\t'settings-fields-id', \n\t\t\t__('Settings Fields Title', 'plugin-text-domain' ), \n\t\t\tarray( $this, 'settings_field_callback' ), \n\t\t\t'plugin-boilerplate', \n\t\t\t'settings-section-id' );\n\t\t\n\t}",
"function init_form_fields() {\r\n $this->form_fields = array (\r\n 'enabled' => array (\r\n 'title' => __('Enable/Disable','Bitcoin_Payment'),\r\n 'type' => 'checkbox',\r\n 'label' => __('Enable/Disable the bitcoin payment','Bitcoin_Payment'),\r\n 'default' => 'no',\r\n 'section' => 'default'\r\n ),\r\n 'title' => array (\r\n 'title' => __('Payment gateway title','Bitcoin_Payment'),\r\n 'type' => 'text',\r\n 'default' => __('Bitcoin Payment','Bitcoin_Payment'),\r\n 'desc_tip' => true,\r\n 'css' => 'width:400px',\r\n 'section' => 'default'\r\n ),\r\n 'description' => array (\r\n 'title' => __('Payment gateway description','Bitcoin_Payment'),\r\n 'type' => 'textarea',\r\n 'default' => __('Bitcoin payment','Bitcoin_Payment'),\r\n 'desc_tip' => true,\r\n 'css' => 'width:400px',\r\n 'section' => 'default'\r\n ),\r\n 'instructions' => array(\r\n 'title' => __( 'Instructions', 'Bitcoin_Payment' ),\r\n 'type' => 'textarea',\r\n 'css' => 'width:400px',\r\n 'description' => __( 'Instructions that will be added to the thank you page.', 'Bitcoin_Payment' ),\r\n 'default' => '',\r\n 'section' => 'default'\r\n ),\r\n 'access_key' => array(\r\n 'title' => __( 'access key', 'Bitcoin_Payment' ),\r\n 'type' => 'text',\r\n 'css' => 'width:400px',\r\n 'default' => '',\r\n 'section' => 'default'\r\n ),\r\n 'access_secret' => array(\r\n 'title' => __( 'access secret', 'Bitcoin_Payment' ),\r\n 'type' => 'text',\r\n 'css' => 'width:400px',\r\n 'default' => '',\r\n 'section' => 'default'\r\n ),\r\n \r\n 'recv_secret' => array (\r\n 'title' => __( 'Callback key for signature','Bitcoin_Payment'),\r\n 'type' => 'text',\r\n 'default' => '1',\r\n 'description' => __( 'detail: https://coincheck.com/payment/shop','Bitcoin_Payment'),\r\n 'css' => 'width:400px;',\r\n 'section' => 'default'\r\n )\r\n );\r\n }",
"public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title'\t\t=> __( 'Enable / Disable', 'finnet-kode-bayar' ),\n\t\t\t\t'label'\t\t=> __( 'Enable this payment gateway', 'finnet-kode-bayar' ),\n\t\t\t\t'type'\t\t=> 'checkbox',\n\t\t\t\t'default'\t=> 'no',\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title'\t\t=> __( 'Title', 'finnet-kode-bayar' ),\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t'desc_tip'\t=> __( 'Payment title of checkout process.', 'finnet-kode-bayar' ),\n\t\t\t\t'default'\t=> __( 'Transfer Bank', 'finnet-kode-bayar' ),\n\t\t\t),\n\t\t\t'description' => array(\n\t\t\t\t'title'\t\t=> __( 'Description', 'finnet-kode-bayar' ),\n\t\t\t\t'type'\t\t=> 'textarea',\n\t\t\t\t'desc_tip'\t=> __( 'Payment title of checkout process.', 'finnet-kode-bayar' ),\n\t\t\t\t'default'\t=> __( 'Pembayaran dengan metode transfer bank', 'finnet-kode-bayar' ),\n\t\t\t\t'css'\t\t=> 'max-width:450px;'\n\t\t\t),\n\t\t\t'environtment_url' => array(\n\t\t\t\t'title'\t\t=> __( 'Environtment Url', 'finnet-cc' ),\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t'desc_tip'\t=> __( 'Enter your finnet Environtment Url', 'finnet-cc' ),\n\t\t\t),\n\t\t\t'merchant_id' => array(\n\t\t\t\t'title'\t\t=> __( 'Merchant ID', 'finnet-kode-bayar' ),\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t'desc_tip'\t=> __( 'Enter your finnet Merchant ID', 'finnet-kode-bayar' ),\n\t\t\t),\n\t\t\t'password' => array(\n\t\t\t\t'title'\t\t=> __( 'Password', 'finnet-kode-bayar' ),\n\t\t\t\t'type'\t\t=> 'text',\n\t\t\t\t'desc_tip'\t=> __( 'Enter your finnet password', 'finnet-kode-bayar' ),\n\t\t\t),\n\t\t\t'environment' => array(\n\t\t\t\t'title'\t\t=> __( 'Test Mode', 'finnet-kode-bayar' ),\n\t\t\t\t'label'\t\t=> __( 'Enable Test Mode', 'finnet-kode-bayar' ),\n\t\t\t\t'type'\t\t=> 'checkbox',\n\t\t\t\t'description' => __( 'This is the test mode of gateway.', 'finnet-kode-bayar' ),\n\t\t\t\t'default'\t=> 'no',\n\t\t\t)\n\t\t);\t\t\n\t}",
"function init_form_fields() {\n\t\t\n $key_url = 'https://payments.veritrans.co.id/map/settings/config_info';\n $v2_sandbox_key_url = 'https://my.sandbox.veritrans.co.id';\n $v2_production_key_url = 'https://my.veritrans.co.id';\n \n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', 'woocommerce' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable Veritrans Payment', 'woocommerce' ),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __( 'Title', 'woocommerce' ),\n 'type' => 'text',\n 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),\n 'default' => __( 'Veritrans Payment', 'woocommerce' ),\n 'desc_tip' => true,\n ),\n 'description' => array(\n 'title' => __( 'Customer Message', 'woocommerce' ),\n 'type' => 'textarea',\n\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout', 'woocommerce' ),\n 'default' => ''\n ),\n 'select_veritrans_api_version' => array(\n 'title' => __( 'API Version', 'woocommerce' ),\n 'type' => 'select',\n 'default' => 2,\n 'description' => __( 'Select the Veritrans API version', 'woocommerce' ),\n 'options' => array(\n 1 => __( 'v1', 'woocommerce' ),\n 2 => __( 'v2', 'woocommerce' ),\n ),\n ),\n 'select_veritrans_environment' => array(\n 'title' => __( 'Environment', 'woocommerce' ),\n 'type' => 'select',\n 'default' => 'sandbox',\n 'description' => __( 'Select the Veritrans Environment', 'woocommerce' ),\n 'options' => array(\n 'sandbox' => __( 'Sandbox', 'woocommerce' ),\n 'production' => __( 'Production', 'woocommerce' ),\n ),\n 'class' => 'v2_settings sensitive',\n ),\n\t\t\t'select_veritrans_payment' => array(\n 'title' => __( 'Payment Method', 'woocommerce' ),\n 'type' => 'select',\n 'default' => 'veritrans_web',\n\t\t\t\t'description' => __( 'Select the Veritrans payment system to process payments', 'woocommerce' ),\n\t\t\t\t'options'\t\t=> array(\n\t\t\t\t\t\t\t\t'veritrans_direct' \t\t=> __( 'Direct', 'woocommerce' ),\n\t\t\t\t\t\t\t\t'veritrans_web' \t=> __( 'Web', 'woocommerce' ),\n\t\t\t\t\t\t\t),\n 'class' => 'v1_settings sensitive',\n ),\n\t\t\t'merchant_id' => array(\n 'title' => __( 'Merchant ID', 'woocommerce' ),\n 'type' => 'text',\n\t\t\t\t'description' => sprintf(__( 'Enter your Veritrans Merchant ID. Get the ID <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$key_url),\n 'class' => 'v1_vtweb_settings sensitive',\n ),\n\t\t\t'merchant_hash_key' => array(\n 'title' => __( 'Merchant Hash Key', 'woocommerce' ),\n 'type' => 'text',\n\t\t\t\t'description' => sprintf(__( 'Enter your Veritrans Merchant hash key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$key_url),\n 'class' => 'v1_vtweb_settings sensitive',\n ),\n 'client_key' => array(\n 'title' => __(\"Client Key\", 'woocommerce'),\n 'type' => 'text',\n\t\t\t\t'description' => sprintf(__('Input your Veritrans Client Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$key_url),\n 'default' => '',\n 'class' => 'v1_vtdirect_settings sensitive',\n ),\n 'server_key' => array(\n 'title' => __(\"Server Key\", 'woocommerce'),\n 'type' => 'text',\n\t\t\t\t'description' => sprintf(__('Input your Veritrans Server Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$key_url),\n 'default' => '',\n 'class' => 'v1_vtdirect_settings sensitive'\n ),\n 'client_key_v2_sandbox' => array(\n 'title' => __(\"Client Key\", 'woocommerce'),\n 'type' => 'text',\n 'description' => sprintf(__('Input your <b>Sandbox</b> Veritrans Client Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$v2_sandbox_key_url),\n 'default' => '',\n 'class' => 'v2_sandbox_settings sensitive',\n ),\n 'server_key_v2_sandbox' => array(\n 'title' => __(\"Server Key\", 'woocommerce'),\n 'type' => 'text',\n 'description' => sprintf(__('Input your <b>Sandbox</b> Veritrans Server Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$v2_sandbox_key_url),\n 'default' => '',\n 'class' => 'v2_sandbox_settings sensitive'\n ),\n 'client_key_v2_production' => array(\n 'title' => __(\"Client Key\", 'woocommerce'),\n 'type' => 'text',\n 'description' => sprintf(__('Input your <b>Production</b> Veritrans Client Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$v2_production_key_url),\n 'default' => '',\n 'class' => 'v2_production_settings sensitive',\n ),\n 'server_key_v2_production' => array(\n 'title' => __(\"Server Key\", 'woocommerce'),\n 'type' => 'text',\n 'description' => sprintf(__('Input your <b>Production</b> Veritrans Server Key. Get the key <a href=\"%s\" target=\"_blank\">here</a>', 'woocommerce' ),$v2_production_key_url),\n 'default' => '',\n 'class' => 'v2_production_settings sensitive'\n ),\n 'enable_3d_secure' => array(\n 'title' => __( 'Enable 3D Secure', 'woocommerce' ),\n 'type' => 'checkbox',\n 'label' => __( 'Enable 3D Secure?', 'woocommerce' ),\n 'default' => 'no'\n ),\n );\n\n if (get_woocommerce_currency() != 'IDR')\n {\n $this->form_fields['to_idr_rate'] = array(\n 'title' => __(\"Current Currency to IDR Rate\", 'woocommerce'),\n 'type' => 'text',\n 'class' => 'veritrans_direct',\n 'description' => 'The current currency to IDR rate',\n 'default' => '10000',\n 'class' => 'v1_vtdirect_settings'\n );\n }\n }",
"public function init_fields() {\r\n\r\n\t\tif ( $this->fields ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$scale = get_option( 'scale', 'sq ft' );\r\n\t\t$currency = get_option('listeo_currency');\r\n\t\t\r\n\t\t$this->fields = array(\r\n\t\t\t'basic_info' => array(\r\n\t\t\t\t'title' \t=> __('Basic Information','listeo_core'),\r\n\t\t\t\t'class' \t=> '',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-doc',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'listing_title' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Listing Title', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'name' => 'listing_title',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'Type title that will also contains an unique feature of your listing (e.g. renovated, air contidioned)', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'listing_category' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'listing_category',\r\n\t\t\t\t\t\t\t'taxonomy'\t => 'listing_category',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'This is main listings category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'multi' \t => true,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// 'event_category' => array(\r\n\t\t\t\t\t\t// \t'label' => __( 'Event Category', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'type' => 'term-select',\r\n\t\t\t\t\t\t// \t'placeholder' => '',\r\n\t\t\t\t\t\t// \t'name' => 'event_category',\r\n\t\t\t\t\t\t// \t'taxonomy'\t => 'event_category',\r\n\t\t\t\t\t\t// \t'tooltip'\t => __( 'Those are categories related to your listing type', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'priority' => 10,\r\n\t\t\t\t\t\t// \t'before_row' => '',\r\n\t\t\t\t\t\t// \t'after_row' => '',\r\n\t\t\t\t\t\t// \t'default'\t => '',\r\n\t\t\t\t\t\t// \t'render_row_col' => '4',\r\n\t\t\t\t\t\t// \t'required' => false,\r\n\t\t\t\t\t\t// ),\r\n\t\t\t\t\t\t'service_category' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Service Category', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'service_category',\r\n\t\t\t\t\t\t\t'taxonomy'\t => 'service_category',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'before_row' => '',\r\n\t\t\t\t\t\t\t'after_row' => '',\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t// 'rental_category' => array(\r\n\t\t\t\t\t\t// \t'label' => __( 'Rental Category', 'listeo_core' ),\r\n\t\t\t\t\t\t// \t'type' => 'term-select',\r\n\t\t\t\t\t\t// \t'placeholder' => '',\r\n\t\t\t\t\t\t// \t'name' => 'rental_category',\r\n\t\t\t\t\t\t// \t'taxonomy'\t => 'rental_category',\r\n\t\t\t\t\t\t// \t'priority' => 10,\r\n\t\t\t\t\t\t// \t'before_row' => '',\r\n\t\t\t\t\t\t// \t'after_row' => '',\r\n\t\t\t\t\t\t// \t'default'\t => '',\r\n\t\t\t\t\t\t// \t'render_row_col' => '4',\r\n\t\t\t\t\t\t// \t'required' => false,\r\n\t\t\t\t\t\t// ),\r\n\t\t\t\t\t\t'keywords' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Keywords', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'tooltip'\t => __( 'Maximum of 15 keywords related with your business, separated by coma' , 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => 'keywords',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'default'\t => '',\r\n\t\t\t\t\t\t\t'render_row_col' => '4',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'listing_feature' => array(\r\n\t\t\t\t\t\t\t'label' \t=> __( 'Other Features', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' \t=> 'term-checkboxes',\r\n\t\t\t\t\t\t\t'taxonomy'\t\t=> 'listing_feature',\r\n\t\t\t\t\t\t\t'name'\t\t\t=> 'listing_feature',\r\n\t\t\t\t\t\t\t'class'\t\t \t => 'chosen-select-no-single',\r\n\t\t\t\t\t\t\t'default' \t => '',\r\n\t\t\t\t\t\t\t'priority' \t => 2,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t/*'cancellation_policy' => array(\r\n\t\t\t\t'title' \t=> __('Cancellation policy','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-docs',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'cancellation_policy_description' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Description', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => 'cancellation_policy_description',\r\n\t\t\t\t\t\t\t'type' => 'wp-editor',\r\n\t\t\t\t\t\t\t'description' => __( 'Add Cancellation Policy Description .', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),*/\r\n\t\t\t\t\t\t\r\n\t\t\t'location' => array(\r\n\t\t\t\t'title' \t=> __('Location','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-location',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'_address' => array(\r\n\t\t\t\t\t\t'label' => __( 'Address', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_address',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 7,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_friendly_address' => array(\r\n\t\t\t\t\t\t'label' => __( 'Friendly Address', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_friendly_address',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'tooltip'\t => __('Human readable address, if not set, the Google address will be used', 'listeo_core'),\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 8,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'region' => array(\r\n\t\t\t\t\t\t'label' => __( 'Region', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'term-select',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => 'region',\r\n\t\t\t\t\t\t'taxonomy' => 'region',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 8,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_geolocation_long' => array(\r\n\t\t\t\t\t\t'label' => __( 'Longitude', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_geolocation_long',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_geolocation_lat' => array(\r\n\t\t\t\t\t\t'label' => __( 'Latitude', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_geolocation_lat',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'gallery' => array(\r\n\t\t\t\t'title' \t=> __('Gallery','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-picture',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_gallery' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Gallery', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_gallery',\r\n\t\t\t\t\t\t\t'type' => 'files',\r\n\t\t\t\t\t\t\t'description' => __( 'By selecting (clicking on a photo) one of the uploaded photos you will set it as Featured Image for this listing (marked by icon with star). Drag and drop thumbnails to re-order images in gallery.', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => 'Upload images',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\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),\r\n\t\t\t),\r\n\t\t\t'details' => array(\r\n\t\t\t\t'title' \t=> __('Details','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-docs',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'listing_description' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Description', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => 'listing_description',\r\n\t\t\t\t\t\t\t'type' => 'wp-editor',\r\n\t\t\t\t\t\t\t'description' => __( 'By selecting (clicking on a photo) one of the uploaded photos you will set it as Featured Image for this listing (marked by icon with star). Drag and drop thumbnails to re-order images in gallery.', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'placeholder' => 'Upload images',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t'_video' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Video', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'name' => '_video',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => __( 'URL to oEmbed supported service', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 5,\r\n\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t'_phone' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Phone', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_phone',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t'_website' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Website', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_website',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_email' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'E-mail', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_email',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_email_contact_widget' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Enable Contact Widget', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('With 12 this option enabled listing will display Contact Form Widget that will send emails to this address', 'listeo_core'),\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_email_contact_widget',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_facebook' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-facebook-square\"></i> Facebook', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_facebook',\r\n\t\t\t\t\t\t\t'class'\t\t => 'fb-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_twitter' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-twitter-square\"></i> Twitter', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_twitter',\r\n\t\t\t\t\t\t\t'class'\t\t => 'twitter-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_youtube' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-youtube-square\"></i> YouTube', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_youtube',\r\n\t\t\t\t\t\t\t'class'\t\t => 'youtube-input',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t'_instagram' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-instagram\"></i> Instagram', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_instagram',\r\n\t\t\t\t\t\t\t'class'\t\t => 'instagram-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_whatsapp' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-whatsapp\"></i> WhatsApp', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_whatsapp',\r\n\t\t\t\t\t\t\t'class'\t\t => 'whatsapp-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_skype' => array(\r\n\t\t\t\t\t\t\t'label' => __( '<i class=\"fa fa-skype\"></i> Skype', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_skype',\r\n\t\t\t\t\t\t\t'class'\t\t => 'skype-input',\r\n\t\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_price_min' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Minimum Price Range', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'name' => '_price_min',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('Set only minimum price to show \"Prices starts from \" instead of range', 'listeo_core'),\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '6',\r\n\t\t\t\t\t\t\t'atts' => array(\r\n\t\t\t\t\t\t\t\t'step' => 0.1,\r\n\t\t\t\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_price_max' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Maximum Price Range', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'tooltip'\t => __('Set the maximum price for your service, used on filters in search form', 'listeo_core'),\r\n\t\t\t\t\t\t\t'name' => '_price_max',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '6',\r\n\t\t\t\t\t\t\t'atts' => array(\r\n\t\t\t\t\t\t\t\t'step' => 0.1,\r\n\t\t\t\t\t\t\t\t'min' => 0,\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t),\r\n\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t'opening_hours' => array(\r\n\t\t\t\t'title' \t=> __('Opening Hours','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-clock',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_opening_hours_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Opening Hours status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_opening_hours_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_opening_hours' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Opening Hours', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_opening_hours',\r\n\t\t\t\t\t\t\t'type' => 'hours',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_monday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_monday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t'_tuesday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Tuesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_tuesday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\r\n\t\t\t\t\t\t'_wednesday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_wednesday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\r\n\t\t\t\t\t\t'_thursday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_opening_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_thursday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_friday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_friday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_saturday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_saturday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'_sunday_opening_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_sunday_closing_hour' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'event' => array(\r\n\t\t\t\t'title'\t\t=> __( 'Event Date', 'listeo_core' ),\r\n\t\t\t\t//'class'\t\t=> 'margin-top-40',\r\n\t\t\t\t'icon'\t\t=> 'fa fa-money',\r\n\t\t\t\t'fields'\t=> array(\r\n\t\t\t\t\t'_event_date' => array(\r\n\t\t\t\t\t\t'label' => __( 'Event Date', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('Select date when even will start', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'text',\t\t\t\t\t\t\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_date',\r\n\t\t\t\t\t\t'class'\t\t => 'input-datetime',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_event_date_end' => array(\r\n\t\t\t\t\t\t'label' => __( 'Event Date End', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('Select date when even will end', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'text',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_date_end',\r\n\t\t\t\t\t\t'class'\t\t => 'input-datetime',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'menu' => array(\r\n\t\t\t\t'title' \t=> __('Pricing & Bookable Services','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'sl sl-icon-book-open',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_menu_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Menu status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_menu_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_menu' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Pricing', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_menu',\r\n\t\t\t\t\t\t\t'type' => 'pricing',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'booking' => array(\r\n\t\t\t\t'title' \t=> __('Booking','listeo_core'),\r\n\t\t\t\t'class' \t=> 'margin-top-40 booking-enable',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t//'onoff_state' => 'on',\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t'_booking_status' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Booking status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_booking_status',\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t),\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'slots' => array(\r\n\t\t\t\t'title' \t=> __('Availability','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_slots_status' => array(\r\n\t\t\t\t\t\t\t\t'label' => __( 'Booking status', 'listeo_core' ),\r\n\t\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t\t'name' => '_slots_status',\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t'_slots' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Availability Slots', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'name' => '_slots',\r\n\t\t\t\t\t\t\t'type' => 'slots',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\r\n\t\t\t'basic_prices' => array(\r\n\t\t\t\t'title'\t\t=> __('Booking prices and settings','listeo_core'),\r\n\t\t\t\t//'class'\t\t=> 'margin-top-40',\r\n\t\t\t\t'icon'\t\t=> 'fa fa-money',\r\n\t\t\t\t'fields'\t=> array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'_event_tickets' => array(\r\n\t\t\t\t\t\t'label' => __( 'Available Tickets', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('How many ticekts you have to offer', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_event_tickets',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t'_normal_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Regular Price', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Default price for booking on Monday - Friday', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'default' => '0',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'name' => '_normal_price',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t),\t\r\n\r\n\t\t\t\t\t'_weekday_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Weekend Price', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'tooltip'\t => __('Default price for booking on weekend', 'listeo_core'),\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_weekday_price',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'_reservation_price' => array(\r\n\t\t\t\t\t\t'label' => __( 'Reservation Fee', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_reservation_price',\r\n\t\t\t\t\t\t'tooltip'\t => __('One time fee for booking', 'listeo_core'),\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'unit'\t\t => $currency,\r\n\t\t\t\t\t\t'default' => '0',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t'_expired_after' => array(\r\n\t\t\t\t\t\t'label' => __( 'Reservation expires after', 'listeo_core' ),\r\n\t\t\t\t\t\t'tooltip'\t => __('How many hours you can wait for clients payment', 'listeo_core'),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'default' => '48',\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'name' => '_expired_after',\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'unit'\t\t => 'hours',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '6'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t'_instant_booking' => array(\r\n\t\t\t\t\t\t'label' => __( 'Enable Instant Booking', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'tooltip'\t => __('With this option enabled booking request will be immediately approved ', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_instant_booking',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_count_per_guest' => array(\r\n\t\t\t\t\t\t'label' => __( 'Enable Price per Guest', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t\t'tooltip'\t => __('With this option enabled regular price and weekend price will be multiplied by number of guests to estimate total cost', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_count_per_guest',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t'_min_days' => array(\r\n\t\t\t\t\t\t'label' => __( 'Minimum stay', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Set minimum number of days for reservation', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_min_days',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3',\r\n\t\t\t\t\t\t'for_type'\t => 'rental'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'_max_guests' => array(\r\n\t\t\t\t\t\t'label' => __( 'Maximum number of guests', 'listeo_core' ),\r\n\t\t\t\t\t\t'type' => 'number',\r\n\t\t\t\t\t\t'tooltip'\t => __('Set maximum number of guests per reservation', 'listeo_core'),\r\n\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t'name' => '_max_guests',\r\n\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t'priority' => 10,\r\n\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t'render_row_col' => '3'\r\n\t\t\t\t\t),\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t\t'availability_calendar' => array(\r\n\t\t\t\t'title' \t=> __('Availability Calendar','listeo_core'),\r\n\t\t\t\t//'class' \t=> 'margin-top-40',\r\n\t\t\t\t//'onoff'\t\t=> true,\r\n\t\t\t\t'icon' \t\t=> 'fa fa-calendar-check-o',\r\n\t\t\t\t'fields' \t=> array(\r\n\t\t\t\t\t\t'_availability' => array(\r\n\t\t\t\t\t\t\t'label' => __( 'Click day in calendar to mark it as unavailable', 'listeo_core' ),\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'name' => '_availability_calendar',\r\n\t\t\t\t\t\t\t'type' => 'calendar',\r\n\t\t\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t);\r\n\r\n\t\t$this->fields = apply_filters('submit_listing_form_fields', $this->fields);\r\n\t\t// get listing type\r\n\t\tif ( ! $this->listing_type)\r\n\t\t{\r\n\t\t\t$listing_type_array = get_post_meta( $this->listing_id, '_listing_type' );\r\n\t\t\t$this->listing_type = $listing_type_array[0];\r\n\t\t}\r\n\t\t\r\n\t\t// disable opening hours everywhere outside services\r\n\t\tif ( $this->listing_type != 'service' && apply_filters('disable_opening_hours', true) ) \r\n\t\t\tunset( $this->fields['opening_hours'] );\r\n\r\n\t\t// disable slots everywhere outside services\r\n\t\tif ( $this->listing_type != 'service' && apply_filters('disable_slots', true) ) \r\n\t\t\tunset( $this->fields['slots'] );\r\n\r\n\t\t// disable availability calendar outside rent\r\n\t\tif ( $this->listing_type == 'event' && apply_filters('disable_availability_calendar', true) ) \r\n\t\t\tunset( $this->fields['availability_calendar'] );\r\n\r\n\t\t// disable event date calendar outside events\r\n\t\tif ( $this->listing_type != 'event' ) \r\n\t\t{\r\n\t\t\tunset( $this->fields['event']);\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_event_tickets'] );\r\n\t\t} else {\r\n\t\t\t// disable fields for events\r\n\t\t\t//unset( $this->fields['basic_prices']['fields']['_normal_price'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_weekday_price'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_count_per_guest'] );\r\n\t\t\tunset( $this->fields['basic_prices']['fields']['_max_guests'] );\r\n\r\n\t\t\t$this->fields['basic_prices']['fields']['_event_tickets']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_normal_price']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_normal_price']['label'] = esc_html__('Ticket Price','listeo_core');\r\n\t\t\t$this->fields['basic_prices']['fields']['_reservation_price']['render_row_col'] = 3;\r\n\t\t\t$this->fields['basic_prices']['fields']['_expired_after']['render_row_col'] = 3;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\tif(isset( $this->fields['menu']['fields']['_menu'])){\r\n\t\t\t $this->fields['menu']['fields']['_hide_pricing_if_bookable'] = array(\r\n\t\t\t\t\t'type' => 'checkboxes',\r\n\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'name' => '_hide_pricing_if_bookable',\r\n\t\t\t\t\t'label' => '',\r\n\t\t\t\t\t'placeholder' => '',\r\n\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t'options'\t=> array(\r\n\t\t\t\t\t\t'hide' => __('Hide pricing table on listing page but show bookable services in booking widget', 'listeo_core' )\r\n\t\t\t\t\t),\r\n\t\t\t);\t\r\n\t\t}\r\n\r\n\t\tif(isset( $this->fields['opening_hours']['fields']['_opening_hours'])){\r\n\t\t\t $this->fields['opening_hours']['fields']['_monday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t $this->fields['opening_hours']['fields']['_monday_closing_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_monday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\t\r\n\t\t\t$this->fields['opening_hours']['fields']['_tuesday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Tuesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_tuesday_closing_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Monday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_tuesday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_wednesday_opening_hour'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_wednesday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Wednesday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_wednesday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_thursday_opening_hour'] = array(\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_opening_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_thursday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Thursday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_thursday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\t\r\n\t\t\t$this->fields['opening_hours']['fields']['_friday_opening_hour'] = array(\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_friday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'Friday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_friday_closing_hour',\r\n\t\t\t\t\t\t\t'before_row' \t => '',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_saturday_opening_hour'] = array(\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_saturday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'saturday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_saturday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_sunday_opening_hour'] = array(\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_opening_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t\t$this->fields['opening_hours']['fields']['_sunday_closing_hour'] = array(\t\t\t\r\n\t\t\t\t\t\t\t'label' => __( 'sunday Opening Hour', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'skipped',\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t\t'name' => '_sunday_closing_hour',\r\n\t\t\t\t\t\t\t'priority' => 9,\r\n\t\t\t\t\t\t\t'render_row_col' => '4'\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n\r\n\t\t$this->fields['basic_info']['fields']['product_id'] = array(\r\n\t\t\t\t\t\t\t'name' => 'product_id',\r\n\t\t\t\t\t\t\t'type' => 'hidden',\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t);\r\n\r\n\t\t$this->fields['gallery']['fields']['_thumbnail_id'] = array(\r\n\t\t\t\t\t\t\t'label' => __( 'Thumbnail ID', 'listeo_core' ),\r\n\t\t\t\t\t\t\t'type' => 'hidden',\r\n\t\t\t\t\t\t\t'name' => '_thumbnail_id',\r\n\t\t\t\t\t\t\t'class'\t\t => '',\r\n\t\t\t\t\t\t\t'priority' => 1,\r\n\t\t\t\t\t\t\t'required' => false,\r\n\t\t\t\t\t\t);\r\n\r\n\t\tswitch ( $this->listing_type) {\r\n\t\t\tcase 'event':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('rental','service') ) ) {\r\n\t\t\t\t\t\t\tunset( $this->fields[$group_key]['fields'][$key] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\t//unset( $this->fields['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'service':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('rental','event') ) ) {\r\n\t\t\t\t\t\t\tunset($this->fields[$group_key]['fields'][$key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\t//unset( $this->fields['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t\tbreak;\r\n\t\t\tcase 'rental':\r\n\t\t\t\tforeach ( $this->fields as $group_key => $group_fields ) {\r\n\t\t\t\t\tforeach ( $group_fields['fields'] as $key => $field ) {\r\n\t\t\t\t\t\tif ( !empty($field['for_type']) && in_array($field['for_type'],array('event','service') ) ) {\r\n\t\t\t\t\t\t\tunset($this->fields[$group_key]['fields'][$key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\t//unset( $this->fields['fields']['rental_category']);\r\n\t\t \tbreak;\r\n\t\t\t\r\n\t\t \tdefault:\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['event_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['service_category']);\r\n\t\t// \t\tunset( $this->fields['basic_info']['fields']['rental_category']);\r\n\t\t \t\tbreak;\r\n\t\t }\r\n\t\tif(get_option('listeo_bookings_disabled')){\r\n\t\t\tunset( $this->fields['booking'] );\r\n\t\t\tunset( $this->fields['slots'] );\r\n\t\t\tunset( $this->fields['basic_prices'] );\r\n\t\t\tunset( $this->fields['availability_calendar'] );\r\n\t\t}\r\n\t\t\r\n\t}",
"private function _initBlockSettingsForm()\n\t{\n\t\tglobal $txt;\n\n\t\t// instantiate the block form\n\t\t$this->_blockSettingsForm = new Settings_Form(Settings_Form::DB_ADAPTER);\n\n\t\t$config_vars = array(\n\t\t\tarray('check', 'showleft'),\n\t\t\tarray('check', 'showright'),\n\t\t\tarray('text', 'leftwidth'),\n\t\t\tarray('text', 'rightwidth'),\n\t\t\t'',\n\t\t\tarray('multicheck',\n\t\t\t\t 'sp_IntegrationHide',\n\t\t\t\t 'subsettings' => array('sp_adminIntegrationHide' => $txt['admin'], 'sp_profileIntegrationHide' => $txt['profile'], 'sp_pmIntegrationHide' => $txt['personal_messages'], 'sp_mlistIntegrationHide' => $txt['members_title'], 'sp_searchIntegrationHide' => $txt['search'], 'sp_calendarIntegrationHide' => $txt['calendar'], 'sp_moderateIntegrationHide' => $txt['moderate']),\n\t\t\t\t 'subtext' => $txt['sp_IntegrationHide_desc']\n\t\t\t),\n\t\t);\n\n\t\t$this->_blockSettingsForm->setConfigVars($config_vars);\n\t}",
"public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce-payeezy' ),\n\t\t\t\t'label' => __( 'Enable Payeezy', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no',\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'title' => __( 'Title', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-payeezy' ),\n\t\t\t\t'default' => __( 'Credit Card', 'woocommerce-payeezy' ),\n\t\t\t\t'desc_tip' => true,\n\t\t\t),\n\t\t\t'sandbox' => array(\n\t\t\t\t'title' => __( 'Use Sandbox', 'woocommerce-payeezy' ),\n\t\t\t\t'label' => __( 'Enable sandbox mode - live payments will not be taken if enabled.', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no',\n\t\t\t),\n\t\t\t'merchant_token' => array(\n\t\t\t\t'title' => __( 'Merchant Token', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Merchant Token provided by Payeezy when you establish your account. Contact sales at (866) 588-0503 if you have not received your merchant token. Not required for Sandbox mode.', 'woocommerce-payeezy' ),\n\t\t\t\t'default' => '',\n\t\t\t),\n\t\t\t'transaction_type' => array(\n\t\t\t\t'title' => __( 'Transaction Type', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => __( 'Authorize & Capture', 'woocommerce-payeezy' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'purchase' => 'Authorize & Capture',\n\t\t\t\t\t'authorize' => 'Authorize Only',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'auto_capture' => array(\n\t\t\t\t'title' => __( 'Auto Capture', 'woocommerce-payeezy' ),\n\t\t\t\t'label' => __( 'Automatically attempt to capture transactions that are processed as Authorize Only when order is marked complete.', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'no',\n\t\t\t),\n\t\t\t'transarmor_enabled' => array(\n\t\t\t\t'title' => __( 'Allow Stored Cards', 'woocommerce-payeezy' ),\n\t\t\t\t'label' => __( 'Allow logged in customers to save credit card profiles to use for future purchases', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'yes',\n\t\t\t),\n\t\t\t'cardtypes' => array(\n\t\t\t\t'title' => __( 'Accepted Cards', 'woocommerce-payeezy' ),\n\t\t\t\t'type' => 'multiselect',\n\t\t\t\t'class' => 'chosen_select',\n\t\t\t\t'css' => 'width: 350px;',\n\t\t\t\t'desc_tip' => __( 'Select the card types to accept.', 'woocommerce-payeezy' ),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'visa' => 'Visa',\n\t\t\t\t\t'mastercard' => 'MasterCard',\n\t\t\t\t\t'amex' => 'American Express',\n\t\t\t\t\t'discover' => 'Discover',\n\t\t\t\t\t'jcb' => 'JCB',\n\t\t\t\t\t'diners' => 'Diners Club',\n\t\t\t\t),\n\t\t\t\t'default' => array( 'visa', 'mastercard', 'amex', 'discover' ),\n\t\t\t),\n\t\t);\n\t}",
"public function page_init()\n { \n register_setting(\n 'firebird_grupo',\n 'firebird_name',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'setting_section_id',\n 'Configurações',\n array( $this, 'print_section_info' ),\n 'integracao-firebird-admin'\n ); \n\n add_settings_field(\n 'chave_token_api',\n 'Chave a ser utilizada no acesso a API de Importação',\n array( $this, 'chave_token_api_callback' ),\n 'integracao-firebird-admin',\n 'setting_section_id'\n );\n }",
"private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\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}",
"function initSettingsTypeForm()\n\t{\n\t\tinclude_once(\"./Services/Administration/classes/class.ilSetting.php\");\n\t\t$type = ilSetting::_getValueType();\n\n\t\tinclude_once (\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n $form = new ilPropertyFormGUI();\n\n\t\t$form->setId(\"settings_type\");\n\t\t$form->setTitle($this->lng->txt(\"settings_type\"));\n\t\t$form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\t$item = new ilNonEditableValueGUI($this->lng->txt('settings_type_current'));\n\t\t$item->setValue(strtoupper($type));\n\n\t\tif ($type == \"clob\")\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt('settings_info_clob'));\n $form->addCommandButton(\"showLongerSettings\", $this->lng->txt(\"settings_show_longer\"));\n $form->addCommandButton(\"changeSettingsType\", $this->lng->txt(\"settings_change_text\"));\n\t }\n\t\telse\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt('settings_info_text'));\n \t$form->addCommandButton(\"changeSettingsType\", $this->lng->txt(\"settings_change_clob\"));\n\t\t}\n\t\t$form->addItem($item);\n\n\t\tif (is_array($this->longer_settings))\n\t\t{\n\t\t\t$item = new ilCustomInputGUI($this->lng->txt('settings_longer_values'));\n\n\t\t\tif (count($this->longer_settings))\n\t\t\t{\n\t foreach ($this->longer_settings as $row)\n\t\t\t\t{\n\t $subitem = new ilCustomInputGUI(sprintf($this->lng->txt('settings_key_info'), $row['module'], $row['keyword']));\n\t\t\t\t\t$subitem->setInfo($row['value']);\n\t\t\t\t\t$item->addSubItem($subitem);\n\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t $item->setHTML($this->lng->txt('settings_no_longer_values'));\n\t }\n\t\t\t$form->addItem($item);\n\t }\n\n\t\treturn $form;\n\t}",
"public function load_settings_fields() {\n\t\t\t$this->setting_option_fields = array(\n\t\t\t\t'admin_mail_from_name' => array(\n\t\t\t\t\t'name' => 'admin_mail_from_name',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'From Name', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'This is the name of the sender. If not provided will default to the system email name.', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_name'] ) ? $this->setting_option_values['admin_mail_from_name'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_from_email' => array(\n\t\t\t\t\t'name' => 'admin_mail_from_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'label' => esc_html__( 'From Email', 'learndash' ),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: admin email.\n\t\t\t\t\t\tesc_html_x( 'This is the email address of the sender. If not provided the admin email %s will be used.', 'placeholder: admin email', 'learndash' ),\n\t\t\t\t\t\t'(<strong>' . get_option( 'admin_email' ) . '</strong>)'\n\t\t\t\t\t),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_email'] ) ? $this->setting_option_values['admin_mail_from_email'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_to' => array(\n\t\t\t\t\t'name' => 'admin_mail_to',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Mail To', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'Separate multiple email addresses with a comma, e.g. [email protected], [email protected].', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_to'] ) ? $this->setting_option_values['admin_mail_to'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_subject' => array(\n\t\t\t\t\t'name' => 'admin_mail_subject',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Subject', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_subject'] ) ? $this->setting_option_values['admin_mail_subject'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_message' => array(\n\t\t\t\t\t'name' => 'admin_mail_message',\n\t\t\t\t\t'type' => 'wpeditor',\n\t\t\t\t\t'label' => esc_html__( 'Message', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_message'] ) ? stripslashes( $this->setting_option_values['admin_mail_message'] ) : '',\n\t\t\t\t\t'editor_args' => array(\n\t\t\t\t\t\t'textarea_name' => $this->setting_option_key . '[admin_mail_message]',\n\t\t\t\t\t\t'textarea_rows' => 5,\n\t\t\t\t\t\t'editor_class' => 'learndash_mail_message ' . $this->setting_option_key . '_admin_mail_message',\n\t\t\t\t\t),\n\t\t\t\t\t'label_description' => '<div>\n\t\t\t\t\t\t<h4>' . esc_html__( 'Supported variables', 'learndash' ) . ':</h4>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><span>$userId</span> - ' . esc_html__( 'User-ID', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$username</span> - ' . esc_html__( 'Username', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$quizname</span> - ' . esc_html__( 'Quiz-Name', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$result</span> - ' . esc_html__( 'Result in percent', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$points</span> - ' . esc_html__( 'Reached points', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$ip</span> - ' . esc_html__( 'IP-address of the user', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$categories</span> - ' . esc_html__( 'Category-Overview', 'learndash' ) . '</li>\n\t\t\t\t\t\t</ul>\t\n\t\t\t\t\t</div>',\n\t\t\t\t),\n\t\t\t\t'admin_mail_html' => array(\n\t\t\t\t\t'name' => 'admin_mail_html',\n\t\t\t\t\t'type' => 'checkbox-switch',\n\t\t\t\t\t'label' => esc_html__( 'Allow HTML', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_html'] ) ? $this->setting_option_values['admin_mail_html'] : '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => '',\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\t'user_mail_from_name' => array(\n\t\t\t\t\t'name' => 'user_mail_from_name',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'From Name', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'This is the name of the sender. If not provided will default to the system email name.', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_name'] ) ? $this->setting_option_values['admin_mail_from_name'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_from_email' => array(\n\t\t\t\t\t'name' => 'user_mail_from_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'label' => esc_html__( 'From Email', 'learndash' ),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: admin email.\n\t\t\t\t\t\tesc_html_x( 'This is the email address of the sender. If not provided the admin email %s will be used.', 'placeholder: admin email', 'learndash' ),\n\t\t\t\t\t\t'(<strong>' . get_option( 'admin_email' ) . '</strong>)'\n\t\t\t\t\t),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_from_email'] ) ? $this->setting_option_values['user_mail_from_email'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_subject' => array(\n\t\t\t\t\t'name' => 'user_mail_subject',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Subject', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_subject'] ) ? $this->setting_option_values['user_mail_subject'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_message' => array(\n\t\t\t\t\t'name' => 'user_mail_message',\n\t\t\t\t\t'type' => 'wpeditor',\n\t\t\t\t\t'label' => esc_html__( 'Message', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_message'] ) ? stripslashes( $this->setting_option_values['user_mail_message'] ) : '',\n\t\t\t\t\t'editor_args' => array(\n\t\t\t\t\t\t'textarea_name' => $this->setting_option_key . '[user_mail_message]',\n\t\t\t\t\t\t'textarea_rows' => 5,\n\t\t\t\t\t\t'editor_class' => 'learndash_mail_message ' . $this->setting_option_key . '_user_mail_message',\n\t\t\t\t\t),\n\t\t\t\t\t'label_description' => '<div>\n\t\t\t\t\t\t<h4>' . esc_html__( 'Supported variables', 'learndash' ) . ':</h4>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><span>$userId</span> - ' . esc_html__( 'User-ID', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$username</span> - ' . esc_html__( 'Username', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$quizname</span> - ' . esc_html__( 'Quiz-Name', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$result</span> - ' . esc_html__( 'Result in percent', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$points</span> - ' . esc_html__( 'Reached points', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$ip</span> - ' . esc_html__( 'IP-address of the user', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$categories</span> - ' . esc_html__( 'Category-Overview', 'learndash' ) . '</li>\n\t\t\t\t\t\t</ul>\t\n\t\t\t\t\t</div>',\n\t\t\t\t),\n\t\t\t\t'user_mail_html' => array(\n\t\t\t\t\t'name' => 'user_mail_html',\n\t\t\t\t\t'type' => 'checkbox-switch',\n\t\t\t\t\t'label' => esc_html__( 'Allow HTML', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_html'] ) ? $this->setting_option_values['user_mail_html'] : '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => '',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$this->setting_option_fields = apply_filters( 'learndash_settings_fields', $this->setting_option_fields, $this->settings_section_key );\n\n\t\t\tparent::load_settings_fields();\n\t\t}",
"public function settings_fields() {\n\t\tregister_setting( 'ghupdate', 'ghupdate', array( $this, 'settings_validate' ) );\n\n\t\t// Sections: ID, Label, Description callback, Page ID\n\t\tadd_settings_section( 'ghupdate_private', 'Private Repositories', array( $this, 'private_description' ), 'github-updater' );\n\n\t\t// Private Repo Fields: ID, Label, Display callback, Menu page slug, Form section, callback arguements\n\t\tadd_settings_field(\n\t\t\t'client_id', 'Client ID', array( $this, 'input_field' ), 'github-updater', 'ghupdate_private',\n\t\t\tarray(\n\t\t\t\t'id' => 'client_id',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'client_secret', 'Client Secret', array( $this, 'input_field' ), 'github-updater', 'ghupdate_private',\n\t\t\tarray(\n\t\t\t\t'id' => 'client_secret',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'access_token', 'Access Token', array( $this, 'token_field' ), 'github-updater', 'ghupdate_private',\n\t\t\tarray(\n\t\t\t\t'id' => 'access_token',\n\t\t\t)\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'gh_authorize', '<p class=\"submit\"><input class=\"button-primary\" type=\"submit\" value=\"'.__( 'Authorize with GitHub', 'github_plugin_updater' ).'\" /></p>', null, 'github-updater', 'ghupdate_private', null\n\t\t);\n\n\t}",
"public function init_settings()\n\t{\n\t\tregister_setting('jststm_testimonials_group', 'jststm_testimonials', function($input)\n\t\t{\n\t\t\tforeach($input as $i => $data)\n\t\t\t{\n\t\t\t\t$input[$i]['message'] = sanitize_text_field($data['message']);\n\t\t\t\t$input[$i]['author'] = sanitize_text_field($data['author']);\n\t\t\t}\n\n\t\t\treturn $input;\n\t\t});\n\t}",
"public function init_form_fields() {\n\n\t\t// Get all pages to select Public offer agreement pages\n\t\t$term_posts = array( '' => __( 'Select Public offer agreement Page', AGW_GATEWAY_NAME ));\n\t\t$args = array(\n\t\t\t'post_type' => 'page',\n\t\t\t'post_status' => 'publish',\n\t\t\t'orderby' => 'title', \n\t\t\t'order' => 'ASC',\n\t\t\t'nopaging' => true\n\t\t);\n\t\t$query = new WP_Query;\n\t\t$posts = $query->query( $args );\n\t\tforeach( $posts as $post ) {\n\t\t\t$term_posts[$post->ID] = $post->post_title;\n\t\t}\n\n\t\t$this->form_fields = array(\n\n\t\t\t'enabled' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Enable/Disable', AGW_GATEWAY_NAME ),\n\t\t\t\t'label'\t\t\t=> __( 'Enable payments via AcquiroPay.com', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'type'\t\t\t=> 'checkbox',\n\t\t\t\t'default'\t\t=> 'no'\n\t\t\t),\n\n\t\t\t'title' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Title', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'This controls the title for the payment method the customer sees on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Credit Card payment', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'description' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Description', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Payment method description that the customer will see on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Pay by credit card via secure service AcquiroPay.com', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\n\t\t\t'instructions' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Instructions', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Instructions that will be added to the \"Thank you\" page and emails.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Click \"Continue\" to go to the payment page on AcquiroPay.com', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'textarea',\n\t\t\t),\n\n\t\t\t'pay_button_title' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Pay Button title', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Text on the button on the Checkout page to go to the external Payment page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Pay by card', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'terms_page_prefix' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Text before Public offer agreement link', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'This text with a link to the Public offer agreement placed next to Pay Button on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'I have read and accept the conditions of the', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'terms_page_id' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Public offer agreement', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Public offer to conclude with the Seller a contract for the sale of goods remotely. The customer sees a link to this page on the Checkout page.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> false,\n\t\t\t\t'type'\t\t\t=> 'select',\n\t\t\t\t'options'\t\t=> $term_posts\n\t\t\t),\n\n\t\t\t'product_order_purpose' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Order purpose', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Purpose of a payment in AcquiroPay form. Insert \\'%s\\' to replace by Order ID.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> __( 'Payment for an Order: %s', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'integration_settings_sectionstart' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Integration Settings', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'You need to register on <a href=\"https://acquiropay.com/?from=acquiropay-gateway-woocommerce\" target=\"_blank\">AcquiroPay.com</a> and get these parameters from your AcquiroPay account.', AGW_GATEWAY_NAME ),\n\t\t\t\t'type'\t\t\t=> 'title',\n\t\t\t),\n\n\t\t\t'secret_word' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Secret Word', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'merchant_id' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Merchant ID', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'product_id' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Product ID', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'pay_url' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Processing HTTP URL', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'AcquiroPay payment processing API URL.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> 'https://secure.ipsp.com/',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'check_pay_status_url' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Check Pay HTTP URL', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'AcquiroPay payment checking API URL.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> 'https://gateway.ipsp.com/',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'technical_settings_sectionstart' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Technical Settings', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'type'\t\t\t=> 'title',\n\t\t\t),\n\n\t\t\t'hiding_by_cookie_enabled' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Hide Payment option', AGW_GATEWAY_NAME ),\n\t\t\t\t'label'\t\t\t=> __( 'Hide AcquiroPay Card Payment Option for all customers. This will be useful for safe testing purposes.', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> '',\n\t\t\t\t'type'\t\t\t=> 'checkbox',\n\t\t\t\t'default'\t\t=> 'yes'\n\t\t\t),\n\n\t\t\t'hiding_cookie_rule' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Show Payment Option if Cookie exists', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'Only customers who have added this non-empty cookie to their browser will see AcquiroPay Payment Option. You can add this cookie in your browser inspector by pressing F12 in Chrome for example.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> $this->id . '_enabled',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\n\t\t\t'enable_debug_log' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Enable debug log', AGW_GATEWAY_NAME ),\n\t\t\t\t'label'\t\t\t=> __( 'Send debug info into system debug log file', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> 'Define WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY in wp-config.php to see debug info from plugin.',\n\t\t\t\t'type'\t\t\t=> 'checkbox',\n\t\t\t\t'default'\t\t=> 'yes'\n\t\t\t),\n\n\t\t\t'test_total_price_value' => array(\n\t\t\t\t'title'\t\t\t=> __( 'Order Total Test Value', AGW_GATEWAY_NAME ),\n\t\t\t\t'description'\t=> __( 'You can set any non-zero price value for all orders for testing purposes. If field is empty, the real price value will be used.', AGW_GATEWAY_NAME ),\n\t\t\t\t'default'\t\t=> '',\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t),\n\t\t);\n\n\t\t$this->log( 'Form Fields initialized' );\n\t}",
"public function init_fields() {\n\t\t// Override this function in your class and assign the array of sections to $this->fields.\n\t\t_e( 'Override init_fields() in your class.', '{plugin_jump_starter_textdomain}' );\n\t}",
"public function init()\n\t{\n\t\t$this->init_form_fields();\n \n\t\t// Load the settings.\n\t\t// http://wcdocs.woothemes.com/codex/extending/settings-api/#section-4\n\t\t$this->init_settings();\n\n\t\t// Define user set variables\n\t\t$this->enabled\t\t = $this->settings['enabled'];\n\t\t$this->title \t\t = $this->settings['title'];\n\t\t$this->availability = $this->settings['availability'];\n\t\t$this->countries \t = $this->settings['countries'];\n\t\t\n\t\t$this->jne_settings = get_option( $this->jne_shipping_rate_option );\n\t}",
"public function init()\n {\n $this->setField(\n 'form',\n array(\n 'validators' => array(\n 'is_string',\n 'cmp' => array(\n array(\n 'eq' => 'advanced',\n ),\n ),\n ),\n )\n );\n\n $this->setField(\n 'action',\n array(\n 'validators' => array(\n 'is_string',\n 'cmp' => array(\n array(\n 'eq' => 'laterpay_advanced',\n ),\n ),\n ),\n )\n );\n\n $this->setField(\n '_wpnonce',\n array(\n 'validators' => array(\n 'is_string',\n 'cmp' => array(\n array(\n 'ne' => null,\n ),\n ),\n ),\n )\n );\n\n $this->setField(\n 'main_color',\n array(\n 'validators' => array(\n 'is_string',\n ),\n 'filters' => array(\n 'to_string',\n ),\n )\n );\n\n $this->setField(\n 'hover_color',\n array(\n 'validators' => array(\n 'is_string',\n ),\n 'filters' => array(\n 'to_string',\n ),\n )\n );\n\n $this->setField(\n 'debugger_enabled',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_bool',\n ),\n )\n );\n\n $this->setField(\n 'debugger_addresses',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_string',\n ),\n )\n );\n\n $this->setField(\n 'caching_compatibility',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_bool',\n ),\n )\n );\n\n $this->setField(\n 'enabled_post_types',\n array(\n 'validators' => array(\n 'is_array',\n ),\n )\n );\n\n $this->setField(\n 'show_time_passes_widget_on_free_posts',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_bool',\n ),\n )\n );\n\n $this->setField(\n 'require_login',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_bool',\n ),\n )\n );\n\n $this->setField(\n 'maximum_redemptions_per_gift_code',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_int',\n ),\n )\n );\n\n $this->setField(\n 'teaser_content_word_count',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_int',\n ),\n )\n );\n\n $this->setField(\n 'preview_excerpt_percentage_of_content',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_int',\n ),\n )\n );\n\n $this->setField(\n 'preview_excerpt_word_count_min',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_int',\n ),\n )\n );\n\n $this->setField(\n 'preview_excerpt_word_count_max',\n array(\n 'validators' => array(),\n 'filters' => array(\n 'to_int',\n ),\n )\n );\n\n $this->setField(\n 'unlimited_access',\n array(\n 'validators' => array(\n 'is_array',\n ),\n 'can_be_null' => true,\n )\n );\n\n $this->setField(\n 'api_enabled_on_homepage',\n array(\n 'filters' => array(\n 'to_bool',\n ),\n )\n );\n\n $this->setField(\n 'api_fallback_behavior',\n array(\n 'validators' => array(\n 'in_array' => array(0, 1, 2),\n ),\n 'filters' => array(\n 'to_int',\n ),\n )\n );\n\n $this->setField(\n 'pro_merchant',\n array(\n 'filters' => array(\n 'to_bool',\n ),\n )\n );\n\n $this->setField(\n 'business_model',\n array(\n 'validators' => array(\n 'in_array' => array(\n 'paid',\n 'donation',\n 'contribution'\n ),\n ),\n 'filters' => array(\n 'to_string',\n ),\n )\n );\n }",
"function achilles_settings_init() {\n\t\n\t//create one option to store all of our values. \n register_setting( 'achilles-settings-group', 'achilles-settings' );\n add_settings_section( 'achilles-general-settings', 'General Settings', 'achilles_general_settings_callback', 'achilles' );\n add_settings_field('resident-portal', 'Resident Portal URL', 'resident_portal_url_callback', 'achilles', 'achilles-general-settings');\n add_settings_field('facebook-url', 'Facebook URL', 'facebook_url_callback', 'achilles', 'achilles-general-settings' );\n add_settings_field('google-analytics-id', 'Google Analytics ID', 'google_analytics_id_callback', 'achilles', 'achilles-general-settings');\n\t\n}",
"public function page_init() {\n register_setting( 'bii_instagram', 'bii_instagram' );\n\n add_settings_section(\n 'bii_instagram_oauth',\n __( 'Authentication', 'bii-instagram' ),\n array( &$this, 'print_oauth_section_info' ),\n 'bii-instagram'\n );\n add_settings_field(\n 'bii_instagram_client_id',\n __( 'Client ID', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_id' )\n );\n add_settings_field(\n 'bii_instagram_client_secret',\n __( 'Client Secret', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_secret', 'type' => 'password' )\n );\n }",
"public function get_plugin_settings() {\n $settings = apply_filters( \"ninja_forms_settings\", get_option( \"ninja_forms_settings\" ) );\n\n $settings['date_format'] = isset ( $settings['date_format'] ) ? $settings['date_format'] : 'd/m/Y';\n $settings['currency_symbol'] = isset ( $settings['currency_symbol'] ) ? $settings['currency_symbol'] : '$';\n $settings['recaptcha_lang'] = isset ( $settings['recaptcha_lang'] ) ? $settings['recaptcha_lang'] : 'en';\n $settings['req_div_label'] = isset ( $settings['req_div_label'] ) ? $settings['req_div_label'] : sprintf( __( 'Fields marked with an %s*%s are required', 'ninja-forms' ), '<span class=\"ninja-forms-req-symbol\">','</span>' );\n $settings['req_field_symbol'] = isset ( $settings['req_field_symbol'] ) ? $settings['req_field_symbol'] : '<strong>*</strong>';\n $settings['req_error_label'] = isset ( $settings['req_error_label'] ) ? $settings['req_error_label'] : __( 'Please ensure all required fields are completed.', 'ninja-forms' );\n $settings['req_field_error'] = isset ( $settings['req_field_error'] ) ? $settings['req_field_error'] : __( 'This is a required field', 'ninja-forms' );\n $settings['spam_error'] = isset ( $settings['spam_error'] ) ? $settings['spam_error'] : __( 'Please answer the anti-spam question correctly.', 'ninja-forms' );\n $settings['honeypot_error'] = isset ( $settings['honeypot_error'] ) ? $settings['honeypot_error'] : __( 'Please leave the spam field blank.', 'ninja-forms' );\n $settings['timed_submit_error'] = isset ( $settings['timed_submit_error'] ) ? $settings['timed_submit_error'] : __( 'Please wait to submit the form.', 'ninja-forms' );\n $settings['javascript_error'] = isset ( $settings['javascript_error'] ) ? $settings['javascript_error'] : __( 'You cannot submit the form without Javascript enabled.', 'ninja-forms' );\n $settings['invalid_email'] = isset ( $settings['invalid_email'] ) ? $settings['invalid_email'] : __( 'Please enter a valid email address.', 'ninja-forms' );\n $settings['process_label'] = isset ( $settings['process_label'] ) ? $settings['process_label'] : __( 'Processing', 'ninja-forms' );\n $settings['password_mismatch'] = isset ( $settings['password_mismatch'] ) ? $settings['password_mismatch'] : __( 'The passwords provided do not match.', 'ninja-forms' );\n\n $settings['date_format'] = apply_filters( 'ninja_forms_labels/date_format' , $settings['date_format'] );\n $settings['currency_symbol'] = apply_filters( 'ninja_forms_labels/currency_symbol' , $settings['currency_symbol'] );\n $settings['req_div_label'] = apply_filters( 'ninja_forms_labels/req_div_label' , $settings['req_div_label'] );\n $settings['req_field_symbol'] = apply_filters( 'ninja_forms_labels/req_field_symbol' , $settings['req_field_symbol'] );\n $settings['req_error_label'] = apply_filters( 'ninja_forms_labels/req_error_label' , $settings['req_error_label'] );\n $settings['req_field_error'] = apply_filters( 'ninja_forms_labels/req_field_error' , $settings['req_field_error'] );\n $settings['spam_error'] = apply_filters( 'ninja_forms_labels/spam_error' , $settings['spam_error'] );\n $settings['honeypot_error'] = apply_filters( 'ninja_forms_labels/honeypot_error' , $settings['honeypot_error'] );\n $settings['timed_submit_error'] = apply_filters( 'ninja_forms_labels/timed_submit_error' , $settings['timed_submit_error'] );\n $settings['javascript_error'] = apply_filters( 'ninja_forms_labels/javascript_error' , $settings['javascript_error'] );\n $settings['invalid_email'] = apply_filters( 'ninja_forms_labels/invalid_email' , $settings['invalid_email'] );\n $settings['process_label'] = apply_filters( 'ninja_forms_labels/process_label' , $settings['process_label'] );\n $settings['password_mismatch'] = apply_filters( 'ninja_forms_labels/password_mismatch' , $settings['password_mismatch'] );\n\n return $settings;\n }",
"private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }",
"public function page_init()\n {\n register_setting(\n 'my_option_group', // Option group\n 'linkedin_api_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Request Settings', // Title\n array(), // Callback\n 'my-setting-admin' // Page\n );\n\n add_settings_field(\n 'redirect_url', // ID\n 'Redirect URL', // Title\n array( $this, 'redirect_url_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'client_id',\n 'Client ID',\n array( $this, 'client_id_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'client_secret',\n 'Client Secret',\n array( $this, 'client_secret_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'authorization_code',\n 'Authorization Code For An Access Token',\n array( $this, 'authorization_code_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'access_token',\n 'Access Token',\n array( $this, 'access_token_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n }",
"public function init_form_fields() {\n global $woocommerce;\n\n $this->form_fields = [\n 'enabled' => [\n 'title' => __( 'Enabled/Disabled', $this->id ),\n 'type' => 'checkbox',\n 'label' => 'Enable this shipping method'\n ],\n\n 'usertitle' => [\n 'title' => __( 'Shipping method label', $this->id ),\n 'type' => 'text',\n 'description' => __( 'The label that is visible to the user.', $this->id ),\n 'default' => __( 'Tiered Flat Rate', $this->id )\n ],\n\n 'availability' => [\n 'title' => __( 'Availability', $this->id ),\n 'type' => 'select',\n 'class' => 'wc-enhanced-select availability',\n 'options' => [\n 'all' => 'All allowed countries',\n 'except' => 'All allowed countries, except...',\n 'specific' => 'Specific countries'\n ],\n 'default' => __( 'all', $this->id )\n ],\n\n 'countries' => [\n 'title' => __( 'Countries', $this->id ),\n 'type' => 'multiselect',\n 'class' => 'wc-enhanced-select',\n 'options' => $woocommerce->countries->countries,\n 'default' => __( '', $this->id )\n ],\n\n 'basefee' => [\n 'title' => __( 'Base shipping fee ($)', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Flat shipping fee that is applied automatically to the cart total for any number of items.', $this->id )\n ],\n\n 'tierfee' => [\n 'title' => __( 'Tier shipping fee ($)', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Additional shipping fee added to the base fee if the number of items in the cart exceeds a specified number.', $this->id )\n ],\n\n 'quantity' => [\n 'title' => __( 'Number of items to activate tier shipping fee', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Number of items in the cart needed to activate the additional tier shipping fee.', $this->id )\n ],\n\n 'progressive' => [\n 'title' => __( 'Incremental fee?', $this->id ),\n 'type' => 'checkbox',\n 'label' => __( 'Make the tiered shipping fee incremental' ),\n 'description' => __( 'If this option is checked, the tiered shipping fee will be applied incrementally in multiples of the tier item quantity; otherwise, the tiered shipping fee will be a flat fee if the cart is above the specified quantity.', $this->id )\n ]\n ];\n }",
"function initialize() {\r\n add_filter(\"slp_widget_default_options\", array($this, \"options\"));\r\n add_filter(\"slp_widget_get_settings\" , array($this, \"getSettings\"));\r\n\r\n $this->settings_array = apply_filters(\"slp_widget_default_options\", array());\r\n foreach ($this->settings_array as $setting => $setto) {\r\n $this->$setting = $setto;\r\n }\r\n }",
"public function page_init()\n { \n register_setting(\n 'ccgr_extras_options', // Group name. Must match the settings_fields function call\n 'cc_restricted_email_domains', // Option name\n array( $this, 'sanitize' ) // Callback function for validation.\n );\n\n add_settings_section(\n 'ccgr_extras_options', // ID for the section\n 'Registration Extras', // Title\n array( $this, 'print_section_info' ), // Callback function. Outputs section description.\n 'ccgr_extras' // Page name. Must match do_settings_section function call.\n ); \n\n add_settings_field(\n 'restricted_domains', // ID for the field\n 'Restricted Email Domains', // Title \n array( $this, 'print_domain_form_field' ), // Callback function. Outputs form field inputs.\n 'ccgr_extras', // Page name. Must match do_settings_section function call.\n 'ccgr_extras_options' // ID of the settings section that this goes into (same as the first argument of add_settings_section). \n );\n\n }",
"public function admin_init() {\n\n\t\t// set the settings\n\n\t\t$this->setting_api->set_sections( $this->get_settings_sections());\n\t\t$this->setting_api->set_fields( $this->get_settings_fields() );\n\n\t\t// initialize settings\n\t\t$this->setting_api->admin_init();\n\t}",
"public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }",
"public abstract function settingsForm(array $pluginInfo);",
"private function init_login_settings() {\n\t\t\t//\n\t\t\t// Initialize the section\n\t\t\t//\n\t\t\tadd_settings_section(\n\t\t\t\tself::LOGIN_SECTION_ID,\n\t\t\t\t__( 'Login Settings', 'link-linkid' ),\n\t\t\t\tarray( $this, 'render_login_settings_info' ),\n\t\t\t\tself::LINKID_SETTINGS_PAGE_ID );\n\n\t\t\t//\n\t\t\t// Add fields\n\t\t\t//\n\t\t\t$this->add_field(\n\t\t\t\tLink_WP_LinkID::SETTINGS_LOGIN_ACTIVE,\n\t\t\t\t__( 'Login Active', 'link-linkid' ),\n\t\t\t\tsprintf( __( 'Allow the linkID plugin to add an extra button to the login forms on this website. ' .\n\t\t\t\t 'This button allows users to log in and register (if registrations are' .\n\t\t\t\t 'enabled in the <a href=\"%s\"> general settings</a>) with linkID.', 'link-linkid' ),\n\t\t\t\t\tadmin_url( \"options-general.php\" ) ),\n\t\t\t\tself::INPUT_TYPE_CHECKBOX,\n\t\t\t\tself::LOGIN_SECTION_ID\n\t\t\t);\n\t\t}",
"public function settings_page_init() {\n\n\t\t// register setting API\n\t\tregister_setting( 'csv_files_settings', 'csv_files_settings' );\n\n\t\t// section\n\t\tadd_settings_section( 'csv_files_section', 'Upload Files Data', array( $this, 'csv_files_section_callback' ), 'import-users-cron-page' );\n\n\t\t// fields\n\t\tadd_settings_field( 'csv_files_enable_cron', 'Enable CRON JOB Import', array( $this, 'csv_files_enable_cron_callback' ), 'import-users-cron-page', 'csv_files_section' );\n\t\tadd_settings_field( 'csv_files_folder_path', 'CSV Upload Folder Path<br />*(required), <br />default value: \"csv_user_imports\" ', array( $this, 'csv_files_folder_path_callback' ), 'import-users-cron-page', 'csv_files_section' );\n\t\tadd_settings_field( 'csv_file1_name', 'CSV FILE-1 Name', array( $this, 'csv_file1_name_callback' ), 'import-users-cron-page', 'csv_files_section' );\n\t\tadd_settings_field( 'csv_file2_name', 'CSV FILE-2 Name', array( $this, 'csv_file2_name_callback' ), 'import-users-cron-page', 'csv_files_section' );\n\t\tadd_settings_field( 'csv_file3_name', 'CSV FILE-3 Name', array( $this, 'csv_file3_name_callback' ), 'import-users-cron-page', 'csv_files_section' );\n\n\t}",
"public function optionsdemo_setup_fields() {\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Text field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_textfield',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Text field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Email field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Email field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Password field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_password',\n\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Password field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Number field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_number',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Number field', 'optionsdemo' ),\n\t\t\t\t\t'min' => 1,\n\t\t\t\t\t'max' => 5,\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'URL field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_url',\n\t\t\t\t\t'type' => 'url',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'URL field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Textarea', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_textarea',\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Textarea', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Multiple Checkbox', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_checkbox',\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'countries' => array(\n\t\t\t\t\t\tesc_html__( 'Afghanistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bangladesh', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bhutan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'India', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Maldives', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Nepal', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Pakistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Sri Lanka', 'optionsdemo' )\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Radio', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_radio',\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\tesc_html__( 'Yes', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'No', 'optionsdemo' ),\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Select', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_select',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'countries' => array(\n\t\t\t\t\t\tesc_html__( 'Afghanistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bangladesh', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bhutan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'India', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Maldives', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Nepal', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Pakistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Sri Lanka', 'optionsdemo' )\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Multiple Select', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_multi_select',\n\t\t\t\t\t'type' => 'multiple',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'countries' => array(\n\t\t\t\t\t\tesc_html__( 'Afghanistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bangladesh', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bhutan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'India', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Maldives', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Nepal', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Pakistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Sri Lanka', 'optionsdemo' )\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'File upload 1', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_image',\n\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'File upload 2', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_image2',\n\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tforeach ( $fields as $field ) {\n\t\t\t\tadd_settings_field( $field['id'], $field['label'],\n\t\t\t\t\tarray( $this, 'optionsdemo_field_callback' ),\n\t\t\t\t\t'optionsdemo_general', $field['section'], $field );\n\t\t\t}\n\t\t\t//Setting Register\n\t\t\tregister_setting( 'optionsdemo_general', 'optionsdemo_general' );\n\t\t}",
"public function init_form_fields() {\n\n\t\t$this->form_fields = array(\n\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable this email notification', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'default' => 'yes',\n\t\t\t),\n\n\t\t\t'subject' => array(\n\t\t\t\t'title' => __( 'Subject', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', WC_PDF_Product_Vouchers::TEXT_DOMAIN ), $this->subject ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t),\n\n\t\t\t'subject_multiple' => array(\n\t\t\t\t'title' => __( 'Subject Multiple', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => sprintf( __( 'This controls the email subject line when the email contains more than one voucher. Leave blank to use the default subject: <code>%s</code>.', WC_PDF_Product_Vouchers::TEXT_DOMAIN ), $this->subject_multiple ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t),\n\n\t\t\t'heading' => array(\n\t\t\t\t'title' => __( 'Email Heading', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', WC_PDF_Product_Vouchers::TEXT_DOMAIN ), $this->heading ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t),\n\n\t\t\t'heading_multiple' => array(\n\t\t\t\t'title' => __( 'Email Heading Multiple', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => sprintf( __( 'This controls the main heading contained within the email notification when the email contains more than one voucher. Leave blank to use the default heading: <code>%s</code>.', WC_PDF_Product_Vouchers::TEXT_DOMAIN ), $this->heading_multiple ),\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t),\n\n\t\t\t'email_type' => array(\n\t\t\t\t'title' => __( 'Email type', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'description' => __( 'Choose which format of email to send.', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t'default' => 'html',\n\t\t\t\t'class' => 'email_type',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'plain' => __( 'Plain text', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t\t'html' => __( 'HTML', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t\t'multipart' => __( 'Multipart', WC_PDF_Product_Vouchers::TEXT_DOMAIN ),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}",
"public function setup_fields(){\n\t\t\tadd_settings_section('breakingnews_general', '', array(), 'breakingnews');\n\n\t\t\t$fields = array(\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Breaking News area title', 'text-domain'),\n\t\t\t\t\t'id' => 'breakingnews_area_title',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'section' => 'breakingnews_general',\n\t\t\t\t\t'desc' => esc_html__('e.g. \"Breaking news\"', 'text-domain'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Title text color', 'text-domain'),\n\t\t\t\t\t'id' => 'breakingnews_text_color',\n\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t'section' => 'breakingnews_general',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Text background color', 'text-domain'),\n\t\t\t\t\t'id' => 'breakingnews_bg_color',\n\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t'section' => 'breakingnews_general',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__('Automatically insert breaking news container', 'text-domain'),\n\t\t\t\t\t'id' => 'breakingnews_autoinsert',\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'section' => 'breakingnews_general',\n\t\t\t\t\t'desc' => esc_html__('If there is a <header> tag in the theme template, then it will be automatically inserted at the bottom of this tag. If it\\'s not working or you want it in another place then you can uncheck this option and manually insert this code into the template file: <?php echo do_shortcode(\\'[breaking_news]\\'); ?>', 'text-domain'),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tforeach($fields as $field){\n\t\t\t\tregister_setting('breakingnews', $field['id']);\n\t\t\t\tadd_settings_field($field['id'], $field['label'], [$this, 'field_callback'], 'breakingnews', $field['section'], $field);\n\t\t\t}\n\t\t}",
"function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }",
"public function init_form_fields() {\n\n\t\t$this->form_fields = array(\n\n\t\t\t'enabled' => array(\n\t\t\t\t'title' => __( 'Enable/Disable', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable this shipping method', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'no',\n\t\t\t),\n\n\t\t\t'availability' => array(\n\t\t\t\t'title' => __( 'Method availability', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'default' => 'all',\n\t\t\t\t'class' => 'availability',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'all' => __( 'All allowed countries', 'woocommerce-shipwire' ),\n\t\t\t\t\t'specific' => __( 'Specific Countries', 'woocommerce-shipwire' ),\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'countries' => array(\n\t\t\t\t'title' => __( 'Specific Countries', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'multiselect',\n\t\t\t\t'class' => 'wc-enhanced-select',\n\t\t\t\t'css' => 'width: 450px;',\n\t\t\t\t'default' => '',\n\t\t\t\t'options' => WC()->countries->countries,\n\t\t\t),\n\n\t\t\t'tax_status' => array(\n\t\t\t\t'title' => __( 'Tax Status', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'description' => '',\n\t\t\t\t'default' => 'taxable',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'taxable' => __( 'Taxable', 'woocommerce-shipwire' ),\n\t\t\t\t\t'none' => __( 'None', 'woocommerce-shipwire' ),\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'handling_fee' => array(\n\t\t\t\t'title' => __( 'Handling Fee', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Fee excluding tax. Enter an amount, e.g. 2.50, or a percentage, e.g. 5%. Leave blank to disable.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => '',\n\t\t\t),\n\n\t\t\t'additional_handling_fee' => array(\n\t\t\t\t'title' => __( 'Additional Handling Fee', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Enter an additional handling fee, excluding tax, that is applied to each item in the order after the first item.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => '',\n\t\t\t),\n\n\t\t\t'show_delivery_estimate' => array(\n\t\t\t\t'title' => __( 'Show Delivery Estimates', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => __( 'Show delivery estimates along with shipping services.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'yes'\n\t\t\t),\n\n\t\t\t'require_delivery_confirmation' => array(\n\t\t\t\t'title' => __( 'Require Delivery Confirmation', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => __( 'Check this to only show rates for services that include delivery confirmation.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\n\t\t\t'require_tracking' => array(\n\t\t\t\t'title' => __( 'Require Tracking', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'description' => __( 'Check this to only show rates for services that include tracking information.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'no'\n\t\t\t),\n\n\t\t\t'show_service' => array(\n\t\t\t\t'title' => __( 'Show Carrier Name / Service Level', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'class' => 'hide_service_labels_if_checked',\n\t\t\t\t'description' => __( 'Show actual carrier name and service level (e.g. UPS Ground) for methods instead of generic names (e.g. Ground Shipping).', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'yes'\n\t\t\t),\n\n\t\t\t'label_gd' => array(\n\t\t\t\t'title' => __( 'GD Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for GD Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'Ground Shipping'\n\t\t\t),\n\n\t\t\t'label_1d' => array(\n\t\t\t\t'title' => __( '1D Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for 1D Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'Next Day Shipping'\n\t\t\t),\n\n\t\t\t'label_2d' => array(\n\t\t\t\t'title' => __( '2D Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for GD Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => '2 Day Shipping'\n\t\t\t),\n\n\t\t\t'label_ft' => array(\n\t\t\t\t'title' => __( 'FT Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for FT Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'Standard Shipping'\n\t\t\t),\n\n\t\t\t'label_e_intl' => array(\n\t\t\t\t'title' => __( 'E-INTL Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for E-INTL Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'Express International Shipping'\n\t\t\t),\n\n\t\t\t'label_intl' => array(\n\t\t\t\t'title' => __( 'INTL Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for INTL Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'Standard International Shipping'\n\t\t\t),\n\n\t\t\t'label_pl_intl' => array(\n\t\t\t\t'title' => __( 'PL-INTL Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for PL-INTL Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'PL International Shipping'\n\t\t\t),\n\n\t\t\t'label_pm_intl' => array(\n\t\t\t\t'title' => __( 'PM-INTL Service Label', 'woocommerce-shipwire' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => __( 'Label for PM-INTL Service.', 'woocommerce-shipwire' ),\n\t\t\t\t'default' => 'PM International Shipping'\n\t\t\t),\n\n\t\t);\n\t}",
"public function initSettings() {\n $this->setArguments();\n\n // Create the sections and fields\n $this->setSections();\n\n if (!isset($this->args['opt_name'])) { // No errors please\n return;\n }\n\n // If Redux is running as a plugin, this will remove the demo notice and links\n add_action( 'redux/loaded', array( $this, 'cpt_remove_demo' ) );\n \n // Function to test the compiler hook and demo CSS output.\n // Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function.\n // add_filter('redux/options/'.$this->args['opt_name'].'/compiler', array( $this, 'compiler_action' ), 10, 2);\n \n // Change the arguments after they've been declared, but before the panel is created\n //add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) );\n \n // Change the default value of a field after it's been set, but before it's been useds\n //add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) );\n\n $this->ReduxFramework = new ReduxFramework($this->sections, $this->args);\n }",
"public function init() {\n\t\tparent::init();\n\t\t$this->add_tooltip( 'autofill_list_row_count', sprintf(\n '<h6>%s</h6> %s',\n __( 'Sync Field Value' ),\n __( 'Insert the field ID of a list field on this form. When the number of rows is modified in the list, the value of this field will be autoupdated to match the number of rows.' )\n ) );\n\n add_action( 'gform_field_advanced_settings', array( $this, 'add_setting' ), 10, 2 );\n\n add_action( 'gform_editor_js', array( $this, 'field_settings_js' ) );\n\n add_filter( 'gform_pre_render', array( $this, 'sync_fields' ) );\n\n\t}",
"protected function __construct() {\n\t\t\t$this->settings_page_id = 'learndash_lms_payments';\n\n\t\t\t// This is the 'option_name' key used in the wp_options table.\n\t\t\t$this->setting_option_key = 'learndash_settings_payments_list';\n\n\t\t\t// This is the HTML form field prefix used.\n\t\t\t$this->setting_field_prefix = 'learndash_settings_payments_list';\n\n\t\t\t// Used within the Settings API to uniquely identify this section.\n\t\t\t$this->settings_section_key = 'settings_payments_list';\n\n\t\t\t// Section label/header.\n\t\t\t$this->settings_section_label = esc_html__( 'Payments', 'learndash' );\n\n\t\t\tadd_action( 'learndash_settings_page_init', array( $this, 'learndash_settings_page_init' ), 10, 1 );\n\n\t\t\tparent::__construct();\n\t\t}",
"public function init()\n {\n // set class to identify as p4cms-ui component\n $this->setAttrib('class', 'p4cms-ui')\n ->setAttrib('dojoType', 'p4cms.ui.grid.Form');\n\n // turn off CSRF protection - its not useful here (form data are\n // used for filtering the data grid and may be exposed in the URL)\n $this->setCsrfProtection(false);\n\n // call parent to publish the form.\n parent::init();\n }",
"function settingsForm($field, $instance, $view_mode, $form, &$form_state);",
"public function initGeneralSettingsForm()\n\t{\n\t\tglobal $lng, $ilUser, $styleDefinition, $ilSetting;\n\t\t\n\t\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// language\n\t\tif ($this->userSettingVisible(\"language\"))\n\t\t{\n\t\t\t$languages = $this->lng->getInstalledLanguages();\n\t\t\t$options = array();\n\t\t\tforeach($languages as $lang_key)\n\t\t\t{\n\t\t\t\t$options[$lang_key] = ilLanguage::_lookupEntry($lang_key,\"meta\", \"meta_l_\".$lang_key);\n\t\t\t}\n\t\t\t\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"language\"), \"language\");\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->getLanguage());\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_language\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// skin/style\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSettings.php\");\n\t\tif ($this->userSettingVisible(\"skin_style\"))\n\t\t{\n\t\t\t$templates = $styleDefinition->getAllTemplates();\n\t\t\tif (is_array($templates))\n\t\t\t{ \n\t\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"skin_style\"), \"skin_style\");\n\t\t\t\t\n\t\t\t\t$options = array();\n\t\t\t\tforeach($templates as $template)\n\t\t\t\t{\n\t\t\t\t\t// get styles information of template\n\t\t\t\t\t$styleDef = new ilStyleDefinition($template[\"id\"]);\n\t\t\t\t\t$styleDef->startParsing();\n\t\t\t\t\t$styles = $styleDef->getStyles();\n\n\t\t\t\t\tforeach($styles as $style)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!ilObjStyleSettings::_lookupActivatedStyle($template[\"id\"],$style[\"id\"]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$options[$template[\"id\"].\":\".$style[\"id\"]] =\n\t\t\t\t\t\t\t$styleDef->getTemplateName().\" / \".$style[\"name\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$si->setOptions($options);\n\t\t\t\t$si->setValue($ilUser->skin.\":\".$ilUser->prefs[\"style\"]);\n\t\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_skin_style\"));\n\t\t\t\t$this->form->addItem($si);\n\t\t\t}\n\t\t}\n\n\t\t// screen reader optimization\n\t\tif ($this->userSettingVisible(\"screen_reader_optimization\"))\n\t\t{ \n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"user_screen_reader_optimization\"), \"screen_reader_optimization\");\n\t\t\t$cb->setChecked($ilUser->prefs[\"screen_reader_optimization\"]);\n\t\t\t$cb->setDisabled($ilSetting->get(\"usr_settings_disable_screen_reader_optimization\"));\n\t\t\t$cb->setInfo($this->lng->txt(\"user_screen_reader_optimization_info\"));\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\t// hits per page\n\t\tif ($this->userSettingVisible(\"hits_per_page\"))\n\t\t{\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"hits_per_page\"), \"hits_per_page\");\n\t\t\t\n\t\t\t$hits_options = array(10,15,20,30,40,50,100,9999);\n\t\t\t$options = array();\n\n\t\t\tforeach($hits_options as $hits_option)\n\t\t\t{\n\t\t\t\t$hstr = ($hits_option == 9999)\n\t\t\t\t\t? $this->lng->txt(\"no_limit\")\n\t\t\t\t\t: $hits_option;\n\t\t\t\t$options[$hits_option] = $hstr;\n\t\t\t}\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->prefs[\"hits_per_page\"]);\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_hits_per_page\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// Users Online\n\t\tif ($this->userSettingVisible(\"show_users_online\"))\n\t\t{\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"show_users_online\"), \"show_users_online\");\n\t\t\t\n\t\t\t$options = array(\n\t\t\t\t\"y\" => $this->lng->txt(\"users_online_show_y\"),\n\t\t\t\t\"associated\" => $this->lng->txt(\"users_online_show_associated\"),\n\t\t\t\t\"n\" => $this->lng->txt(\"users_online_show_n\"));\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->prefs[\"show_users_online\"]);\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_show_users_online\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// Store last visited\n\t\t$lv = new ilSelectInputGUI($this->lng->txt(\"user_store_last_visited\"), \"store_last_visited\");\n\t\t$options = array(\n\t\t\t0 => $this->lng->txt(\"user_lv_keep_entries\"),\n\t\t\t1 => $this->lng->txt(\"user_lv_keep_only_for_session\"),\n\t\t\t2 => $this->lng->txt(\"user_lv_do_not_store\"));\n\t\t$lv->setOptions($options);\n\t\t$lv->setValue((int) $ilUser->prefs[\"store_last_visited\"]);\n\t\t$this->form->addItem($lv);\n\n\t\t// hide_own_online_status\n\t\tif ($this->userSettingVisible(\"hide_own_online_status\"))\n\t\t{ \n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"hide_own_online_status\"), \"hide_own_online_status\");\n\t\t\t$cb->setChecked($ilUser->prefs[\"hide_own_online_status\"] == \"y\");\n\t\t\t$cb->setDisabled($ilSetting->get(\"usr_settings_disable_hide_own_online_status\"));\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\t\t\n\t\tinclude_once 'Services/Authentication/classes/class.ilSessionReminder.php';\n\t\tif(ilSessionReminder::isGloballyActivated())\n\t\t{\n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt('session_reminder'), 'session_reminder_enabled');\n\t\t\t$cb->setInfo($this->lng->txt('session_reminder_info'));\n\t\t\t$cb->setValue(1);\n\t\t\t$cb->setChecked((int)$ilUser->getPref('session_reminder_enabled'));\n\n\t\t\t$expires = ilSession::getSessionExpireValue();\n\t\t\t$lead_time_gui = new ilNumberInputGUI($this->lng->txt('session_reminder_lead_time'), 'session_reminder_lead_time');\n\t\t\t$lead_time_gui->setInfo(sprintf($this->lng->txt('session_reminder_lead_time_info'), ilFormat::_secondsToString($expires, true)));\n\n\t\t\t$min_value = ilSessionReminder::MIN_LEAD_TIME;\n\t\t\t$max_value = max($min_value, ((int)$expires / 60) - 1);\n\n\t\t\t$current_user_value = $ilUser->getPref('session_reminder_lead_time');\n\t\t\tif($current_user_value < $min_value ||\n\t\t\t $current_user_value > $max_value)\n\t\t\t{\n\t\t\t\t$current_user_value = ilSessionReminder::SUGGESTED_LEAD_TIME;\n\t\t\t}\n\t\t\t$value = min(\n\t\t\t\tmax(\n\t\t\t\t\t$min_value, $current_user_value\n\t\t\t\t),\n\t\t\t\t$max_value\n\t\t\t);\n\n\t\t\t$lead_time_gui->setValue($value);\n\t\t\t$lead_time_gui->setSize(3);\n\t\t\t$lead_time_gui->setMinValue($min_value);\n\t\t\t$lead_time_gui->setMaxValue($max_value);\n\t\t\t$cb->addSubItem($lead_time_gui);\n\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\t// calendar settings (copied here to be reachable when calendar is inactive)\n\t\t// they cannot be hidden/deactivated\n\n\t\tinclude_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');\n\t\tinclude_once('Services/Calendar/classes/class.ilCalendarUtil.php');\n\t\t$lng->loadLanguageModule(\"dateplaner\");\n\t\t$user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());\n\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_timezone'),'timezone');\n\t\t$select->setOptions(ilCalendarUtil::_getShortTimeZoneList());\n\t\t$select->setInfo($lng->txt('cal_timezone_info'));\n\t\t$select->setValue($user_settings->getTimeZone());\n\t\t$this->form->addItem($select);\n\n\t\t$year = date(\"Y\");\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_date_format'),'date_format');\n\t\t$select->setOptions(array(\n\t\t\tilCalendarSettings::DATE_FORMAT_DMY => '31.10.'.$year,\n\t\t\tilCalendarSettings::DATE_FORMAT_YMD => $year.\"-10-31\",\n\t\t\tilCalendarSettings::DATE_FORMAT_MDY => \"10/31/\".$year));\n\t\t$select->setInfo($lng->txt('cal_date_format_info'));\n\t\t$select->setValue($user_settings->getDateFormat());\n\t\t$this->form->addItem($select);\n\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_time_format'),'time_format');\n\t\t$select->setOptions(array(\n\t\t\tilCalendarSettings::TIME_FORMAT_24 => '13:00',\n\t\t\tilCalendarSettings::TIME_FORMAT_12 => '1:00pm'));\n\t\t$select->setInfo($lng->txt('cal_time_format_info'));\n\t $select->setValue($user_settings->getTimeFormat());\n\t\t$this->form->addItem($select);\n\t\t\n\t\t\n\t\t// starting point\t\n\t\tinclude_once \"Services/User/classes/class.ilUserUtil.php\";\n\t\tif(ilUserUtil::hasPersonalStartingPoint())\n\t\t{\n\t\t\t$this->lng->loadLanguageModule(\"administration\");\n\t\t\t$si = new ilRadioGroupInputGUI($this->lng->txt(\"adm_user_starting_point\"), \"usr_start\");\n\t\t\t$si->setRequired(true);\n\t\t\t$si->setInfo($this->lng->txt(\"adm_user_starting_point_info\"));\n\t\t\t$def_opt = new ilRadioOption($this->lng->txt(\"adm_user_starting_point_inherit\"), 0);\n\t\t\t$def_opt->setInfo($this->lng->txt(\"adm_user_starting_point_inherit_info\"));\n\t\t\t$si->addOption($def_opt);\n\t\t\tforeach(ilUserUtil::getPossibleStartingPoints() as $value => $caption)\n\t\t\t{\n\t\t\t\t$si->addOption(new ilRadioOption($caption, $value));\n\t\t\t}\n\t\t\t$si->setValue(ilUserUtil::hasPersonalStartPointPref()\n\t\t\t\t? ilUserUtil::getPersonalStartingPoint()\n\t\t\t\t: 0);\n\t\t\t$this->form->addItem($si);\n\t\t\t\t\t\t\n\t\t\t// starting point: repository object\n\t\t\t$repobj = new ilRadioOption($lng->txt(\"adm_user_starting_point_object\"), ilUserUtil::START_REPOSITORY_OBJ);\n\t\t\t$repobj_id = new ilTextInputGUI($lng->txt(\"adm_user_starting_point_ref_id\"), \"usr_start_ref_id\");\n\t\t\t$repobj_id->setRequired(true);\n\t\t\t$repobj_id->setSize(5);\n\t\t\tif($si->getValue() == ilUserUtil::START_REPOSITORY_OBJ)\n\t\t\t{\n\t\t\t\t$start_ref_id = ilUserUtil::getPersonalStartingObject();\n\t\t\t\t$repobj_id->setValue($start_ref_id);\n\t\t\t\tif($start_ref_id)\n\t\t\t\t{\n\t\t\t\t\t$start_obj_id = ilObject::_lookupObjId($start_ref_id);\n\t\t\t\t\tif($start_obj_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$repobj_id->setInfo($lng->txt(\"obj_\".ilObject::_lookupType($start_obj_id)).\n\t\t\t\t\t\t\t\": \".ilObject::_lookupTitle($start_obj_id));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$repobj->addSubItem($repobj_id);\n\t\t\t$si->addOption($repobj);\n\t\t}\t\t\n\t\t\n\t\t// selector for unicode characters\n\t\tglobal $ilSetting;\n\t\tif ($ilSetting->get('char_selector_availability') > 0)\n\t\t{\n\t\t\trequire_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';\n\t\t\t$char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_USER);\n\t\t\t$char_selector->getConfig()->setAvailability($ilUser->getPref('char_selector_availability'));\n\t\t\t$char_selector->getConfig()->setDefinition($ilUser->getPref('char_selector_definition'));\n\t\t\t$char_selector->addFormProperties($this->form);\n\t\t\t$char_selector->setFormValues($this->form);\n\t\t}\n\t\t\n\t\t$this->form->addCommandButton(\"saveGeneralSettings\", $lng->txt(\"save\"));\n\t\t$this->form->setTitle($lng->txt(\"general_settings\"));\n\t\t$this->form->setFormAction($this->ctrl->getFormAction($this));\n\t \n\t}",
"public function add_settings_fields()\n\t{\n\t\t$this->add_field(\n\t\t\t'section-info',\n\t\t\t'name',\n\t\t\t'Name',\n\t\t\t'print_field_name',\n\t\t\tarray()\n\t\t);\n\t}",
"public function settingsPage() {\n // Handling the submit for settings page.\n $this->_submitHandler();\n // Getting Default values for the fields.\n $fields = get_option('pii_fields');\n \n ?>\n <div class=\"wrap\">\n <h2><?php echo __('PII Settings'); ?></h2>\n <p><?php echo __('Select the fields you want to be encrypted while storing in database.'); ?></p>\n <form name='pii-settings-form' method='post'>\n <?php wp_nonce_field('pii_settings', 'pii_settings_nonce'); ?>\n <input type='hidden' name='type' value='pii_settings' />\n <?php\n $options = $this->getFields();\n \n foreach ($options as $id => $label) {\n $is_checked = !empty($fields) ? (in_array($id, $fields) ? \" checked\": \"\") : '';\n ?>\n <div><label for='<?php print $id; ?>'><input type='checkbox' name='options[]' value='<?php print $id; ?>' <?php print $is_checked;?> /> <?php print str_replace('meta_', \"\", $label); ?></label><br/></div>\n <?php\n }\n print submit_button();\n ?>\n </form>\n \n <h2><?php echo __('Configure User Meta fields'); ?></h2>\n <form name='pii-custom-fields-form' method='post'>\n <?php wp_nonce_field('pii_custom_meta_fields', 'pii_custom_meta_fields_nonce'); ?>\n <input type='hidden' name='type' value='pii_custom_meta_fields' />\n <?php\n $custom_fields = $this->getCustomFields();\n ?>\n <div><label for='pii_custom_meta_fields'><?php echo __('Provide a separated list of multiple user meta keys to apply encryption.'); ?></br></label><textarea cols='80' rows='10' id='pii_custom_meta_fields' name='pii_custom_meta_fields'><?php print $custom_fields;?></textarea></div>\n <?php \n print submit_button();\n ?>\n </form>\n </div>\n <?php\n }",
"protected function getConfigForm()\n {\n // toDo: Add config to choose items showed by viewedItems\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 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'CAPTURELEADSXAVIER_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\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 array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'type' => 'password',\n 'name' => 'CAPTURELEADSXAVIER_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Column selector'),\n 'name' => 'CAPTURELEADSXAVIER_COL_SEL',\n 'required' => true,\n 'is_bool' => true,\n 'desc' => $this->l('Select on what column you want the module'),\n 'values' => array(\n array(\n 'id' => 'col_left',\n 'value' => \"left\",\n 'label' => $this->l('Left')\n ),\n array(\n 'id' => 'col_right',\n 'value' => \"right\",\n 'label' => $this->l('Right')\n )\n\n ),\n ),\n \n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n )\n );\n }",
"function init_form_fields() {\n global $woocommerce;\n\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => __( 'Enable/Disable', 'woocommerce-bundle-rate-shipping' ), \n 'type' => 'checkbox', \n 'label' => __( 'Enable Bundle Rate shipping', 'woocommerce-bundle-rate-shipping' ), \n 'default' => 'yes'\n ), \n 'title' => array(\n 'title' => __( 'Method Title', 'woocommerce-bundle-rate-shipping' ), \n 'type' => 'text', \n 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-bundle-rate-shipping' ), \n 'default' => __( 'Bundle Rate', 'woocommerce-bundle-rate-shipping' )\n ),\n 'availability' => array(\n 'title' => __( 'Method availability', 'woocommerce-bundle-rate-shipping' ), \n 'type' => 'select', \n 'default' => 'all',\n 'class' => 'availability',\n 'options' => array(\n 'all' => __('All allowed countries', 'woocommerce-bundle-rate-shipping'),\n 'specific' => __('Specific Countries', 'woocommerce-bundle-rate-shipping')\n )\n ),\n 'countries' => array(\n 'title' => __( 'Specific Countries', 'woocommerce-bundle-rate-shipping' ), \n 'type' => 'multiselect', \n 'class' => 'chosen_select',\n 'css' => 'width: 450px;',\n 'default' => '',\n 'options' => $woocommerce->countries->countries\n ),\n 'tax_status' => array(\n 'title' => __( 'Tax Status', 'woocommerce-bundle-rate-shipping' ), \n 'type' => 'select', \n 'description' => '', \n 'default' => 'taxable',\n 'options' => array(\n 'taxable' => __('Taxable', 'woocommerce-bundle-rate-shipping'),\n 'none' => __('None', 'woocommerce-bundle-rate-shipping')\n )\n ), \n 'fee' => array(\n 'title' => __( 'Handling Fee', 'woocommerce-bundle-rate-shipping' ), \n 'type' => 'text', \n 'description' => __('Fee excluding tax. Enter an amount, e.g. 2.50, or a percentage, e.g. 5%. Leave blank to disable.', 'woocommerce-bundle-rate-shipping'),\n 'default' => ''\n ),\n 'apply_base_rate_once' => array(\n 'title' => __( 'Only apply the base rate of most expensive configuration used', 'woocommerce-bundle-rate-shipping' ),\n 'type' => 'select',\n 'description' => __( 'If the shipping total for the cart is calculating using more than one of the shipping rate configurations below, only apply the base rate of the most expensive configuration.', 'woocommerce-bundle-rate-shippin' ), \n 'default' => '1',\n 'options' => array(\n '1' => __( 'Yes', 'woocommerce-bundle-rate-shipping' ),\n '0' => __( 'No', 'woocommerce-bundle-rate-shipping' ) \n ) \n )\n );\n }",
"public function initialise_settings()\n {\n add_settings_section(\n 'acf_elasticsearch_settings',\n 'Settings',\n array($this, 'render_section_settings'),\n 'acf_elasticsearch_settings_page'\n );\n \n // add_settings_field( $id, $title, $callback, $page, $section, $args )\n add_settings_field(\n 'acf_elasticsearch_server',\n 'Server',\n array($this, 'render_option_server'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n \n );\n add_settings_field(\n 'acf_elasticsearch_primary_index',\n 'Primary Index',\n array($this, 'render_option_primary_index'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n );\n add_settings_field(\n 'acf_elasticsearch_secondary_index',\n 'Secondary Index',\n array($this, 'render_option_secondary_index'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n );\n add_settings_field(\n 'acf_elasticsearch_private_primary_index',\n 'Private Primary Index',\n array($this, 'render_option_private_primary_index'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n );\n add_settings_field(\n 'acf_elasticsearch_private_secondary_index',\n 'Private Secondary Index',\n array($this, 'render_option_private_secondary_index'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n );\n add_settings_field(\n 'acf_elasticsearch_read_timeout',\n 'Read Timeout',\n array($this, 'render_option_read_timeout'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n \n );\n add_settings_field(\n 'acf_elasticsearch_write_timeout',\n 'Write Timeout',\n array($this, 'render_option_write_timeout'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n );\n add_settings_field(\n 'acf_elasticsearch_post_types',\n 'Post Types',\n array($this, 'render_option_post_types'),\n 'acf_elasticsearch_settings_page',\n 'acf_elasticsearch_settings'\n );\n\n // register_setting( $option_group, $option_name, $sanitize_callback )\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_server',\n array( $this, 'sanitize_server')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_primary_index',\n array( $this, 'sanitize_primary_index')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_secondary_index',\n array( $this, 'sanitize_secondary_index')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_private_primary_index',\n array( $this, 'sanitize_private_primary_index')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_private_secondary_index',\n array( $this, 'sanitize_private_secondary_index')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_read_timeout',\n array( $this, 'sanitize_read_timeout')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_write_timeout',\n array( $this, 'sanitize_write_timeout')\n );\n register_setting(\n 'acf_elasticsearch_settings',\n 'acf_elasticsearch_post_types',\n array( $this, 'sanitize_post_types')\n );\n\n add_settings_section(\n 'acf_elasticsearch_mapping',\n 'Mappings',\n array($this, 'render_section_mappings'),\n 'acf_elasticsearch_mappings_page'\n );\n\n add_settings_section(\n 'acf_elasticsearch_index',\n 'Index',\n array($this, 'render_section_index'),\n 'acf_elasticsearch_index_page'\n );\n\n /*\n // register_setting( $option_group, $option_name, $sanitize_callback )\n register_setting( 'multiple-sections-settings-group', 'test_multiple_sections_plugin_main_settings_arraykey', array($this, 'plugin_main_settings_validate') );\n\n // add_settings_section( $id, $title, $callback, $page )\n add_settings_section(\n 'additional-settings-section',\n 'Additional Settings',\n array($this, 'print_additional_settings_section_info'),\n 'test-multiple-sections-plugin'\n );\n\n // add_settings_field( $id, $title, $callback, $page, $section, $args )\n add_settings_field(\n 'another-setting',\n 'Another Setting',\n array($this, 'create_input_another_setting'),\n 'test-multiple-sections-plugin',\n 'additional-settings-section'\n );\n\n // register_setting( $option_group, $option_name, $sanitize_callback )\n register_setting( 'multiple-sections-settings-group', 'test_multiple_sections_plugin_additonal_settings_arraykey', array($this, 'plugin_additional_settings_validate') );\n */\n }"
] | [
"0.7855228",
"0.7790488",
"0.7708803",
"0.74731517",
"0.7387096",
"0.7244973",
"0.72300494",
"0.72235256",
"0.7203678",
"0.71672106",
"0.7128408",
"0.7102611",
"0.70766985",
"0.707528",
"0.7049004",
"0.7048586",
"0.7020751",
"0.7016585",
"0.69959944",
"0.69361174",
"0.6924499",
"0.6921341",
"0.6918576",
"0.6916541",
"0.6912231",
"0.68992865",
"0.68880725",
"0.6862459",
"0.6806963",
"0.6800497",
"0.67810357",
"0.6764625",
"0.6754112",
"0.6742225",
"0.67377555",
"0.67290825",
"0.67274994",
"0.67268634",
"0.67233264",
"0.6717994",
"0.6715801",
"0.66888595",
"0.6688288",
"0.6683378",
"0.6664806",
"0.66593474",
"0.6640047",
"0.6632324",
"0.66039556",
"0.65815365",
"0.6574107",
"0.656392",
"0.6561066",
"0.6549064",
"0.6541666",
"0.65305483",
"0.6523975",
"0.65136516",
"0.650582",
"0.6498727",
"0.64928466",
"0.6488266",
"0.64743733",
"0.64660364",
"0.64613664",
"0.64575547",
"0.6448729",
"0.64473873",
"0.64314985",
"0.64254534",
"0.6422546",
"0.64164895",
"0.64070684",
"0.6397297",
"0.63872385",
"0.6380219",
"0.6379909",
"0.63797915",
"0.6371651",
"0.6338662",
"0.6332905",
"0.6328355",
"0.6314554",
"0.6309065",
"0.6303922",
"0.6290306",
"0.6287867",
"0.6284138",
"0.62611926",
"0.6260123",
"0.62591267",
"0.62561005",
"0.6250922",
"0.6247268",
"0.62456936",
"0.62451875",
"0.62276626",
"0.62207",
"0.62156856",
"0.62081754"
] | 0.71847093 | 9 |
Display a listing of the resource. | public function index()
{
//1
$companies = Company::all();
return view('admin.companies.index',compact('companies'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
return view('admin.companies.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(CompanyRequest $request)
{
//
Company::create($request->all());
Session::flash('success','Companie adugat cu succes');
return redirect()->route('companies.index');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.7286258",
"0.71454436",
"0.7132821",
"0.6640289",
"0.6621105",
"0.6566493",
"0.65255576",
"0.65087926",
"0.6448317",
"0.63752604",
"0.63736314",
"0.6365631",
"0.6365631",
"0.6365631",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229"
] | 0.0 | -1 |
Display the specified resource. | public function show(Company $company)
{
//
} | {
"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(Company $company)
{
//
return view('admin.companies.edit',compact('company'));
} | {
"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, Company $company)
{
//
$company->update($request->all());
Session::flash('success','Compania modificata cu succes');
return redirect()->route('companies.index');
} | {
"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(Company $company)
{
//
$company->delete();
Session::flash('success','Compania a fost stearsa');
return redirect()->back();
} | {
"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 |
List of Related Episodes. | public static function accessorRelatedEpisodes($return, $method_name, $episode, $post, $args = [])
{
$episodes = [];
foreach (EpisodeRelation::get_related_episodes($episode->id, ['only_published' => true]) as $related_episode) {
$episodes[] = new Template\Episode(Model\Episode::find_by_id($related_episode->id));
}
return $episodes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function episodes() {\n return $this->hasMany(Episode::class);\n }",
"public function episodes()\n {\n return $this->hasMany('App\\Models\\Episode');\n }",
"public function episodes()\n {\n return $this->hasMany('App\\Episode','tvmazeid','tvmazeid');\n }",
"public function getEpisodes()\n {\n $episodes = [];\n $episode_ids = [];\n $key = self::$prefix['id'].$this->id.\":episodes\";\n\n if (Cache::exists($key)) {\n $episode_ids = Cache::fetch($key);\n foreach ($episode_ids as $episode_id) {\n $episodes[] = CartoonEpisode::get($episode_id);\n }\n } else {\n if ($data = Functions::api_fetch(\"/cartoon/$this->id/episodes\")) {\n foreach ($data as $episode) {\n $episode_ids[] = $episode->id;\n $episodes[] = new CartoonEpisode($episode);\n }\n if($this->status === 'ongoing'){\n Cache::save($key, $episode_ids, DEFAULT_EXPIRE_TIME);\n } else {\n Cache::save($key, $episode_ids);\n }\n }\n }\n return $episodes;\n }",
"public function getEpisodes(){\n $result = array();\n $episodes = $this->getEpisodeIds();\n if($episodes){\n foreach ($episodes as $Id):\n $episode = $this->getEpisode($Id);\n array_push($result, $episode);\n endforeach;\n return $result;\n }\n else{return false;}\n }",
"public function getEpisodes()\n {\n $episodes = [];\n if ($this->isReady) {\n if ($seasons = self::getSeasons() > 0) {\n $arrInfo = $this->doCurl($this->_strUrl . 'episodes');\n $seasons = $this->getSeasonNumbers($arrInfo['contents']);\n foreach ($seasons as $season) {\n $seasonInfo = $this->doCurl($this->_strUrl . 'episodes' . \"/_ajax?season=\" . $season);\n $doc = new Document($seasonInfo['contents']);\n foreach ($doc->find(\".list_item\") as $ep) {\n $plot = trim($ep->find(\"[itemprop='description']\")[0]->text());\n $date = trim($ep->find(\".airdate\")[0]->text());\n if (preg_match(\"/\\d+ .+ \\d+/\", $date) === 0) {\n $date = \"\";\n }\n $episodes[] = [\n \"title\" => trim($ep->find(\"[itemprop='name']\")[0]->text()),\n \"plot\" => strpos($plot, \"Know what this is about\") === false ? $plot : '',\n \"season\" => (int)$season,\n \"num\" => (int)$ep->find(\"[itemprop='episodeNumber']\")[0]->attr(\"content\"),\n \"date\" => isset($date) && !empty($date) ? date('Y-m-d', strtotime($date)) : null\n ];\n }\n }\n }\n }\n return $episodes;\n }",
"public function episodes()\n {\n return app(\n Contracts\\Episodes::class\n );\n }",
"public function episode_list()\n {\n return $this->_ep_list;\n }",
"public function getEpisodes() {\n\n //first get the search data \n $seriesEpisodes = \\Q\\Api\\TheTvDb\\Services\\Series\\Request\\Episodes::create()\n ->setHttpServiceHandler($this->oServiceHandler)\n ->setSecurityService($this->oSecurityService)\n ->fetchAndAddSecurityHeaders()\n ->setParams($this->seriesId)//paginateable\n ->callService();\n\n $this->response = $seriesEpisodes->getResponse();\n\n return $this;\n }",
"public function views()\n {\n $lastYear = Carbon::now()\n ->addMonth()\n ->startOfMonth()\n ->subYear();\n\n return $this->hasMany(EpisodeView::class)\n ->where('created_at', '>=', $lastYear);\n }",
"public static function accessorRelatedEpisodes($return, $method_name, $episode, $post, $args = array()) {\n\t\t$episodes = array();\n\n\t\tforeach (EpisodeRelation::get_related_episodes($episode->id) as $related_episode) {\n\t\t\t$episodes[] = new \\Podlove\\Template\\Episode( \\Podlove\\Model\\Episode::find_by_id($related_episode->id));\n\t\t}\n\t\treturn $episodes;\n\t}",
"public function GetEpisodes()\n {\n $KodiData = new Kodi_RPC_Data(self::$Namespace);\n $KodiData->GetEpisodes(array(\"properties\" => static::$EpisodeItemListSmall));\n //ini_set(\"memory_limit\",\"64M\"); \n $ret = $this->SendDirect($KodiData);\n// var_dump($ret);\n if (is_null($ret))\n return false;\n if ($ret->limits->total > 0)\n return json_decode(json_encode($ret->episodes), true);\n return array();\n }",
"public function videoList()\n {\n return $this->hasMany(Video::class);\n }",
"public function setEpisodes($episodes) {\n $this->properties['episodes'] = $episodes;\n\n return $this;\n }",
"public function videos()\n {\n return $this->morphedByMany('App\\Video', 'taggable');\n }",
"public function videos()\n {\n return $this->hasManyThrough('App\\Video', 'App\\Modulo');\n }",
"public function getRelatedPosts() {}",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function getRelatedLinks()\n {\n return $this->_relLinks;\n }",
"public function posts()\n {\n \treturn $this->morphedByMany(Post::class, 'videoable');\n }",
"public function slides()\n {\n return $this->hasMany('App\\ArticleSlider');\n }",
"public function videos()\n {\n return $this->hasMany('App\\Video');\n }",
"public function get_season_episodes($season_id, $queryargs = array()) {\n return $this->get_child_items_of_type($season_id, 'season', 'episode', $queryargs);\n }",
"protected function episodeViews()\n {\n return app(EpisodeViews::class);\n }",
"public function videos(): MorphToMany\n {\n return $this->morphedByMany(Video::class, 'taggable')->withTimestamps();\n }",
"public function getRelatedRecords()\n {\n return $this->_related;\n }",
"public function videos()\n {\n return $this->morphMany(Video::class, 'videoable');\n }",
"function getEpisodes($id) {\n\t\t// 99 episodes at a time (start & end index)\n\t\t$url = 'http://feeds.theplatform.com/ps/JSON/PortalService/2.2/getReleaseList?callback=&field=ID&field=contentID&field=PID&field=URL&field=categoryIDs&field=length&field=airdate&field=requestCount&PID=HmHUZlCuIXO_ymAAPiwCpTCNZ3iIF1EG&contentCustomField=Show&contentCustomField=Episode&contentCustomField=Network&contentCustomField=Season&contentCustomField=Zone&contentCustomField=Subject&query=Categories|z/HGTVNEWVC%20-%20New%20Video%20Center¶m=Site|shaw.hgtv.ca¶m=k0|id¶m=v0|399¶m=k1|cnt¶m=v1|lifestylehomes¶m=k2|nk¶m=v2|sbrdcst¶m=k3|pr¶m=v3|hgtv¶m=k4|kw¶m=v4|shaw¶m=k5|test¶m=v5|test¶m=k6|ck¶m=v6|video¶m=k7|imp¶m=v7|video¶m=k8|liveinsite¶m=v8|hrtbuy&query=CategoryIDs|'.$id.'&field=thumbnailURL&field=title&field=length&field=description&field=assets&contentCustomField=Part&contentCustomField=Clip%20Type&contentCustomField=Web%20Exclusive&contentCustomField=ChapterStartTimes&contentCustomField=AlternateHeading&startIndex=1&endIndex=200&sortField=airdate&sortDescending=true';\n\t\t$episodes = array();\n\t\t$response = file_get_contents($url);\n\t\tif ($response) {\n\t\t\t$json = json_decode($response);\n\t\t\tforeach ($json->items as $episode) {\n\t\t\t\t$show = null;\n\t\t\t\t$ep = null;\n\t\t\t\t$season = null;\n\t\t\t\t$alternateHeading = null;\n\t\t\t\tforeach ($episode->contentCustomData as $data) {\n\t\t\t\t\tswitch ($data->title) {\n\t\t\t\t\t\tcase 'Show':\n\t\t\t\t\t\t\t$show = $data->value;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'Episode':\n\t\t\t\t\t\t\tif ($data->value != '') {\n\t\t\t\t\t\t\t\t$ep = str_pad($data->value, 2, '0', STR_PAD_LEFT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'Season':\n\t\t\t\t\t\t\tif ($data->value != '') {\n\t\t\t\t\t\t\t\t$season = str_pad($data->value, 2, '0', STR_PAD_LEFT);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'AlternateHeading':\n\t\t\t\t\t\t\t$alternateHeading = $data->value;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// fail if either set is missing\n\t\t\t\tif (!$show) {\n\t\t\t\t\tvar_dump($episode);\n\t\t\t\t\tthrow new Exception('Missing show');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// theres an episode thats labelled as s3 when its actually s1\n\t\t\t\t// check the current episode against the first episode.\n\t\t\t\t// if the first episode is wrong, fuck it, we tried. @todo\n\t\t\t\tif (isset($episodes[0]) && isset($episodes[0]['season']) && $season != $episodes[0]['season']) {\n\t\t\t\t\t$season = $episodes[0]['season'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// things like \"outtakes\" and \"timelapses\" are missing $ep but have an $alternateHeading\n\t\t\t\tif ($alternateHeading) {\n\t\t\t\t\t$title = $show . ' - ' . $alternateHeading . ' - ' . $episode->title;\n\t\t\t\t}\n\t\t\t\telseif ($season && $ep) {\n\t\t\t\t\t$title = $show . ' - S' . $season . 'E' . $ep . ' - ' . $episode->title;\n\t\t\t\t}\n\t\t\t\t// site displays like this if there is no episode #\n\t\t\t\telse {\n\t\t\t\t\t$title = $show . ' - ' . $episode->title;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$xmlString = file_get_contents($episode->URL);\n\t\t\t\tif ($xmlString) {\n\t\t\t\t\t$xml = simplexml_load_string($xmlString);\n\t\t\t\t\t$streamUrl = null;\n\t\t\t\t\tforeach ($xml->choice as $choice) {\n\t\t\t\t\t\tif (strpos($choice->url, 'rtmp://') !== false) {\n\t\t\t\t\t\t\t$streamUrl = $choice->url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!$streamUrl) {\n\t\t\t\t\t\tthrow new Exception('Failed to find rtmp stream for ' . $id);\n\t\t\t\t\t}\n\t\t\t\t\t$streamParts = explode('<break>', $streamUrl);\n\t\t\t\t\tif (count($streamParts) != 2) {\n\t\t\t\t\t\tthrow new Exception('stream url didnt explode on <break>. url was: ' . $streamUrl);\n\t\t\t\t\t}\n\t\t\t\t\t$stream = $streamParts[0];\n\t\t\t\t\t$playlistFile = $streamParts[1];\n\t\t\t\t\t$playlistFileExtension = pathInfo($playlistFile, PATHINFO_EXTENSION);\n\t\t\t\t\tif ($playlistFileExtension == 'flv') {\n\t\t\t\t\t\t$playlist = 'flv:'.str_replace('.flv', '', $playlistFile);\n\t\t\t\t\t}\n\t\t\t\t\telseif ($playlistFileExtension == 'mp4') {\n\t\t\t\t\t\t$playlist = 'mp4:'.$playlistFile;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new Exception('Unhandled playlist file extension: ' . $playlistFile);\n\t\t\t\t\t}\n\n\t\t\t\t\t$episodes[] = array(\n\t\t\t\t\t 'season' => $season,\n\t\t\t\t\t 'title' => $title,\n\t\t\t\t\t 'stream' => $stream,\n\t\t\t\t\t 'playlist' => $playlist,\n\t\t\t\t\t 'raw' => $episode\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Exception('episode->url response was empty');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $episodes;\n\t\t}\n\t\telse {\n\t\t\tthrow new Exception('Episode list response was empty');\n\t\t}\n\t}",
"public function getEpisodeById($id) \n { \n return $this->get('/episodes/'.$id);\n }",
"function getEpisode() {\n \n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $episode_index = $f3->get('PARAMS.param2');\n $data = $tvdb->getSeries($series);\n\n $chunks = explode(\",\", $episode_index);\n $season = $chunks[0]; //\techo \"Season \" . $season;\n $ep = $chunks[1]; //\t\techo \"Ep\" . $ep;\n\n $episode = $tvdb->getEpisode($data[0]->id, $season, $ep, 'en');\n\n echo json_encode($episode);\n }",
"public function movies()\n {\n return $this->morphedByMany('App\\Movie', 'source_genre');\n }",
"public function getPostsVotados()\n {\n return $this->hasMany(Post::className(), ['id' => 'post_id'])->via('votos');\n }",
"function series_episodes ($baseurl, $series_id) {\n $res = curl_http_get(\"{$baseurl}&action=get_series_info&series_id={$series_id}\");\n $episodes = [];\n if (isset($res['episodes'])) {\n foreach ($res['episodes'] as $season) {\n foreach ($season as $episode) {\n $episodes[] = $episode;\n }\n }\n }\n return $episodes;\n}",
"public static function getVideos($episode_id)\n {\n $videos = Videos::find(array(\n \"columns\" => \"host, value, type\",\n \"episode_id = :episode_id:\",\n \"bind\" => array(\"episode_id\" => $episode_id)\n ))->jsonSerialize();\n\n return $videos;\n }",
"public function pokemons()\n {\n return $this->hasMany('LaraDex\\Pokemon');\n }",
"public function videos()\n {\n return $this->hasMany('App\\Video', 'artist');\n }",
"public function findAllByEpisode($episodeId)\n {\n // The associated episode is retrieved only once\n $episode = $this->episodeDAO->find($episodeId);\n\n // The episode won't be retrieved during domain objet construction\n $sql = \"select id, content, user_id, created_at from comments where episode_id=? order by created_at\";\n $result = $this->getDb()->fetchAll($sql, [$episodeId]);\n\n // Convert query result to an array of domain objects\n $comments = [];\n foreach ($result as $row)\n {\n $id = $row['id'];\n $comment = $this->buildDomainObject($row);\n $comment->setEpisode($episode);\n $comments[$id] = $comment;\n }\n\n return $comments;\n }",
"public function getRelatedResources()\r\n {\r\n return $this->related_resources;\r\n }",
"public function downloads() {\n\t\treturn $this->hasMany('\\App\\Models\\Download', 'episode_id', 'id');\n\t}",
"public function talks() : Eloquent\\Relations\\HasMany\n {\n return $this->hasMany(Talk::class);\n }",
"public function faqs() {\n return $this->morphedByMany(Faq::class, 'taggable');\n }",
"public function findAll() {\n $sql = \"select * from movie order by mov_title\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $movies = array();\n foreach ($result as $row) {\n $movieId = $row['mov_id'];\n $movies[$movieId] = $this->buildDomainObject($row);\n }\n return $movies;\n }",
"public function getRelated_resources()\r\n {\r\n return $this->related_resources;\r\n }",
"public function playlistVideos() {\n return $this->hasMany(PlaylistVideos::class, 'playlist_id', '_id');\n }",
"public function hasEpisodes()\n {\n $this->getEpisodes();\n if ($this->episodes !== null && !empty($this->episodes))\n return true;\n return false;\n }",
"public function latestEpisodes($limit = 30){\n if($limit > 50) {\n $limit = 50;\n }\n\n if(isset($this->qs['get']) && $this->qs['get'] === 'dubbed')\n $type = 'dubbed';\n elseif(isset($this->qs['get']) && $this->qs['get'] === 'subbed')\n $type = 'subded';\n else\n $type = '';\n\n if(isset($this->qs['status']) && $this->qs['status'] === 'ongoing')\n $status = 'ongoing';\n else\n $status = '';\n\n $episode = Episode::get(['latest' => 'episodes', 'limit' => $limit, 'type' => $type, 'status' => $status]);\n\n return $this->setResponse($episode);\n }",
"public function videos()\n {\n \treturn $this->belongsToMany( Video::class );\n }",
"public function leagues() {\n\t\treturn $this->belongsToMany('League', 'league_movies');\n\t}",
"public function podcasts()\n {\n return PodcastResource::collection(\\Auth::user()->artist->podcasts);\n }",
"public function relatedPosts()\n {\n $tags = $this->post->tags;\n $categories = $this->post->categories;\n\n $posts = collect();\n\n foreach ($tags as $tag) {\n $posts = $posts\n ->concat($tag->posts\n ->whereNotIn('id', $this->post->id)\n ->sortByDesc('updated_at')\n ->take(3));\n }\n\n if($posts->count() == 0) {\n foreach ($categories as $category) {\n $posts = $posts\n ->concat($category->posts\n ->whereNotIn('id', $this->post->id)\n ->sortByDesc('updated_at')\n ->take(3));\n }\n }\n\n $posts = $posts\n ->unique('id')\n ->sortByDesc('updated_at')\n ->take(4);\n\n return $posts;\n }",
"public function findAll() {\n $sql = \"select * from t_playlist order by media_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n \n // Convert query result to an array of domain objects\n $entities = array();\n foreach ($result as $row) {\n $id = $row['media_id'];\n $entities[$id] = $this->buildDomainObject($row);\n }\n return $entities;\n }",
"public function revisions()\n {\n return $this->morphMany(Revision::class, 'revisionable');\n }",
"public function similar()\n {\n return $this->belongsToMany(\n self::class, \n 'similar_exercises',\n 'exercise',\n 'similar'\n );\n }",
"public function getHostels()\n {\n return $this->hasMany('App\\Hostel', 'owner_id', 'id');\n }",
"public function allVideos()\n {\n return $this\n ->select('*', 'videos.slug as videoSlug', 'artists.slug as artistSlug', 'videos.created_at as uploaded_at')\n ->join('artists', 'videos.artist', '=', 'artists.id')\n ->orderBy('videos.created_at', 'desc')\n ->paginate(10);\n }",
"public function shows()\n {\n return $this->hasMany('App\\Show');\n }",
"public function getSlides()\n {\n return Slide::all();\n }",
"public function run()\n {\n //Episode Movie\n DB::table('episodes')->insert([\n 'movie_id' => 1,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 1,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Hiding'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 1,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Bold'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 1,\n 'episodes'=> 'Episode 4',\n 'title'=> 'I Am Home'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 2,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 2,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Love'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 2,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Goodbye'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 3,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 3,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Hello'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 3,\n 'episodes'=> 'Episode 3',\n 'title'=> 'The Bride'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 3,\n 'episodes'=> 'Episode 4',\n 'title'=> 'The Sword'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 4,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 4,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Tan'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 4,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Twist'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 5,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 5,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Children'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 5,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Book'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 5,\n 'episodes'=> 'Episode 4',\n 'title'=> 'You'\n ]);\n //Episode Kids\n DB::table('episodes')->insert([\n 'movie_id' => 6,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 6,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Movie'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 6,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Ending'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 7,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 7,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Sponge'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 7,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Patrick'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 7,\n 'episodes'=> 'Episode 4',\n 'title'=> 'Squidward'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 8,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 8,\n 'episodes'=> 'Episode 2',\n 'title'=> 'King Bob'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 8,\n 'episodes'=> 'Episode 3',\n 'title'=> 'SuperVillain'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 9,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 9,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Fairies'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 9,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Crocker'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 10,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 10,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Naruto'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 10,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Sasuke'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 10,\n 'episodes'=> 'Episode 4',\n 'title'=> 'End'\n ]);\n //Episode tv Show\n DB::table('episodes')->insert([\n 'movie_id' => 11,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 11,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Twist'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 11,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Phoebe'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 11,\n 'episodes'=> 'Episode 4',\n 'title'=> 'Ending'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 12,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 12,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Missing'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 12,\n 'episodes'=> 'Episode 3',\n 'title'=> 'i am back'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 13,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 13,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Lightning Struck'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 13,\n 'episodes'=> 'Episode 3',\n 'title'=> 'I Am FLASH'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 13,\n 'episodes'=> 'Episode 4',\n 'title'=> 'Lights out'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 14,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 14,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Beginning'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 14,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Runningman Forever'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 14,\n 'episodes'=> 'Episode 4',\n 'title'=> 'New Member'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 15,\n 'episodes'=> 'Episode 1',\n 'title'=> 'Pilot'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 15,\n 'episodes'=> 'Episode 2',\n 'title'=> 'Brother'\n ]);\n DB::table('episodes')->insert([\n 'movie_id' => 15,\n 'episodes'=> 'Episode 3',\n 'title'=> 'Special Guest'\n ]);\n }",
"function grav_related_posts() {\n\techo '<ul id=\"grav-related-posts\">';\n\tglobal $post;\n\t$tags = wp_get_post_tags($post->ID);\n\tif($tags) {\n\t\tforeach($tags as $tag) { $tag_arr .= $tag->slug . ','; }\n $args = array(\n \t'tag' => $tag_arr,\n \t'numberposts' => 5, /* you can change this to show more */\n \t'post__not_in' => array($post->ID)\n \t);\n $related_posts = get_posts($args);\n if($related_posts) {\n \tforeach ($related_posts as $post) : setup_postdata($post); ?>\n\t \t<li class=\"related_post\"><a href=\"<?php the_permalink() ?>\" title=\"<?php the_title_attribute(); ?>\"><?php the_title(); ?></a></li>\n\t <?php endforeach; } \n\t else { ?>\n <li class=\"no_related_post\">No Related Posts Yet!</li>\n\t\t<?php }\n\t}\n\twp_reset_query();\n\techo '</ul>';\n}",
"public function getEpisodes(string $seasonUrl): array\n {\n $episodes = [];\n $ql = Client::get($seasonUrl)\n ->useRequestData($this->request->getRequestData())\n ->execute();\n $ql->find('div.mainbox')\n ->each(function (Elements $element) use (&$episodes) {\n $tableDatum = $element->find('table > tr > td');\n $td2 = $tableDatum->eq(1);\n $image = $tableDatum->eq(0)->find('img')->attr('src');\n //Links\n $firstLink = $td2->find('span > a')->eq(0);\n $secondLink = $td2->find('span > a')->eq(1);\n $episodes[] = [\n 'image' => $this->mtsHost . $image,\n 'title' => $td2->find('span > small > b')->text(),\n 'links' => [\n [\n 'title' => $firstLink->text(),\n 'href' => $this->mtsHost . $firstLink->attr('href')\n ],\n [\n 'title' => $secondLink->text(),\n 'href' => $this->mtsHost . $secondLink->attr('href')\n ]\n ],\n ];\n });\n\n return $episodes;\n }",
"public function videoPosts()\n {\n return $this->hasMany('App\\VideoPost', 'user-id');\n }",
"public function index()\n {\n $eventpartners = Eventpartner::all();\n return $eventpartners;\n }",
"public function articles(){ //establece la relacion entre modelos, en este caso 1 a muchos\n return $this -> hasMany('App\\Article');\n }",
"public function setVideoEpisode($attributes = []);",
"public function items()\n {\n return $this->hasMany('App\\PodcastItem');\n }",
"public function songs()\n\t{\n\t\treturn $this->hasMany('homemusic\\Song');\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $episodePeoples = $em->getRepository('BackendBundle:EpisodePeople')->findAll();\n\n return $this->render('episodepeople/index.html.twig', array(\n 'episodePeoples' => $episodePeoples,\n ));\n }",
"public function favourites()\n {\n return $this->morphMany(Favourite::class, 'favourite');\n }",
"public function articles()\n {\n return $this->morphedByMany('App\\Article', 'taggable');\n }",
"public function shows()\n {\n return $this->belongsToMany(Show::class);\n }",
"public function events()\n {\n return $this->hasMany(Event::class);\n }",
"public function events() {\n return $this->hasMany(Event::class);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $episodes = $em->getRepository('AnimeBundle:Episode')->findAllOrderByDate();\n\n $animeName = [];\n foreach ($episodes as $episode) {\n $animeName[$episode->getId()] = $episode->getAnime()->getName();\n }\n\n return $this->render('episode/index.html.twig', array(\n 'episodes' => $episodes,\n 'animeName' => $animeName,\n ));\n }",
"public function songs()\n {\n return $this->hasMany(Song::class);\n }",
"public function articles() {\n //hasMany representa la relacion de un a muchos\n return $this->hasMany(\"App\\Article\");\n }",
"public function players()\n {\n return $this->belongsToMany(Player::class);\n }",
"public function tracks() {\n return $this->hasMany('App\\Models\\Track');\n }",
"public function movies()\n {\n return $this->hasMany('App\\Movie');\n }",
"public function getEjemplars()\n {\n return $this->hasMany(Ejemplar::class, ['idLibros' => 'idLibros']);\n }",
"public function histories() {\n return $this->morphMany('App\\History', 'for_item');\n }",
"public function videos()\n\t{\n\t\treturn $this->hasMany('App\\PropertyVideos');\n\t}",
"public function index()\n {\n try {\n $episodes = Episode::all();\n return (new EpisodeResourceCollection($episodes))->response();\n } catch (Exception $e) {\n report($e);\n return false;\n }\n }",
"public function hosts()\n {\n return $this->morphedByMany('App\\Models\\Event\\Person\\EventHost', 'persona', 'pivot_persona_org', 'organization_id', 'persona_id');\n }",
"public function getRelationList();",
"public function events()\n {\n return $this->belongsToMany(Event::class, 'event_participant');\n }",
"public function videos()//minuscula_plural_modeloforaneo\n {\n return $this->hasMany('App\\Video');//direccion de modeloforaneo\n }",
"function getEvents($event) {\n $event_criteria = new CDbCriteria;\n $episode_id = $event->episode->id;\n $event_criteria->compare('episode_id', $episode_id);\n return Event::model()->findAll($event_criteria);\n }",
"public function movies()\n {\n return $this->belongsToMany('App\\Core\\Movies\\Movie');\n }",
"public function getExpedientes()\n {\n return $this->hasMany(InterExpedientes::className(), ['modo_id' => 'id']);\n }",
"public function getSource()\n {\n return 'episodes';\n }",
"public function videos()\n {\n \treturn $this->belongsToMany('App\\Video')->withTimeStamps();\n }"
] | [
"0.73645663",
"0.7239512",
"0.6712023",
"0.6679537",
"0.6378966",
"0.6341266",
"0.6295791",
"0.60210484",
"0.60062057",
"0.5887623",
"0.5808207",
"0.5715674",
"0.5563025",
"0.5551839",
"0.55122566",
"0.5471275",
"0.54391813",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5346677",
"0.5308251",
"0.52897304",
"0.5288571",
"0.527562",
"0.52490324",
"0.5241653",
"0.5226891",
"0.52253574",
"0.52195793",
"0.5215582",
"0.5209944",
"0.5197282",
"0.5179286",
"0.5176533",
"0.51674026",
"0.51610994",
"0.5145377",
"0.5140696",
"0.5133663",
"0.51165557",
"0.50941914",
"0.5093283",
"0.5091745",
"0.50830084",
"0.50760037",
"0.5067187",
"0.5066102",
"0.50610006",
"0.5016974",
"0.5012924",
"0.4981996",
"0.4976733",
"0.49731585",
"0.4968406",
"0.49671707",
"0.49304786",
"0.4928411",
"0.49283642",
"0.4923524",
"0.4922224",
"0.4920514",
"0.4918864",
"0.4916154",
"0.49156",
"0.49140722",
"0.4913298",
"0.49097565",
"0.4905146",
"0.49023485",
"0.4898024",
"0.48949012",
"0.4888669",
"0.48851553",
"0.4884489",
"0.48818025",
"0.48766252",
"0.48696446",
"0.4859594",
"0.48575413",
"0.48479825",
"0.4842662",
"0.48410612",
"0.48377755",
"0.48358247",
"0.48339757",
"0.48261112",
"0.48229045",
"0.47971517",
"0.47965553",
"0.47958556",
"0.47905385",
"0.4789001"
] | 0.5803866 | 11 |
This function is the stn. | public static function start() {
require_once dirname ( __FILE__ ) . '/MenuElement.php';
require_once dirname ( __FILE__ ) . '/Service.php';
$services = \tuts\Service::getListOfTypeService ( array (
'forAutocompletion' => false
) );
// echo ' 41: <pre>';var_dump($services); echo '</pre>';
$blockOfServices = '';
foreach ( $services as $idService => $service ) {
require_once dirname ( __FILE__ ) . '/ServiceView.php';
$blockOfServices .= \tuts\ServiceView::buildService ( array (
'service' => $service ['object']
) );
}
$logos = '';
require_once dirname ( __FILE__ ) . '/Logo.php';
$arrayOfLogos = \tuts\Logo::getListOfTypeLogo ( array (
'forAutocompletion' => false
) );
foreach ( $arrayOfLogos as $idLogo => $arrayOfLogo ) {
require_once dirname ( __FILE__ ) . '/LogoView.php';
$logos .= \tuts\LogoView::buildLogo ( array (
'logo' => $arrayOfLogo ['object']
) );
}
require_once dirname ( __FILE__ ) . '/Model.php';
\tuts\Model::setComplete ();
require_once dirname ( __FILE__ ) . '/MenuView.php';
require_once dirname ( __FILE__ ) . '/View.php';
echo \tuts\View::buildView ( array (
'logos' => $logos,
'services' => $blockOfServices,
'menus' => array (
MENU_COMMON => MenuView::buildMenu ( array (
'type' => MENU_COMMON
) ),
MENU_OUTER => MenuView::buildMenu ( array (
'type' => MENU_OUTER
) ),
MENU_INNER => MenuView::buildMenu ( array (
'type' => MENU_INNER
) )
)
///
) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function serch()\n {\n }",
"public function nadar()\n {\n }",
"public function helper()\n\t{\n\t\n\t}",
"function lcs()\n {\n }",
"public function temporality();",
"final function velcom(){\n }",
"public function emitirSom()\n {\n }",
"public function ogs()\r\n {\r\n }",
"function prepareStatus($st)\n {\n }",
"private function __() {\n }",
"function rest_output_rsd()\n {\n }",
"private function _i() {\n }",
"public function trasnaction(){\n\n\t}",
"function _NDL()\r\n\t{\r\n\r\n\t}",
"public function masodik()\n {\n }",
"public function AggiornaPrezzi(){\n\t}",
"public function oops () {\n }",
"public function boleta()\n\t{\n\t\t//\n\t}",
"public function extra_voor_verp()\n\t{\n\t}",
"public function swim()\n {\n }",
"public function sit();",
"public function f02()\n {\n }",
"public function elso()\n {\n }",
"function DWT() { \n }",
"function custom_construction() {\r\n\t\r\n\t\r\n\t}",
"public function f01()\n {\n }",
"abstract protected function mini(): string;",
"public function ssml();",
"public function InputOutput(){\n\t\t\n\t}",
"function getSTID(){\n return $this->STID;\n }",
"public function hapus_toko(){\n\t}",
"function Kravatte_SANSE($key)\n \t{\n \t$this->TAG_SIZE = 32;\n\tself::k_key($key);\n\tself::reset_state();\n self::initialize_history('',True);\n\t}",
"function ss(...$args)\n {\n return Helpers::ss(...$args);\n }",
"public function ex4()\n {\n }",
"public function silo_contents()\n\t{\n\t}",
"function stunnel_printcsr() {\n}",
"function process() ;",
"function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}",
"public function aaa() {\n\t}",
"function displaySNPsStrains($source_id,$is_table,&$strainIndex){\n $strains=array(); $strains=getSNPsStrains($source_id);$rows=\"\";$block=\"\";$count=1;\n if($is_table!=1)$rows=\"<div class='sh'>Strains Selection</div><div id='str-list'>\";\n $strain_keys=array_keys($strains); sort($strain_keys);$j=4;\n foreach($strain_keys as $name){\n $values=$strains[\"$name\"]; $id=$values[\"id\"]; \n if($is_table!=1){ \n $li=\"<li><input type='checkBox' name='strain' value=\\\"t$id\\\" id=\\\"$id\\\" \n onclick=\\\"toggleColumn(this,'snptable',1);\\\" disabled='true'/> $name </li>\";\n if($values[\"display\"]==1)\n $li=\"<li><input type='checkBox' name='strain' value=\\\"t$id\\\" id=\\\"$id\\\" \n onclick=\\\"toggleColumn(this,'snptable',1);\\\" /> $name </li>\";\n if($count%25==0){$rows.=\"<ul>$block</ul>\";$block=\"\";}\n else $block.=$li; ++$count;\n }else{\n $len=strlen($name);$verticalName=\"\"; //<ul>\";\r\n for($p=0;$p<=$len-1;++$p){\n if(!empty($name[$p]))$verticalName.=\"$name[$p]<br/>\"; //</li>\";\n }\n //$verticalName.=\"</ul>\";\n $strainIndex[$j]=$id; $rows.=\"<th class='strainlabel' id='t$j'>$verticalName</th>\";\r\n ++$j;\n \n }\n }\n if($is_table!=1){if(!empty($block))$rows.=\"<ul>$block</ul>\";$block=\"\";}\n if($is_table!=1)$rows.=\"</div>\";\n return $rows; \n}",
"function State_4($parameters) \n\t{\n\t}",
"function PrimaryReturn($otype){\r\n}",
"function specialop() {\n\n\n\t}",
"public function sing() {\n\t\t\techo $this->name . \" sings 'Grrrr grrr grr grrrrrrr' </br>\";\n\t\t}",
"public function custom()\n\t{\n\t}",
"public static function main(){\n\t\t\t\n\t\t}",
"public function step_2()\n {\n }",
"protected function test9() {\n\n }",
"function spl_sq(&$itme,$key,$val){\r\n }",
"function s($str){ echo '<pre>'; print_r($str); echo '</pre>'; }",
"final private function __construct(){\r\r\n\t}",
"protected function info()\n\t\t{\n\t\t}",
"function fix() ;",
"function extract()\n {\n }",
"function __toString () {\n \n \n \n }",
"private function j() {\n }",
"function get_stdygds($classid){\r\n\r\n}",
"abstract public function getPasiekimai();",
"public function get_output()\n {\n }",
"private function __construct()\t{}",
"function render() ;",
"public function falar(){\n\t\treturn \"Som\";\n\t}",
"function stan_lacznika($stan,$nr_rups)\n{\t\n\tif($stan==1 && $nr_rups==1) // zamkniety dla rups1\n\t{\n\t\t$wspolrzedna=230;\t\n\t}\n\telseif($stan==0 && $nr_rups==1) // otwarty dla rups1\n\t{\n\t\t$wspolrzedna=220;\n\t}\t\n\telseif($stan==1 && $nr_rups==2) // zamkniety dla rups2\n\t{\n\t\t$wspolrzedna=460;\t\n\t}\n\telseif($stan==0 && $nr_rups==2) // otwarty dla rups2\n\t{\n\t\t$wspolrzedna=450;\n\t}\t\n\telseif($stan==1 && $nr_rups==3.1) // zamkniety dla rups3\n\t{\n\t\t$wspolrzedna=690;\t\n\t}\n\telseif($stan==0 && $nr_rups==3.1) // otwarty dla rups3\n\t{\n\t\t$wspolrzedna=680;\n\t}\n\telseif($stan==1 && $nr_rups==3.2) // zamkniety dla rups3\n\t{\n\t\t$wspolrzedna=710;\t\n\t}\n\telseif($stan==0 && $nr_rups==3.2) // otwarty dla rups3\n\t{\n\t\t$wspolrzedna=700;\n\t}\n\telseif($stan==1 && $nr_rups==4) // zamkniety dla rups4\n\t{\n\t\t$wspolrzedna=940;\t\n\t}\n\telseif($stan==0 && $nr_rups==4) // otwarty dla rups4\n\t{\n\t\t$wspolrzedna=930;\n\t}\n\telseif($stan==1 && $nr_rups==8) // zamkniety dla rups8\n\t{\n\t\t$wspolrzedna=1170;\t\n\t}\n\telseif($stan==0 && $nr_rups==8) // otwarty dla rups8\n\t{\n\t\t$wspolrzedna=1160;\n\t}\t\n\telseif($stan==1 && $nr_rups==9.1) // zamkniety dla rups9.1\n\t{\n\t\t$wspolrzedna=1415;\t\n\t}\n\telseif($stan==0 && $nr_rups==9.1) // otwarty dla rups9.1\n\t{\n\t\t$wspolrzedna=1405;\n\t}\n\telseif($stan==1 && $nr_rups==9.2) // zamkniety dla rups9.2\n\t{\n\t\t$wspolrzedna=1435;\t\n\t}\n\telseif($stan==0 && $nr_rups==9.2) // otwarty dla rups9.2\n\t{\n\t\t$wspolrzedna=1425;\n\t}\t\t\n\telseif($stan==1 && $nr_rups==9.3) // zamkniety dla rups9.3\n\t{\n\t\t$wspolrzedna=1455;\t\n\t}\n\telseif($stan==0 && $nr_rups==9.3) // otwarty dla rups9.3\n\t{\n\t\t$wspolrzedna=1445;\n\t}\t\n\t\n\treturn $wspolrzedna;\n}",
"protected function _insert()\n\t{\n\t}",
"public function writeTop()\n {\n }",
"function get_stdygd($stdyid){\r\n\r\n}",
"public function main()\r\n {\r\n \r\n }",
"abstract public function states();",
"abstract function fromexp();",
"function section_null () {echo \"top\"; asdf();}",
"public function renderStrom()\n {\n $this->template->dokument_id = $this->getParameter('dokument_id');\n\n $Spisy = new Spis();\n $args = ['where' => ['stav = 1']];\n $args = $Spisy->spisovka($args);\n $result = $Spisy->seznamRychly($args['where']);\n $result->setRowClass(null);\n $this->template->spisy = $result->fetchAll();\n }",
"function savelink(){\n\t\tglobal $sql;\n\t\tsettype($newsid,'int');\n\t\tsettype($linkid,'int');\n\t\tsettype($productid,'int');\t\t\t\t\n\t\t$sql = 'INSERT INTO `'.DB_TABLE_PREFIX.'productnewslink`(`productid`,`newsid`,`ctrl`,`from`) VALUES('.$this->productid.','.$this->newsid.','.$this->ctrl.','.$this->from.')';\t\t\n\t\t_trace($sql);\t\t\t\t\n\t\tmysql_query($sql);\n\t}",
"function output() {\n \n }",
"function import_STE()\n{\n}",
"function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}",
"public function __construct()\n\t\t{\n\t\t\t\n\t\t}",
"function getFinal()\n {\n }",
"function summary() {\n return NULL;\n }",
"public function main()\n\t{\n\t}",
"function toigian_ps()\n {\n $uscln = $this->USCLN($this->tuso, $this->mauso);\n $this->tuso = $this->tuso/$uscln;\n $this->mauso = $this->mauso/$uscln;\n }",
"function main_section() {\n\t\t\t\t// GNDN\n\t\t}",
"function DiscountConstructFunctions()\n\t{\t\n\t}",
"function __construct() ;",
"function _construct() {\n \t\n\t\t\n\t}",
"function __construct (){\n\t\t}",
"public function leer(){\n }",
"public function __construct()\n\t\t{\t\t\t\n\t\t}",
"abstract public function information();",
"abstract protected function _preProcess();",
"public function cs(){\n }",
"public function leer(){\n }",
"public function leer(){\n }",
"private function __construct() {\r\n\t\t\r\n\t}",
"public function obtener()\n {\n }",
"function noidungtt($sotu,$noidung)\n{\n\n\t$n=explode(\" \",$noidung);\n\t$noidunginra=\" \";\n\tif($sotu<=count($n)){\n for($i=0;$i<$sotu;$i++)\n\t\t $noidunginra = $noidunginra.$n[$i].\" \";\n $noidunginra .=\"...\";\n }\n\telse\n\t\techo \"<h1>cảnh báo : số từ tóm lược nhiều hơn nội dung ban đầu</h1>\"; \n\treturn $noidunginra;\n}",
"public static function declarations()\n {\n \n }",
"function saveVister()\n {\n \n }",
"function __toString() ;",
"function __toString() ;",
"public function actionSh()\n {\n\n\n }",
"function stdtls(){\r\n\t\t\t\t\t\t$this->name = test_input($_POST[\"name\"]);\r\n\t\t\t\t\t\t$this->admnno = test_input($_POST[\"admnno\"]);\r\n\t\t\t\t\t\t$this->dob = test_input($_POST[\"dob\"]);\r\n\t\t\t\t\t\t$this->nationality = test_input($_POST[\"nationality\"]);\r\n\t\t\t\t\t\t$this->gender = test_input($_POST[\"gender\"]);\r\n\t\t\t\t\t\t$this->email = test_input($_POST[\"email\"]);\r\n\t\t\t\t\t\t$this->skypeid = test_input($_POST[\"skypeid\"]);\r\n\t\t\t\t\t\t$this->mobno = test_input($_POST[\"mobno\"]);\r\n\t\t\t\t\t\t$this->category = test_input($_POST[\"category\"]);\r\n\t\t\t\t\t\t$this->caddress = test_input($_POST[\"caddress\"]);\r\n\t\t\t\t\t\t$this->paddress = test_input($_POST[\"paddress\"]);\r\n\t\t\t\t\t\t$this->paddress = test_input($_POST[\"paddress\"]);\r\n\t\t\t\t\t\t$this->boarduniv = test_input($_POST[\"boarduniv\"]);\r\n\t\t\t\t\t\t$this->year = test_input($_POST[\"year\"]);\r\n\t\t\t\t\t\t$this->percgpa= test_input($_POST[\"percgpa\"]);\r\n\t\t\t\t\t\t$this->insti = test_input($_POST[\"insti\"]);\r\n\t\t\t\t\t\t$this->strdate = test_input($_POST[\"strdate\"]);\r\n\t\t\t\t\t\t$this->stpdate = test_input($_POST[\"stpdate\"]);\r\n\t\t\t\t\t}"
] | [
"0.6605253",
"0.6103045",
"0.57836616",
"0.5660675",
"0.5651666",
"0.5637023",
"0.5633314",
"0.55806845",
"0.55149317",
"0.543905",
"0.5396693",
"0.5347013",
"0.5345173",
"0.5326002",
"0.5293218",
"0.5279829",
"0.52611876",
"0.52491206",
"0.52416015",
"0.52251226",
"0.5222697",
"0.5197097",
"0.51824",
"0.51822704",
"0.51532346",
"0.5146954",
"0.51095766",
"0.5108039",
"0.5107061",
"0.5087823",
"0.50813496",
"0.5080436",
"0.5078745",
"0.5070396",
"0.50654876",
"0.5065404",
"0.5049769",
"0.5038933",
"0.50310796",
"0.50247645",
"0.50204176",
"0.50068283",
"0.49944553",
"0.49927965",
"0.49869558",
"0.49854237",
"0.4975737",
"0.49745095",
"0.49674907",
"0.49650693",
"0.49645472",
"0.49615797",
"0.49585167",
"0.4944223",
"0.49394277",
"0.4929245",
"0.49262208",
"0.49174353",
"0.49167782",
"0.49166405",
"0.49160132",
"0.49060363",
"0.49023816",
"0.4902066",
"0.4900143",
"0.48974156",
"0.48954904",
"0.4894029",
"0.48895055",
"0.48893982",
"0.48685995",
"0.48610982",
"0.48610818",
"0.48539558",
"0.48477834",
"0.48447624",
"0.48430425",
"0.48428658",
"0.4835059",
"0.48290232",
"0.48265344",
"0.48228353",
"0.48205808",
"0.4820491",
"0.48125187",
"0.48011348",
"0.48008665",
"0.47992536",
"0.47977275",
"0.47956085",
"0.47945237",
"0.47945237",
"0.47921038",
"0.4789919",
"0.4787301",
"0.4784943",
"0.47830892",
"0.47789913",
"0.47789505",
"0.4776017",
"0.4771129"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$operacion = Operacion::all();
return $this->showAll($operacion);
} | {
"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)
{
$rules = [
'operacion'=>'required',
];
$this->validate($request,$rules);
$campos = $request->all();
$operacion = Operacion::create($campos);
return $this->showOne($operacion,201);
} | {
"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.7286258",
"0.71454436",
"0.7132821",
"0.6640289",
"0.6621105",
"0.6566493",
"0.65255576",
"0.65087926",
"0.6448317",
"0.63752604",
"0.63736314",
"0.6365631",
"0.6365631",
"0.6365631",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229"
] | 0.0 | -1 |
Display the specified resource. | public function show(Operacion $operacione)
{
return $this->showOne($operacione);
} | {
"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, Operacion $operacion)
{
if($request->has('operacion'))
{
$operacion->operacion = $request->operacion;
}
if($request->has('descripcion'))
{
$operacion->descripcion = $request->descripcion;
}
if($request->has('vigente'))
{
$operacion->vigente = $request->vigente;
}
if(!$operacion->isDirty())
{
return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar', 422);
}
$operacion->save();
return $this->showOne($operacion);
} | {
"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(Operacion $operacion)
{
//
} | {
"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 |
$dsn = "mysql:host =". $this>host . ";dbname = ". $this>dbname; | public function __construct(){
try{
$this->db = new PDO('mysql:host=localhost;dbname=ccj','root','');
}catch(PDOException $e){
$e->getMessage();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function buildDSN()\n {\n return \"mysql:host=$this->host;dbname=$this->dbname;charset=$this->charset\";\n }",
"function __construct() {\r\n// \t\t$this->connection = mysql_connect($this->host,$this->username,$this->password,$this->dbname);\r\n// echo $this->host + \"zxdgfzxfg\";\r\n// echo \"mysql:host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\";\r\n// \t\t$this->connection = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\", $this->username, $this->password, $this->options);\r\n\t\t$this->connection = mysqli_connect($this->host,$this->username,$this->password,$this->dbname);\r\n\t}",
"function __construct()\n {\n $this->_dbh = new PDO(\"mysql:host=hostname;dbname=your_database_name\", \"username\", \"password\");\n }",
"public function __construct(){\n\n $this->conn = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->db,$this->user,$this->pass);\n }",
"private function __construct()\n\t{\n\t $this->DBH = new PDO(\"mysql:host=\".HOSTNAME.\";dbname=\".DBNAME, USERNAME, PASSWORD);\n\t}",
"function __construct() {\n\t\t$this->dsn = \"mysql:host=\". DB_SERVER . \";dbname=\" . DB_NAME . \";charset=\" . DB_CHAR;\n\t\n\t $this->opt = [\n\t PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n\t PDO::ATTR_EMULATE_PREPARES => false,\n\t ];\n\t\t$this->openConnection();\n\t}",
"public function __construct() {\n\n //connecting to the databse using php data objects \n\t$this -> conn = new PDO(\"mysql:host=\".$this -> host.\";dbname=\".$this -> db, $this -> user, $this -> pass);\n\n}",
"private function __construct()\n {\n $this->conn = new PDO(\"mysql:host={$this->host};\n dbname={$this->name}\", $this->user,$this->pass, $this->opt);\n }",
"function dbConnect($dsn=undefined){\n\t\tif($dsn !== undefined)return parent::dbConnect($dsn);\n\n\t\t$conf =& JFactory::getConfig();\n\n\t\t$pdo_dsn \t= $conf->getValue('config.pdo_dsn');\n\t\tif($pdo_dsn)return parent::dbConnect($pdo_dsn);\n\n\n\t\t$host \t\t= $conf->getValue('config.host');\n\t\t$user \t\t= $conf->getValue('config.user');\n\t\t$password \t= $conf->getValue('config.password');\n\t\t$database\t= $conf->getValue('config.db');\n\t\t$this->db_prefix \t= $conf->getValue('config.dbprefix');\n\t\t$driver \t= \"mysql\";// $conf->getValue('config.dbtype'); /*Mysqli driver giving problem*/\n\t\t$debug \t\t= $conf->getValue('config.debug');\n\n\t\t$pdo_dsn=array(\"$driver:host=$host;dbname=$database\",\n\t\t\t$user,\n\t\t\t$password);\n\n\t\treturn parent::dbConnect($pdo_dsn);\n\n\t}",
"private function __construct($dsn){\n try{\n if ($dsn == '' || !is_string($dsn) || strpos($dsn,\"|\")===false){\n throw new PdoDsnException(\"The DSN needs to be a string with values separated by pipe character (|)\\n i.e. host:port|username|password|database\");\n }\n $this->connectionProperties = explode(\"|\",$dsn);\n if (count($this->connectionProperties) != 4){\n throw new PdoDsnException(\"The DSN needs to be a string with values separated by pipe character (|)\\n i.e. host:port|username|password|database\");\n }\n if (stristr($this->connectionProperties[0],':')){\n $hostport = explode(':',$this->connectionProperties[0]);\n $host = $hostport[0];\n $port = $hostport[1];\n if (array_key_exists(2, $hostport)){\n $socket = \";unix_socket=$hostport[2]\";\n }\n else{\n $socket = \"\";\n }\n }\n else{\n $host = $this->connectionProperties[0];\n $port = Settings::DEFAULT_MYSQL_PORT;\n $socket = \"\";\n }\n\n $this->dbConnection = new PDO(\"mysql:host=$host;dbname={$this->connectionProperties[3]};port=$port$socket\",$this->connectionProperties[1],$this->connectionProperties[2]);\n $this->dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $e){\n throw $e;\n }\n }",
"public function get_dsn() {\n\t\tswitch ( $this->db_info['driver'] ) {\n\t\t\tdefault :\n\t\t\t\t$dsn = \"mysql:host=\" . $this->db_info['host'] . \";\";\n\t\t\t\t$dsn.= empty($this->db_info['port']) ? \"\" : $this->db_info['port'] . \";\";\n\t\t\t\t$dsn.= \"dbname=\" . $this->db_info['name'] . \";\";\n\t\t}\n\t\treturn $dsn;\n\t}",
"protected function connectBase(){\n try{\n $db=new PDO(\"mysql:host=$this->hostname;dbname=$this->basename;charset=UTF8\",$this->username, $this->password);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }\n catch(PDOException $e){\n echo 'Echec de la connexion'. $e->getMessage();\n }\n }",
"public function dsn() { \n $dsn = null;\n $dsn .= $this->db['prefix'];\n $dsn .= ':host=' . $this->db['host'];\n $dsn .= ';dbname=' . $this->db['dbname'];\n return $dsn;\n }",
"private function mysqlConnect($dbname){\n\t\ttry { \n\t \t$this->dbh = new \\PDO(\n\t \t\t'mysql:host=' . $this->config[$dbname]['host'] . ';dbname=' . $this->config[$dbname]['db'],\n\t \t\t $this->config[$dbname]['user'], \n\t \t\t $this->config[$dbname]['pass']\n\t \t); \n\t } \n\t catch(\\PDOException $e) { \n\t echo $e->getMessage(); \n\t }\n\t}",
"public function __construct()\n {\n $cred = getDbCredentials();\n $dbhost = $cred['dbhost']; \n $dbuser = $cred['dbuser'];\n $dbname = $cred['dbname'];\n $dbpass = $cred['dbpass']; \n $conn = null;\n try{\n $conn = new PDO(\"mysql:host=$dbhost; dbname=$dbname\", $dbuser, $dbpass);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(PDOException $ex){\n echo \"Connection failed: \".$ex->getMessage();\n }\n \n $this->connection = $conn;\n }",
"public function __construct($dsn)\n {\n $parts = array(\n 'scheme' => 'mysql',\n 'host' => 'localhost',\n 'port' => 3306,\n 'user' => 'root',\n 'pass' => '',\n 'path' => '',\n );\n \n $parts = parse_url($dsn) + $parts;\n \n $dsn = sprintf(\n '%s:dbname=%s;host=%s;port=%d',\n $parts['scheme'],\n ltrim($parts['path'], '/'),\n $parts['host'],\n $parts['port']\n );\n \n $this->_pdo = new \\PDO($dsn, $parts['user'], $parts['pass']);\n $this->_pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n $this->_pdo->query(\"SET NAMES 'UTF8'\");\n }",
"public function __construct() {\n// $this->dbconn = new PDO($dbURI, $_ENV['USER'], $_ENV['PASS']);\n\n $dbURI = 'mysql:host=' . 'localhost'.';port=3307;dbname=' . 'proj2';\n $this->dbconn = new PDO($dbURI, 'root', '');\n $this->dbconn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }",
"private function __construct() {\n \t$this->user = getenv('MYSQL_ROOT_USER');\n \t$this->dbname = getenv('MYSQL_DATABASE');\n \t$this->password = getenv('MYSQL_ROOT_PASSWORD');\n \t$this->dsn = \"mysql:dbname={$this->dbname};host=docker_db_1\";\n\n try {\n $this->dbh = new PDO($this->dsn, $this->user, $this->password);\n } catch (PDOException $e) {\n echo 'Connection failed: ' . $e->getMessage();\n }\n }",
"function __construct()\n {\n parent::__construct(\"mysql:host=127.0.0.1;dbname=sondcatalog\",\"root\",\"\");\n $this->strmysql=\"?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?\";\n }",
"function sql(){\r\n\t\t$this->conn = mysql_connect($this->hostname, $this->username , $this->password);\r\n\t\tmysql_select_db($this->dbName, $this->conn);\r\n}",
"public function __construct() {\n// $this->dbconn = new PDO($dbURI, $_ENV['USER'], $_ENV['PASS']);\n\n $dbURI = 'mysql:host=' . 'localhost'.';port=3307;dbname=' . 'proj2';\n $this->dbconn = new PDO($dbURI, 'root', '');\n $this->dbconn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }",
"public function __construct() {\n// $this->dbconn = new PDO($dbURI, $_ENV['USER'], $_ENV['PASS']);\n\n $dbURI = 'mysql:host=' . 'localhost'.';port=3307;dbname=' . 'proj2';\n $this->dbconn = new PDO($dbURI, 'root', '');\n $this->dbconn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }",
"private function __construct(){\n try{\n $this->_pdo=new PDO(\"mysql:host=\".config::get(\"mysql/host\").\";dbname=\".config::get(\"mysql/db\"),config::get(\"mysql/username\"),config::get(\"mysql/password\"));\n\n\n\n } catch(PDOException $e){\n echo $e->getMessage();\n die();\n }\n\n\n }",
"function __construct() {\r\n try {\r\n $db_host = DB_HOST;\r\n $db_name = DB_NAME;\r\n $db_user = DB_USER;\r\n $db_pass = DB_PASS;\r\n $this->db = new PDO(\"mysql:host=$db_host;dbname=$db_name\", $db_user, $db_pass);\r\n } catch (PDOException $e){\r\n echo \"Connection Failed \" . $e->getMessage();\r\n }\r\n }",
"function __construct() {\n $db_name = 'n8598177';\n $db_username = 'n8598177';\n $db_password = 'Em003080#77';\n $db_host = \"fastapps04.qut.edu.au\";\n\n\n try {\n $pdo = new PDO (\"mysql:host=$db_host;dbname=$db_name\", $db_username, $db_password);\n } catch (PDOException $e) {\n echo $e;\n exit();\n }\n\n // Attaches the PDO to the object\n $this->db = $pdo;\n return $this->db;\n }",
"public function __construct()\n {\n try {\n $dsn = \"mysql:dbname=\" . self::getConfig()['database']['name'] . \";host=\" . self::getConfig()['database']['host'];\n parent::__construct($dsn, self::getConfig()['database']['user'], self::getConfig()['database']['password']);//self::getConfig()['database']['user'], self::getConfig()['database']['password']);\n } catch (\\PDOException $pdo_exp) {\n die($pdo_exp->getMessage());\n }\n }",
"public function __construct(){\n $this->dbh = new PDO('mysql:dbname=test;host=localhost','root','admin');\n\n }",
"function DB($dbname='MichelinClassroomDB', $host='localhost',$user='root', $password='console')\r\n\t{\r\n\t\t$this->user=$user;\r\n\t\t$this->password=$password;\r\n\t\t$this->host=$host;\r\n\t\t$this->dbname=$dbname;\r\n\t}",
"function connexionDb()\n{\n $confDb = getConfigFile()['DATABASE'];\n\n\n $type = $confDb['type'];\n $host = $confDb['host'];\n $servername = \"$type:host=$host\";\n $username = $confDb['username'];\n $password = $confDb['password'];\n $dbname = $confDb['dbname'];\n\n $db = new PDO(\"$servername;dbname=$dbname\", $username, $password);\n return $db;\n}",
"public function __construct() {\n// $this->db['server'] = $args['server'];\n// $this->db['username'] = $args['username'];\n// $this->db['password'] = $args['password'];\n// $this->db['database'] = $args['database'];\n $this->open_connection();\n }",
"function __construct($dbname)\n\t{\n\t\t$this->$dbname = $dbname;\n\t\t$this->Connect();\n\t}",
"function db_connect ()\n {\n $dbh = new PDO(\"mysql:host=64.59.233.245;dbname=chadd_test\", // chadd_a1\n \"CLASS_EXAMPLE_RO\", \"CS445!@#\");\n\t\t $dbh->setAttribute (PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\n return ($dbh);\n }",
"private static function _prepareDsnString() : string\n {\n return sprintf(\n \"%s:host=%s;dbname=%s;charset=%s\",\n static::$_config['driver'],\n static::$_config['host'],\n static::$_config['database'],\n static::$_config['charset']\n );\n }",
"private function connect(){\n $bd = new PDO(\"mysql:host=\".$this->server.\";dbname=\".$this->db, $this->userName, $this->pwd);\n return $bd;\n }",
"private function __construct(){\n try{\n $this->_pdo = new PDO('mysql:host='.Config::get('mysql/host').';dbname='. Config::get('mysql/db'), Config::get('mysql/username'),Config::get('mysql/password'));\n //echo 'connected';\n }catch(PDOException $e){\n die($e->getMessage());\n }\n }",
"public function __construct() {\n // Set DSN\n $dsn = 'mysql:host='.$this->host.';dbname='.$this->dbName;\n $options = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n );\n \n // Create PDO Instance.\n try {\n $this->dbh = new PDO($dsn, $this->user, $this->pass, $options);\n } catch(PDOException $e) {\n $this->error = $e->getMessage();\n echo $this->error;\n }\n }",
"public function dbConnect()\n {\n return new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER , DB_PASS);\n }",
"public function __construct($dsn = '')\n {\n $this->db = DatabaseManager::getInstance()->getConn($dsn);\n }",
"public function __construct()\n {\n $this->pdo = new PDO('mysql:host=' . HOST_NAME . ';dbname=' . DB_NAME, USER_NAME, DB_PASSWORD);\n }",
"function build_dsn($arr) {\n\tglobal $dev;\n\tif($dev) $arr['db_host'] = ip_trans($arr['db_host']);\n\n\tif(count($arr)==5) {\n\t\t$dsn = $arr['db_type'].'://'.$arr['db_user'].':'.$arr['db_pass'].'@'.$arr['db_host'].'/'.$arr['db_name'];\n\t} else {\n\t\t$dsn = FALSE;\n\t}\n\n\treturn $dsn;\n}",
"public function getConnection(){\n \n $this->conn = null;\n $dsn=\"mysql:host=\" . $this->host . \";port=\" . $this->port . \";dbname=\" . $this->db_name;\n \n try{\n $this->conn = new PDO($dsn, $this->username, $this->password);\n //$this->conn = new PDO(\"pgsql:host=localhost;port=5432;dbname=PHP_tutorial\", $this->username, $this->password);\n \n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage() . \"\\n\";\n echo \"DSN = \" . $dsn;\n }\n return $this->conn;\n }",
"function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}",
"function __construct()\r\n {\r\n $this->_dbh = $this->connect();\r\n }",
"private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }",
"function __construct($dbhost=null, $dbuser=null, $dbpass=null, $dbname='', $dbport='', $dbdsn=''){\n\t\t$this->connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbdsn);\n\t}",
"public function __construct() {\n $dsn = \"mysql:host=\".Configuration::DATABASE_HOST.\";dbname=\".Configuration::DATABASE_NAME;\n self::connect($dsn, Configuration::DATABASE_USER, Configuration::DATABASE_PASSWORD);\n }",
"protected function _dsn ()\n {\n // baseline of DSN parts\n $dsn = $this->_config;\n\n // don't pass the username, password, charset, persistent and\n // driver_options in the DSN\n \n foreach ($dsn as $key => $value)\n {\n if (stripos($key, 'dsn') !== false)\n {\n unset($dsn[$key]);\n }\n if (stripos($key, 'user') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (stripos($key, 'pass') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (stripos($key, 'option') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (stripos($key, 'adapter') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (stripos($key, 'driver') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (stripos($key, 'persistent') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (stripos($key, 'charset') !== false)\n {\n unset($dsn[$key]);\n }\n elseif (is_array($value))\n {\n unset($dsn[$key]);\n }\n elseif (is_object($value))\n {\n unset($dsn[$key]);\n }\n }\n\n if ($dsn['host'] == 'localhost' && empty($dsn['unix_socket']))\n {\n //$dsn['host'] = '127.0.0.1';\n }\n\n // use all remaining parts in the DSN\n foreach ($dsn as $key => $val)\n {\n $dsn[$key] = \"$key=$val\";\n }\n\n return $this->_pdoType . ':' . implode(';', $dsn);\n }",
"function connect()\n {\n $this->db = new PDO($this->dns,$this->user,$this->pass,$this->option);\n $this->db->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n\n }",
"function __construct() {\n $this->servername ='localhost';\n $this->database ='drempeltoets';\n $this->username ='root';\n $this->password ='';\n\n try{\n $this->conn = new PDO(\"mysql:host=$this->servername;dbname=$this->database\", $this->username, $this->password,);\n\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n echo\"connected successfully\";\n } catch(PDOException $e) {\n echo \"connection failed\" . $e->getMessage();\n } \n}",
"function connect($host, $dbname)\n{\n return new PDO(\"mysql:host=$host;dbname=$dbname;charset=utf8\", \"root\", \"troiswa\", [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ]);\n}",
"protected function ConnectionString()\n\t{\n\t\t\n try {\n\t\t\t\n if (!$this->dbh)\n {\n $this->dbh = new PDO(\"mysql:host=\".__DBSTT_HOSTNAME.\";dbname=\".__DBSTT_NAME, __DBSTT_USERNAME, __DBSTT_PASSWORD);\n }\n \n return $this->dbh;\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\techo 'Database connection failure. Please reload page. If problem persists contact [email protected]';\n die();\n\t\t}\n\t\t\n\t}",
"public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }",
"public function __construct()\n {\n // DSN (Data Source Name)\n $dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->db_name;\n\n // Parameter dari konfigurasi database\n $option = [\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n // Apakah koneksinya berhasil atau tidak ?\n try {\n $this->dbh = new PDO($dsn, $this->user, $this->pass, $option);\n \n // Ketika error tangkap exception nya\n } catch (PDOException $e) {\n // Dan tampilkan pesan errornya\n die($e->getMessage());\n }\n }",
"function getDBH(){return $this->DBH;}",
"function dbConnect () {\n\t$con = mysql_connect($this -> host, $this -> user, $this -> pass);\n mysql_select_db($this->dbname,$con);\n\t}",
"public function __construct(){\n\t\t$dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname;\n\t\t\n\t\t//Set options\n\t\t$options = array(\n\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\tPDO::ATTR_ERRMODE\t => PDO::ERRMODE_EXCEPTION\n\t\t);\n\t\t\n\t\t//Create a new PDO instance\n\t\ttry {\n\t\t\t$this->dbh = new PDO($dsn, $this->user, $this->pass, $options);\n\t\t}\n\t\t//Catch any errors\n\t\tcatch(\\PDOException $e){\n\t\t\t$this->error = $e->getMessage();\n\t\t}\n\t\t\n\t}",
"public function __construct(){\n $conStr=sprintF(\"mysql:host=%s;dbname=%s\", \n self::DB_HOST, self::DB_NAME);\n try{\n $this->pdo = new PDO($conStr, self::DB_USER, self::DB_PASSWORD);\n\n }catch(PDOException $pe){\n\n die($pe->getMessage());\n\n }\n \n }",
"public function __construct(){\r\n try {\r\n self::$con = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db , $this->user , $this->pass);\r\n } catch(PDOException $e){\r\n die($e->getMessage());\r\n } \r\n }",
"function __construct()\n {\n $this->_dbh = $this->connect();\n }",
"public function connect(){\n try {\n $this->_dbh = new PDO('mysql:host='.$this->_host.';dbname='.$this->_db,$this->_user,$this->_pass);\n echo \"connexion reussi\";\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }",
"function mysql () {\n\t/* public: connection parameters */\n\t\t$this->connect();\n\t}",
"public function __construct($host,$dbname,$username,$pass)\n {\n $dsn = \"mysql:host=$host;dbname=$dbname\";\n $this->pdo = new \\PDO($dsn,$username,$pass);\n }",
"function connectMysql(string $dsn,string $dbuser,string $dbpass){\n try{\n $db = new PDO($dsn, $dbuser, $dbpass);\n $db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n $db->setAttribute( PDO::ATTR_EMULATE_PREPARES, false );\n $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC);\n\n }catch(PDOException $e){\n die( $e->getMessage());\n\n }\n return $db;\n}",
"function setDatabaseConnection($host,$database,$user,$pass);",
"function __construct() {\n $this->db = new PDO('mysql:host='. getenv('IP') . ';dbname=blog', getenv('C9_USER'), ''); \n }",
"function DB() {\r\n \t\t$this->dbh = new Mysql_db;\r\n\t}",
"private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }",
"function __construct(){\n $this->con = new db_connect('', '', '', '');\n }",
"function __construct(){\n $this->db = new PDO('mysql:host=localhost;'.'dbname=sparring;charset=utf8', \n 'root', '');\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n}",
"public function __construct(){\n \n try { \n $this->con = new PDO(\"mysql:host=$this->host;dbname=$this->db\", $this->user, $this->pwd); \n $this->con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n $this->con->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } \n catch(PDOException $e) { \n echo $e->getMessage();\n }\n \n }",
"function __construct() {\n $this->dsn = 'mysql:dbname=id14818847_usuario_3002;host=localhost';\n $this->user = 'id14818847_wricardo';\n $this->password = 'dw781qaU5N4@f/B]';\n \n try {\n $this->conn = new PDO($this->dsn, $this->user, $this->password);\n } catch (PDOException $e) {\n echo 'Connection failed: ' . $e->getMessage();\n }\n\n }",
"function __construct(){\n // Make connection to database\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\n \n }",
"private function __construct()\n {\n $dsn = 'mysql:host=' . Config::read('db.host') .\n ';dbname=' . Config::read('db.basename') .\n ';charset=utf8';\n\n $user \t\t= Config::read('db.user');\n $password \t= Config::read('db.password');\n\n $this->dbh \t= new PDO($dsn, $user, $password);\n }",
"function __construct($servername, $username, $password, $database_naam)\n {\n\n\n try {\n $this->conn = new PDO(\"mysql:host=$servername;dbname=$database_naam\", $username, $password);\n // set the PDO error mode to exception\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n // echo \"Connected successfully\";\n } catch (PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n\n }",
"function __construct($dbhost=null, $dbuser=null, $dbpass=null, $dbname='', $dbport='', $dbdns=''){\n\t\t$this->connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbdsn);\n\t}",
"public function getDbHost () {\n return $this->dbHost; \n }",
"private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public function __construct() {\n\n parent::__construct();\n\n $serverName = $this->serverName;\n $database = $this->database;\n $dbusername = $this->username;\n $dbpassword = $this->password;\n\n\n //try to connect to the database\n try {\n $this->conn = new PDO(\"mysql:host=$serverName;dbname=$database\", $dbusername, $dbpassword);\n\n //echo \"Connection Successful <br>\";\n } catch(PDOException $e){\n echo \"Connection Failed <br>\";\n echo $e->getMessage();\n } //ends the try catch block\n\n }",
"private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }",
"public function __construct(){\n\t\t\n /**\n *\tFind Database and Establish connection\n */\t\t\n\t\t$this->__CON = new mysqli($this->__HOSTNAME, $this->__USERNAME , $this->__PASSWORD , $this->__DATABASE , $this->__PORT); \n /**\n *\tError Message\n */\t\n\t\tif (mysqli_connect_errno()){die(mysqli_connect_error());}\n\n}",
"public function __construct()\n {\n $dsn = 'mysql:host='.$this->host.';port='.$this->porta.';dbname='.$this->banco;\n $opcoes = [\n //armazena em cache a conexao para ser reutilizada \n PDO::ATTR_PERSISTENT => TRUE,\n //lanca uma pdo exception se ocorrer um erro \n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n try {\n // cria a instancia do PDO \n $this->dbh = new PDO($dsn,$this->usuario,$this->senha,$opcoes);\n\n \n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n\n }",
"function __construct()\n\t{\n\ntry {\n\n\t\t\t$servername = \"localhost\";\n\t\t\t$username = \"root\";\n\t\t\t$password = \"\";\n\t\t\t$db = \"hafiz\";\n\t\t\t$conn = new PDO(\"mysql:host=$servername;dbname=$db\", $username, $password);\n\t\t\t// $conn = mysqli_connect($servername,$username,$password,$db);\n\n\t\t\t// return $conn;\n\t\n // $conn = new PDO(\"mysql:host=\" .$this->servername.\";dbname=\".$this->db, $this->username, $this->password);\n\n \n // set the PDO error mode to exception\n \n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n \t// echo \"Connected successfully\";\n\t }\n\t \n\tcatch(PDOException $e)\n\t \n\t {\n\t \n\t echo \"Connection failed: \" . $e->getMessage();\n\t \n\t }\n\n\t}",
"function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}",
"private function __construct(){\r\n\t\ttry{\r\n\t\t\t//self::$dbh = new PDO(\"mysql:host=\".Config::HOST_DB.\";dbname=\".Config::NAME_DB.\";charset=utf8;\", Config::LOGIN_DB, Config::PASS_DB);\r\n\t\t\tself::$dbh = new PDO(\"mysql:unix_socket=/var/lib/mysql/mysql.sock;dbname=\".Config::NAME_DB.\";charset=utf8;\", Config::LOGIN_DB, Config::PASS_DB);\r\n\t\t\tif(Constant::CURRENT_MODE == Constant::DEBUG_MODE){\r\n\t\t\t\tself::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t}\r\n\t\t}catch(\\PDOException $e){\r\n\t\t\t//self::$dbh = new PDO(\"mysql:host=\".Config::HOST_DB.\";dbname=\".Config::NAME_DB.\";charset=utf8;\", Config::LOGIN_DB, Config::PASS_DB);\r\n\t\t\tself::$dbh = new PDO(\"mysql:unix_socket=/var/lib/mysql/mysql.sock;dbname=\".Config::NAME_DB.\";charset=utf8;\", Config::LOGIN_DB, Config::PASS_DB);\r\n\t\t\tif(Constant::CURRENT_MODE == Constant::DEBUG_MODE){\r\n\t\t\t\tself::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t}",
"private function __construct()\n {\n $this->setDatabaseConfig();\n\n //set DSN\n $dsn = $this->_type . ':host=' . $this->_host . ';dbname=' . $this->_name;\n\n //set options\n $options = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n );\n\n try {\n /*\n * PDO has three params upon construction\n * specify driver, username, password\n * specify driver: mysql,needs host and database name\n * host = server you are running usually 127.0.0.1\n */\n $this->_dbHandler = new PDO($dsn, $this->_user, $this->_pass, $options);\n } catch(PDOException $e){\n echo $e->getMessage();\n }\n }",
"public function __construct()\r\n{\r\n$this->connessione = new mysqli($this->servername,$this->username,$this->password,$this->dbname);\r\n// Check connection\r\nif ($this->connessione->connect_error) {\r\n die('Errore di connessione (' . $this->connessione->connect_errno . ') '. $this->connessione->connect_error);\r\n} else {\r\n// echo 'Connesso. ' . $connessione->host_info . \"\\n\";\r\n}\r\n}",
"function __construct() {\n $connectstr_dbhost = 'localhost'; \n $connectstr_dbname = 'dkpTable'; \n $connectstr_dbusername = 'root'; \n $connectstr_dbpassword = 'dfghj'; \n $this->database_manager = mysqli_connect($connectstr_dbhost, $connectstr_dbusername, $connectstr_dbpassword,$connectstr_dbname); \n \nif (!$this->database_manager) { \n echo \"Error: Unable to connect to MySQL.\" . PHP_EOL; \n echo \"Debugging errno: \" . mysqli_connect_errno() . PHP_EOL; \n echo \"Debugging error: \" . mysqli_connect_error() . PHP_EOL; \n exit; \n } \n}",
"private function _connect() {\r\n\t\t$this->sql = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t\t$this->sql2 = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t}",
"private function setConnection() {\n if( $this->_connection ) { # prevent creation of additional connection\n $this->_connection;\n }\n $db_dsn = \"mysql:host=\".$this->db_host.\";port=\".$this->db_port.\";dbname=\".$this->db_name.\";charset=\".$this->db_char;\n $this->_connection = new PDO($db_dsn,$this->db_user,$this->db_pass,$this->db_opts);\n }",
"function DBC($dbname) {\n\t$dbhost=\"192.168.0.2\";\n\t$dbuser= \"web\";\n\t$dbpass= \"digipoint\";\n\t$dbh = new PDO(\"pgsql:host=$dbhost;dbname=$dbname\", $dbuser, $dbpass);\n\t$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\treturn $dbh;\n}",
"public function __construct($host, $dbName, $username, $password, $driver = 'mysql', $charset = 'utf8');",
"function Dbase_connect() {\n\tglobal $db, $db_host, $db_user, $db_password;\n\t$db=mysql_connect( $db_host, $db_user, $db_password );\n}",
"function db_connect($dsn) {\n\t$options = array('debug' => 2, 'result_buffering' => true);\n\tif(is_array($dsn)) $dsn = build_dsn($dsn);\n\t$conn =& MDB2::factory($dsn, $options);\n\tif (PEAR::isError($conn)) {\n\t\techo $conn->getMessage();\n\t}\n\t$conn->setFetchMode(MDB2_FETCHMODE_ASSOC);\n\t/* This query is run to check and make sure the connection is successfull */\n\t$query = \"SELECT 1+1\";\n\tq($query,$conn);\n\n\treturn $conn;\n}",
"public function __construct($database){\n $this->conn = $database;\n }",
"protected function dsn()\r\n {\r\n $dsn = $this->config;\r\n\r\n// don't pass the username, password, charset, persistent and driver_options in the DSN\r\n unset($dsn['username']);\r\n unset($dsn['password']);\r\n unset($dsn['options']);\r\n unset($dsn['charset']);\r\n unset($dsn['persistent']);\r\n unset($dsn['driver_options']);\r\n\r\n// use all remaining parts in the DSN\r\n foreach ($dsn as $key => $val) {\r\n $dsn[$key] = \"$key=$val\";\r\n }\r\n\r\n return $this->pdoType . ':' . implode(';', $dsn);\r\n }",
"public function __construct()\n {\n $gl_config = Tools::getConfig();\n\n\n $this->_server = $gl_config['database_master']['params']['host'];\n $this->_user = $gl_config['database_master']['params']['username'];\n $this->_password = $gl_config['database_master']['params']['password'];\n $this->_type = $gl_config['database_master']['adapter'];\n $this->_database = $gl_config['database_master']['params']['dbname'];\n $this->connect();\n }",
"function class_ad(){\r\n // at the same time - db_user / db_password / db_name / db_host\r\n $this->db = new ezSQL_mysql(DATABASE_USER,DATABASE_PASSWORD, DATABASE_NAME, DATABASE_HOST);\r\n }",
"public function sql_pconnect() {}",
"public function sql_pconnect() {}",
"public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }",
"public function pdo_conn($dsn=null,$username=null,$password=null)\n {\n\n try {\n //echo \"[dsn]: $dsn >> Connection: \".$this->db[ 'conn'];\n $this->db['conn'] = new PDO($dsn); //typical dsn like 'mysql:host=localhost;dbname=testdb';\n \n // Set errormode to exceptions\n $this->db['conn']->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n return true;\n \n } catch (PDOException $e) {\n $this->fatal_error( \"Database Error!: <strong>\".$e->getMessage().\"</strong> Dsn= <strong>$dsn </strong><br/>\" );\n \n }\n \n }"
] | [
"0.73361707",
"0.72940654",
"0.72549796",
"0.7231859",
"0.72005224",
"0.72003317",
"0.71967",
"0.71333915",
"0.71325946",
"0.71273994",
"0.7079833",
"0.70784134",
"0.7069399",
"0.7046157",
"0.7037754",
"0.70239943",
"0.6975812",
"0.6957836",
"0.6948587",
"0.69426465",
"0.6940199",
"0.6940199",
"0.6939727",
"0.68839973",
"0.6875587",
"0.68720096",
"0.68519133",
"0.6849209",
"0.6848881",
"0.68435854",
"0.68356097",
"0.6831933",
"0.6819913",
"0.6805734",
"0.6793482",
"0.6793464",
"0.67806184",
"0.67741853",
"0.677161",
"0.6761846",
"0.6756621",
"0.6756251",
"0.67237926",
"0.67222106",
"0.67182237",
"0.67167485",
"0.6714831",
"0.66942596",
"0.6694102",
"0.668912",
"0.66881174",
"0.6674312",
"0.667378",
"0.66711146",
"0.6664242",
"0.6663667",
"0.66628873",
"0.6659915",
"0.6651043",
"0.6646317",
"0.6645839",
"0.66311127",
"0.6624852",
"0.66219157",
"0.6610167",
"0.660395",
"0.6594205",
"0.65928966",
"0.6583624",
"0.6583482",
"0.6581717",
"0.65755",
"0.6573684",
"0.6570914",
"0.656989",
"0.6558894",
"0.65586764",
"0.6555125",
"0.6549173",
"0.6528545",
"0.65219134",
"0.6519796",
"0.65164727",
"0.65151465",
"0.6512754",
"0.65041065",
"0.6501443",
"0.6499081",
"0.6497051",
"0.64967054",
"0.6493136",
"0.64892435",
"0.6488909",
"0.6480763",
"0.6479863",
"0.6471376",
"0.64703727",
"0.64679086",
"0.64679086",
"0.64631104",
"0.64555764"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$user = User::find($id);
if ( is_null($user) ) {
return $this->sendError('User not found.');
}
return $this->sendResponse(new UserResource($user), 'User retrieved successfully.');
} | {
"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, $id)
{
$input = $request->all();
$user = Auth::user();
$validator = Validator::make($input, [
'first_name' => 'required',
'last_name' => 'required',
'phone_number' => 'required',
'email' => 'required',
]);
if( $validator->fails() ) {
return $this->sendError('Validation Error.', $validator->errors());
}
$user->first_name = $input['first_name'];
$user->last_name = $input['last_name'];
$user->phone_number = $input['phone_number'];
$user->save();
return $this->sendResponse(new UserResource($user), 'User updated successfully.');
} | {
"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 |
Run the database seeds. | public function run()
{
$departamento = App\Http\Controllers\Departamento::first();
DB::table('usuario')->delete();
DB::table('usuario')->insert([
'nm_usuario' => "Administrador",
'nm_email' => "[email protected]",
'nm_senha' => "senhaadm",
'cd_departamento' => $departamento['cd_departamento'],
]);
DB::table('usuario')->insert([
'nm_usuario' => "Usuário",
'nm_email' => "[email protected]",
'nm_senha' => "senhauser",
'cd_departamento' => $departamento['cd_departamento'],
]);
} | {
"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 |
verify_logistic Check if delivery address is attended by logistics | public function verify_logistic()
{
# Clear the delivery address saved in session
$this->session->unset_userdata('delivery_address_id');
# Check if the address is a user default address or cames from the delivery address list
if( $this->input->post('delivery_address_id') == 'default' ) {
$data = new User( $this->session->userdata('id') );
$from_user = TRUE;
}else{
$data = new Delivery_Address( $this->input->post('delivery_address_id') );
$from_user = FALSE;
}
# Check if the data about the address exists
if( $data->exists() )
{
# Instanciate a new city object
$city = new City();
$city->where( array('id' => $data->city->id, 'reached_by_logistics' => 1) )->get();
# Check if the city is reached by logistics
if( $city->exists() )
{
$return = TRUE;
# Save the delivery address information in the session
$this->session->set_userdata('delivery_address_id', $from_user ? 'default' : $this->input->post('delivery_address_id') );
$this->session->set_userdata('delivery_address_valid', TRUE);
}else{
$return = FALSE;
}
# Return to the data
echo json_encode($return);
}else{
echo json_encode(FALSE);
die();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isValidForDelivery();",
"public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}",
"public function return_verify() {\n\t\treturn true;\n if($_POST['payer_status'] == 'verified')\n {\n // check the payment_status is Completed\n if ($_POST['payment_status'] != 'Completed' && $_POST['payment_status'] != 'Pending')\n {\n return false;\n }\n\n // check that receiver_email is your Primary PayPal email\n if ($_POST['receiver_email'] != $this->payment['paypal_account'])\n {\n return false;\n }\n\n if ($this->order['api_pay_amount'] != $_POST['mc_gross'])\n {\n return false;\n }\n if ($this->payment['paypal_currency'] != $_POST['mc_currency'])\n {\n return false;\n }\n return true;\n }\n else\n {\n // log for manual investigation\n return false;\n }\n }",
"function isVerified(){\n\n}",
"public function isVerified();",
"function check_manifesto_delivered($manifesto_id=0)\r\n\t{\r\n\t\tif($manifesto_id)\r\n\t\t{\r\n\t\t\t$manifesto_det=$this->db->query(\"select * from pnh_m_manifesto_sent_log where id=?\",$manifesto_id);\r\n\t\t\tif($manifesto_det->num_rows())\r\n\t\t\t{\r\n\t\t\t\t$manifesto_det=$manifesto_det->row_array();\r\n\t\t\t\t\r\n\t\t\t\t$transit_inv=$this->db->query(\"select invoice_no from pnh_invoice_transit_log where sent_log_id=? and status=3\",$manifesto_id)->result_array();\r\n\t\t\t\t\r\n\t\t\t\tif($transit_inv)\r\n\t\t\t\t{\r\n\t\t\t\t\t$t_inv_list=array();\r\n\t\t\t\t\tforeach($transit_inv as $tinv)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$t_inv_list[]=$tinv['invoice_no'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$m_inv=explode(',',$manifesto_det['sent_invoices']);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$not_found=0;\r\n\t\t\t\t\tforeach($m_inv as $minv)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(in_array($minv, $t_inv_list))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$not_found=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!$not_found)\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"public function verify()\n {\n $this->setVerifiedFlag()->save();\n\n // :TODO: Fire an event here\n }",
"public function passes($attribute, $value)\n {\n try {\n $result = bitcoind()->validateaddress($value)->get();\n return $result['isvalid'];\n\n } catch( \\Exception $e )\n {\n // set message for this context\n $this->message = 'Cannot verify address.';\n return false;\n }\n\n }",
"public static function canApply($address)\n {\n // Put here your business logic to check if fee should be applied or not\n // Example of data retrieved :\n // $address->getShippingMethod(); > flatrate_flatrate\n // $address->getQuote()->getPayment()->getMethod(); > checkmo\n // $address->getCountryId(); > US\n // $address->getQuote()->getCouponCode(); > COUPONCODE\n return true;\n }",
"public function allowDeliveryAddress()\n {\n $this->_data['DireccionEnvio'] = 1;\n }",
"public function testVerification()\n {\n Notification::fake();\n\n $this->user->email_verified_at = null;\n\n $this->user->save();\n\n $this->user->notify(new VerifyEmail);\n\n // $request = $this->post('/email/resend');\n //\n // $request->assertSuccessful();\n\n Notification::assertTimesSent(1, VerifyEmail::class);\n\n Notification::assertSentTo($this->user,VerifyEmail::class);\n }",
"function is_verified()\n {\n if( ereg(\"VERIFIED\", $this->paypal_response) )\n {\n return true;\n }\n else\n {\n return false;\n }\n\n }",
"public function checkVerification()\n {\n $dns = new Dns($this->domain, config('anonaddy.dns_resolver'));\n\n if (Str::contains($dns->getRecords('MX'), 'MX 10 ' . config('anonaddy.hostname') . '.')) {\n $this->markDomainAsVerified();\n }\n }",
"function should_send($trip_type)\n{\n\n // --------------------------------------------------------------------\n\t// Is the sign not enabled?\n // --------------------------------------------------------------------\n if ( $this->predictionParameters->disabled == \"X\" ) \n {\n $this->text = $this->text. \"DIS\";\n\t\treturn false;\n }\n\n // --------------------------------------------------------------------\n // Surtronic communications protocol displays (TCP)\n // --------------------------------------------------------------------\n if ( $this->display_type == \"S\" ) \n {\n // Is the Surtronic sign registered && $ready?\n $sql = \n \"SELECT update_status, channel_number\n INTO l_update_status, l_channel\n FROM unit_status_sign\n WHERE build_id = \". $this->predictionParameters->build_id; \n $row = $this->connector->fetch1($sql);\n if ( $this->connector->errorCode != 0 || $row[\"channel_number\"] || $row[\"update_status\"] != \"T\" )\n {\n $this->text = $this->text. \"NOT_REGISTERED\";\n return false;\n }\n }\n\n // --------------------------------------------------------------------\n\t// Is the arrival unsuitable for the delivery mode\n // --------------------------------------------------------------------\n\tif ( $this->predictionParameters->delivery_mode && $this->predictionParameters->delivery_mode != \"RCA\" ) {\n\t\t$l_delivery_code = substr($trip_type, 0, 1);\n\t\tif ( !strstr($this->predictionParameters->delivery_mode, $l_delivery_code) ) {\n $this->text = $this->text. \"DIS\";\n return false;\n\t\t}\n\t}\n\n $currtime = new Datetime();\n $eta_last_sent = DateTime::createFromFormat(\"Y-m-d H:i:s\", $this->eta_last_sent);\n $etd_last_sent = DateTime::createFromFormat(\"Y-m-d H:i:s\", $this->etd_last_sent);\n\n // --------------------------------------------------------------------\n\t// Is arrival time is within echo window || $has passed\n // --------------------------------_------------------------------------\n if ( $this->predictionParameters->countdown_dep_arr == \"A\" ) {\n\t $l_comp_secs = $eta_last_sent->getTimestamp() - $currtime->getTimestamp();\n } else {\n\t $l_comp_secs = $etd_last_sent->getTimestamp() - $currtime->getTimestamp();\n }\n\n //echo \"HC WIN \";\n $this->predictionParameters->display_window = 7200;\n\tif ( $l_comp_secs > $this->predictionParameters->display_window || $l_comp_secs < -60 ) {\n if ( $l_comp_secs < -60 ) \n {\n $this->text = $this->text. \" ASSUME COUNTED_DOWN\";\n $w_display_line = true;\n return false;\n } else {\n if ( $l_comp_secs < -60 ) {\n $w_display_line = false;\n }\n\t\t $this->text = $this->text. \"WIN\". $l_comp_secs . \"/\". $this->predictionParameters->display_window;\n\t\t return false;\n }\n\t}\n\n // --------------------------------------------------------------------\n\t// Has vehicle already arrived/departed, if ( $so clear it down\n // --------------------------------------------------------------------\n if ( \n ( $this->predictionParameters->countdown_dep_arr == \"A\" && $this->arrival_status == \"A\" ) ||\n ( $this->predictionParameters->countdown_dep_arr == \"D\" && $this->departure_status == \"A\" ) \n ) {\n $this->text = $this->text. \" Already there Force Clear\";\n return false;\n }\n\n $this->prediction_stop_info->vehicle_id = $this->vehicle_id;\n $this->prediction_stop_info->dest_id = $this->dest_id;\n $this->prediction_stop_info->route_id = $this->route_id;\n $this->prediction_stop_info->build_id = $this->stopBuild->build_id;\n\n // --------------------------------------------------------------------\n\t// Does sign already have enough arrivals\n // --------------------------------------------------------------------\n if ( $this->prediction_stop_info->checkPrediction (\"NUMARRS\", $this->predictionParameters, $this->initialValues, $this ) != \"OK\" ) {\n if ( $this->time_last_sent ) {\n $this->text = $this->text. \" AA MA\";\n } else {\n $this->text = $this->text. \"TOO_MANY_ARRS\";\n return false;\n }\n }\n\n\t// ------------------------------------------------------------------------\n\t// Does sign already have enough arrivals for this destination\n\t// ------------------------------------------------------------------------\n if ( $this->prediction_stop_info->checkPrediction (\"NUMARRSPERDEST\", $this->predictionParameters, $this->initialValues, $this ) != \"OK\" ) {\n if ( $this->time_last_sent ) {\n $this->text = $this->text. \" AA MAD\";\n } else {\n $this->text = $this->text. \"TOO_MANY_ARRS_FOR_RT_DEST\";\n $w_display_line = false;\n return false;\n }\n }\n\n\t// ------------------------------------------------------------------------\n\t// As the bus stop is only able to handle one set of RTPI info \n\t// if ( $this arrival is the second || $more arrival of this vehicle at the\n // sign ) convert it to show published time\n\t// ------------------------------------------------------------------------\n if ( $this->prediction_stop_info->checkPrediction(\"DUPVEH\", $this->predictionParameters, $this->initialValues, $this ) != \"OK\" ) {\n $this->text = $this->text. \" DUPV->P\";\n $this->vehicle->vehicle_code = \"AUT\";\n $this->vehicle->vehicle_id = 0;\n }\n\n\t// ------------------------------------------------------------------------\n // Ensure arrival \n\t// For sequence/autoroute countdowns ensure resent every 5 minutes\n\t// ------------------------------------------------------------------------\n\tif ( $this->time_last_sent ) {\n if ( $this->sch_rtpi_last_sent != $this->initialValues->sch_rtpi_last_sent ) {\n $this->text = $this->text. \" \". $this->initialValues->sch_rtpi_last_sent. \"->\". $this->sch_rtpi_last_sent;\n } else {\n\t if ( $trip_type == \"AUT\" ) {\n $curr = new DateTime();\n $tls = DateTime::createFromFormat(\"Y-m-d H:i:s\", $this->time_last_sent);\n\t\t $l_sincelast_int = $curr->getTimestamp() - $tls->getTimestamp();\n\t\t $l_at_least_every = 180;\n if ( $l_sincelast_int > $l_at_least_every ) {\n $this->text = $this->text. \" $l_sincelast_int $l_at_least_every PFRC\";\n } else {\n $stat = $this->prediction_stop_info->checkPrediction(\"DELIVER\", $this->predictionParameters, $this->initialValues, $this );\n\n $this->prediction_stop_info->arr_no = 0;\n $this->prediction_stop_info->add();\n\t\t $this->text = $this->text. \" AUTlast \". $this->time_last_sent;\n $w_display_line = false;\n return false;\n\t\t }\n } else {\n // --------------------------------------------------------------------\n\t // Does prediction deviate enough from previous prediction\n // --------------------------------------------------------------------\n if ( $this->prediction_stop_info->checkPrediction (\"HASCHANGEDENOUGH\", $this->predictionParameters, $this->initialValues, $this ) != \"OK\" ) {\n // Force every x seconds\n $curr = new DateTime();\n $tls = DateTime::createFromFormat(\"Y-m-d H:i:s\", $this->time_last_sent);\n\t\t $l_sincelast_int = $curr->getTimestamp() - $tls->getTimestamp();\n\t\t $l_at_least_every = 120;\n if ($this->display_type == \"S\" ) {\n $this->text = $this->text. \" SNO_CHANGE\";;\n return false;;\n } else {\n\t\t if ( $l_sincelast_int > $l_at_least_every ) {\n $this->text = $this->text. \" FRC\";\n } else {\n $this->text = $this->text. \" NO_CHANGE\";\n return false;\n }\n }\n } else {\n $this->text = $this->text. \" \";\n }\n \n //this->prediction_stop_info->checkPrediction(\"DELIVER\", $this->predictionParameters, $this->initialValues, $this ) != \"OK\" ) \n\t\t //$this->text = $this->text. \" RTPlast \", UtilityDateTime::dateExtract($this->time_last_sent, \"hour to second\")\n //return false\n\t }\n }\n\t}\n $this->prediction_stop_info->vehicle_id = $this->vehicle_id;\n $this->prediction_stop_info->build_id = $this->build_id;\n $this->prediction_stop_info->route_id = $this->route_id;\n $this->prediction_stop_info->dest_id = $this->dest_id;\n\n $stat = $this->prediction_stop_info->checkPrediction(\"DELIVER\", $this->predictionParameters, $this->initialValues, $this );\n\n $this->prediction_stop_info->arr_no = 0;\n $this->prediction_stop_info->add();\n\n\treturn 1;\n}",
"public function passes($attribute, $value)\n {\n if($this->user->count() > 0){\n if(!$this->user->email_verified){\n $this->msg = self::ERR_MSG_EMAIL_VERIFIED_OFF;\n return false;\n }else{\n $this->msg = self::ERR_MSG_EMAIL_VERIFIED_ON;\n return false;\n }\n }\n return true;\n }",
"public function testFormCityMissingAddressVisible() {\n $form = new RedirectForm();\n $form_state = [];\n $payment = $this->mockPayment([\n 'firstname' => 'First',\n 'lastname' => 'Last',\n 'address1' => 'Address1',\n 'postcode' => 'TEST',\n 'country' => 'GB',\n ]);\n $element = $form->form([], $form_state, $payment);\n $pd = $element['personal_data'];\n $pd['address'] += ['#access' => TRUE];\n $this->assertTrue($pd['address']['#access']);\n }",
"function evel_is_address_bouncing($address) {\n global $evel_client;\n $params = func_get_args();\n $result = $evel_client->call('EvEl.is_address_bouncing', $params);\n return $result;\n}",
"public function hasVerifiedReport(): bool\n {\n return\n !RoadDamageReport::where('roaddamage_id', $this->id)\n ->where('verified', RoadDamageReport::FALSEPOSITIVE)->exists() &&\n RoadDamageReport::where('roaddamage_id', $this->id)\n ->where('verified', RoadDamageReport::VERIFIED)->exists();\n }",
"function deliveryCheck($rID, $date_time, $addr) {\n $_errors = array();\n \n if (!preg_match('/^\\d+/$', $rID)) {\n $_errors = \"Restaurant DeliveryCheck - Validation - restaurant ID (invalid, must be integer) (\" . $rID . \")\";\n }\n \n try {\n $addr->validate();\n } catch (OrdrinExceptionBadValue $ex) {\n $_errors[] = $ex.__toString();\n }\n \n throw new OrdrinExceptionBadValue($_errors);\n \n $dt = $this->format_datetime($date_time);\n \n return $this->_call_api(\"GET\",\n array(\n \"dc\",\n $rID, \n $dt,\n $addr->zip,\n $addr->city,\n $addr->street\n )\n );\n }",
"public function isVerified() {\n\t\treturn $this->oehhstat == 'V';\n\t}",
"public function markAsDomesticShipping(Order $draftOrder): bool;",
"function is_verified()\n {\n return false;\n }",
"public function checkAddress($address)\n\t\t{\n\t\t\t$address = strip_tags($address);\n\t\t\t\n\t\t\t$this->groestlcoin->validateaddress($address);\n\t\t\t\n\t\t\tif ($this->groestlcoin->response['result']['isvalid'] == 1){\n\t\t\t\treturn 1;}\n\t\t\telse{\n\t\t\t\treturn 0;}\t\t\t\n\t\t}",
"public function verify()\n {\n $this->update(['email_verified_at' => Carbon::now()]);\n }",
"public function paymentMethodIsActive(Varien_Event_Observer $observer) \n {\n $event = $observer->getEvent();\n $method = $event->getMethodInstance();\n $result = $event->getResult();\n $quote = $event->getQuote(); \n \n //$result->isAvailable = true;\n $methodsNotAvailable = array ('correosinter_correosinter', 'homepaq48_homepaq48', 'homepaq72_homepaq72');\n \n if ($quote)\n {\n $shippingMethod = $quote->getShippingAddress()->getShippingMethod();\n $isInternational = (($quote->getShippingAddress()->getCountryId() != 'ES' && $quote->getShippingAddress()->getCountryId() != 'AD') || ($shippingMethod == 'correosinter_correosinter'))?true:false;\n\n if ((in_array($shippingMethod, $methodsNotAvailable) || $isInternational) && Mage::helper('correos')->checkCashondelivery($method->getCode())) {\n $result->isAvailable = false;\n }\n }\n \n }",
"public function validAddresses() {}",
"public function verifyAndSetAddress($a,$bRequired) {\n\t\tif ($a['country'] != 'USA')\n\t\t\tthrow new exception(\"internation addresses not supported yet\");\n\t\t$this->country='USA';\t\t\n\t\t$this->line1 = isset($a['line1']) ? $a['line1'] : ''; \t\n\t\t$this->line2 = isset($a['line2']) ? $a['line2'] : ''; \t\n\t\t$this->city = isset($a['city']) ? $a['city'] : ''; \t\n\t\t$this->state = isset($a['state2']) ? $a['state2'] : ''; \t\n\t\t$this->zip = isset($a['zip']) ? $a['zip'] : ''; \t\n\t\t\t\n\t\tif ($this->line1 == '' && $this->line2 == '') {\n\t\t\tif ($bRequired || $this->city != '' || $this->zip != '')\n\t\t\t\treturn (array('*line1'=>'You must provide an address'));\n\t\t\telse {\n\t\t\t\t$this->city=$this->state=$this->zip='';\n\t\t\t\treturn True;\t\t// OK -- just no address\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t$retval=array();\n\t\tif ($this->city == '')\n\t\t\t$retval['*city']='You must provide a city';\n\t\tif ($this->zip == '')\n\t\t\t$retval['*zip']='You must provide a ZIP code';\n\t\telse {\n\t\t\t$nmatches=preg_match('/^[\\\\d]{5}(-[\\\\d]{4})??$/',$this->zip);\n\t\t\tif (0 == $nmatches)\n\t\t\t\t$retval['*zip']=\"Invalid ZIP code\";\n\t\t}\t\n\t\treturn (sizeof($retval) != 0) ? $retval : True;\n\t}",
"public function testCheckAddress() {\n\t$this->assertTrue(Bitcoin::checkAddress(\"1pA14Ga5dtzA1fbeFRS74Ri32dQjkdKe5\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1MU97wyf7msCVdaapneW2dW1uXP7oEQsFA\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1F417eczAAbh41V4oLGNf3DqXLY72hsM73\"));\n\t$this->assertTrue(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJkwJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1ASgNrpNNejRJVfqK2jHmfJ3ZQnMSUJ\"));\n\t$this->assertFalse(Bitcoin::checkAddress(\"1111111fnord\"));\n\t}",
"public function isVerified()\n\t{\n\t\tif($this->test_status_id == Test::VERIFIED)\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}",
"function wp_aff_check_clickbank_transaction() {\n if (WP_AFFILIATE_ENABLE_CLICKBANK_INTEGRATION == '1') {\n if (isset($_REQUEST['cname']) && isset($_REQUEST['cprice'])) {\n $aff_id = wp_affiliate_get_referrer();\n if (!empty($aff_id)) {\n $sale_amt = strip_tags($_REQUEST['cprice']);\n $txn_id = strip_tags($_REQUEST['cbreceipt']);\n $item_id = strip_tags($_REQUEST['item']);\n $buyer_email = strip_tags($_REQUEST['cemail']);\n $debug_data = \"Commission tracking debug data from ClickBank transaction:\" . $aff_id . \"|\" . $sale_amt . \"|\" . $buyer_email . \"|\" . $txn_id . \"|\" . $item_id;\n wp_affiliate_log_debug($debug_data, true);\n wp_aff_award_commission_unique($aff_id, $sale_amt, $txn_id, $item_id, $buyer_email);\n }\n }\n }\n}",
"public function isValidAddress($address);",
"function verify_address($address) // Colorize: green\n { // Colorize: green\n return isset($address) // Colorize: green\n && // Colorize: green\n is_string($address) // Colorize: green\n && // Colorize: green\n ( // Colorize: green\n filter_var($address, FILTER_VALIDATE_IP) // Colorize: green\n || // Colorize: green\n filter_var($address, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) // Colorize: green\n ); // Colorize: green\n }",
"public function simulateEnabledMatchSpecificConditionsSucceeds() {}",
"public function simulateEnabledMatchSpecificConditionsSucceeds() {}",
"public function show_refund_address() {\n\t\treturn $this->get_option( 'show_refund_address', 'no' ) == 'yes';\n\t}",
"public function verify() {\n\t\t$this->getBasics();\n\t\t$this->getParams();\n\t\t$this->getLanguage();\n\n\t\t$this->load->model( 'checkout/order' );\n\t\t$this->load->library( 'encryption' );\n\n\t\t$encryption = new Encryption( $this->config->get( 'config_encryption' ) );\n\n\t\t$forbidden\t\t\t= array( 'route', 'hash', 'email_sender', 'email_recipient' );\n\t\t$retData\t\t\t= array();\n\t\t$securityCriteria\t= 0; // integer!\n\t\t$project_id\t\t\t= '0';\n\t\t$err\t\t\t\t= false;\n\n\t\t// filter variables\n\t\tforeach( $this->request->post as $key => $value) {\n\t\t\tif( !in_array( $key, $forbidden ) ) {\n\t\t\t\t$retData[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );\n\t\t\t}\n\n\t\t\t// get value of security_criteria\n\t\t\tif( $key == 'security_criteria' ) {\n\t\t\t\t$securityCriteria = $value;\n\t\t\t}\n\n\t\t\t// decrypt order_id\n\t\t\tif( $key == 'user_variable_3' ) {\n\t\t\t\t$order_id = $encryption->decrypt( $value );\n\t\t\t}\n\n\t\t\t// get hash value\n\t\t\tif( $key == 'hash' ) {\n\t\t\t\t$this->hashValue = $value;\n\t\t\t}\n\n\t\t\t// get project id\n\t\t\tif( $key == 'project_id' ) {\n\t\t\t\t$project_id = $value;\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_debug == 1 ) {\n\t\t\techo '## FUNCTION verify' . \"\\n\";\n\t\t\techo '## calling getNotifyHash:' . \"\\n\";\n\t\t}\n\n\t\t// calculate hash value\n\t\t$hash = $this->getNotifyHash( $retData );\n\n\t\tif( $this->_debug == 1 ) {\n\t\t\techo \"\\n\" . '## $_POST data from directebanking:' . \"\\n\";\n\t\t\tprint_r( $_POST ) . \"\\n\";\n\t\t\techo 'retData (cleaned POST for calculating hash):' . \"\\n\";\n\t\t\tprint_r( $retData );\n\t\t\techo \"\\n\";\n\n\t\t\techo '--> submitted hash [' . $this->hashValue . ']' . \"\\n\";\n\t\t\techo '--> calculated hash [' . $hash . ']' . \"\\n\";\n\t\t\techo '--> securityCriteria [' . ( $securityCriteria ? 'true' : 'false' ) . ']' . \"\\n\";\n\n\t\t\t// write also log entry\n\t\t\t$msg = '## $_POST data from directebanking:<br />'\n\t\t\t. print_r( $_POST, true )\n\t\t\t. '<br />retData (cleaned POST for calculating hash):<br />'\n\t\t\t. print_r( $retData, true )\n\t\t\t. '<br />--> submitted hash [' . $this->hashValue . ']<br />'\n\t\t\t. '--> calculated hash [' . $hash . ']<br />'\n\t\t\t. '--> securityCriteria [' . ( $securityCriteria ? 'true' : 'false' ) . ']<br />'\n\t\t\t. '~~~~~~~~~~~~~~~~~~~~~~';\n\n\t\t\t$this->writeLog( $msg );\n\t\t}\n\n\t\t$comment = $this->_param['testMode'] ? $this->language->get( 'text_testOrder') : '';\n\n\t\t// check generated and submitted hash values\n\t\tif( $hash === $this->hashValue ) {\n\t\t\tif( $securityCriteria == 1 && $order_id ) {\n\t\t\t\t// order is okay, set order to predefined directebanking status\n\t\t\t\t$this->model_checkout_order->confirm(\n\t\t\t\t\t$order_id,\n\t\t\t\t\t$this->config->get( 'directebanking_order_status_id'),\n\t\t\t\t\t$comment\n\t\t\t\t);\n\n\t\t\t\t$msgDb\t= sprintf( $this->language->get( 'text_log_hash_okay'), $project_id );\n\t\t\t\t$msg\t= sprintf( $this->language->get( 'text_log_valid'), $project_id, $order_id );\n\t\t\t\t$type\t= 2;\n\t\t\t}else{\n\t\t\t\t// order is not okay, set order to predefined config status\n\t\t\t\t$this->model_checkout_order->confirm(\n\t\t\t\t\t$order_id,\n\t\t\t\t\t$this->config->get( 'config_order_status_id' ),\n\t\t\t\t\t$comment\n\t\t\t\t);\n\n\t\t\t\t$msgDb\t= sprintf( $this->language->get( 'text_log_security_invalid'), $project_id, $order_id );\n\t\t\t\t$msg\t= $msgDb;\n\t\t\t\t$type\t= 3;\n\t\t\t}\n\t\t}else{\n\t\t\t// order is not okay, set order to predefined config status\n\t\t\t$this->model_checkout_order->confirm( $order_id, $this->config->get( 'config_order_status_id' ), $comment );\n\n\t\t\t$msgDb\t= sprintf( $this->language->get( 'text_log_hash_notokay'), $project_id );\n\t\t\t$msg\t= sprintf( $this->language->get( 'text_log_hash_dif'), $project_id, $order_id );\n\t\t\t$type\t= 3;\n\t\t}\n\n\t\t// write log\n\t\t$this->writeLog( $msg, $type );\n\t\t// echo message at directebanking\n\t\tif( $this->_debug == 1 ) {\n\t\t\techo $msgDb . \"\\n\";\n\t\t}\n\t}",
"public function isVerified()\n\t{\n\t\tif (($record=$this->getActiveRecord())===null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$record->correo_verificado;\n\t}",
"function student_crm_webform_send_email_form_validate($form, $form_state) {\n if (strlen(trim($form_state['values']['manual-email'])) != '' && !valid_email_address($form_state['values']['manual-email'])) {\n form_set_error('manual-email', t('The provided email address is not valid.'));\n }\n}",
"public function checkForOneTimeDemoMessage(): bool\n {\n return $this->getCustomerAttrCreditHold() && $this->configProvider->isOptionCreditHoldEnable() && !$this->getFlag();\n }",
"public function needsVerificationMessage ();",
"public function updateFTOContactViewedLog($sender,$receiver)\n\t{\n\t\tif($sender->getPROFILE_STATE()->getFTOStates()->getSubState() != FTOSubStateTypes::NEVER_EXPOSED)\n\t\t{\n\t\t\t$FTOProfile = $sender;\n\t\t\t$otherProfile = $receiver;\n\t\t\t//uncomment below if condition if FTO acceptance count won't be affected if other user is EVALUE\n\t\t\t//if ($otherProfile->getPROFILE_STATE()->getPaymentStates()->getPaymentStatus() != \"EVALUE\")\n\t\t\t//{\t\n\t\t\t\t$FTOFlag = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getAcceptanceFlag();\n\t\t\t\t$inBoundLimit = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getInboundAcceptLimit(); \n\t\t\t\t$outBoundLimit = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getOutBoundAcceptLimit(); \n\t\t\t\t$totalAcceptanceLimit = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getTotalAcceptLimit(); \n\t\t\t\t$acceptanceType = 'I';\n\t\t\t\t$FTOContactViewedObj = new FTO_FTO_CONTACT_VIEWED; \n\t\t\t\t$count = $FTOContactViewedObj->getTotalCount($FTOProfile);\n\t\t\t\tif(!$FTOContactViewedObj->getContactViewed($FTOProfile,$otherProfile)) \n\t\t\t\t{ \n\t\t\t\t\tif($FTOFlag == 'I' && $acceptanceType == 'I')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($count['INBOUND'] < $inBoundLimit)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$update = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if ($FTOFlag == 'T')\n\t\t\t\t\t{\n\t\t\t\t\t\tif($count['TOTAL']<$totalAcceptanceLimit)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($acceptanceType == 'I')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($count['INBOUND'] < $inBoundLimit)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$update = 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}\n\t\t\t\t}\n\t\t\t//}\n\t\t\tif($update)\n\t\t\t{\n\t\t\t\t$FTOContactViewedObj->insertContactViewed($FTOProfile,$otherProfile,$acceptanceType);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\tif($receiver->getPROFILE_STATE()->getFTOStates()->getSubState() != FTOSubStateTypes::NEVER_EXPOSED)\n\t\t{\n\t\t\t$FTOProfile = $receiver;\n\t\t\t$otherProfile = $sender;\n\t\t\t//uncomment below if condition if FTO acceptance count won't be affected if other user is EVALUE\n\t\t\t//if ($otherProfile->getPROFILE_STATE()->getPaymentStates()->getPaymentStatus() != \"EVALUE\")\n\t\t\t//{\n\t\t\t\t$FTOFlag = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getAcceptanceFlag();\n\t\t\t\t$inBoundLimit = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getInboundAcceptLimit(); \n\t\t\t\t$outBoundLimit = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getOutBoundAcceptLimit(); \n\t\t\t\t$totalAcceptanceLimit = $FTOProfile->getPROFILE_STATE()->getFTOStates()->getTotalAcceptLimit(); \n\t\t\t\t$acceptanceType1 = 'O';\n\t\t\t\t$FTOContactViewedObj = new FTO_FTO_CONTACT_VIEWED; \n\t\t\t\t$count = $FTOContactViewedObj->getTotalCount($FTOProfile);\n\t\t\t\tif(!$FTOContactViewedObj->getContactViewed($FTOProfile,$otherProfile)) \n\t\t\t\t{ \n\t\t\t\t\tif ($FTOFlag == 'T')\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($count[\"TOTAL\"]<$totalAcceptanceLimit)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($acceptanceType1 == 'O')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($count['OUTBOUND']< $outBoundLimit)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$update1 = 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}\n\t\t\t\t}\n\t\t\t//}\n\t\t\tif($update1)\n\t\t\t{\n\t\t\t\t$FTOContactViewedObj->insertContactViewed($FTOProfile,$otherProfile,$acceptanceType1);\n\t\t\t}\t\n\t\t}\n\t}",
"function verify($instructions)\n\t{\n\t\t$result = array('boolean'=>false, 'msg'=>'ERROR: The vacancy verification instructions could not be resolved.');\n\t\t\n\t\tif(!empty($instructions['action']))\n\t\t{\n\t\t\tswitch($instructions['action'])\n\t\t\t{\n\t\t\t\tcase 'approve_toverify':\n\t\t\t\t\t$result = $this->_approval_chain->add_chain($instructions['id'], 'vacancy', '2', 'approved', (!empty($instructions['reason'])? htmlentities($instructions['reason'], ENT_QUOTES): 'NONE') );\n\t\t\t\t\t$this->change_status($instructions['id'], 'verified'); \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'reject_fromverify':\n\t\t\t\t\t$result = $this->_approval_chain->add_chain($instructions['id'], 'vacancy', '2', 'rejected', (!empty($instructions['reason'])? htmlentities($instructions['reason'], ENT_QUOTES): 'NONE') );\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'approve_topublish':\n\t\t\t\t\t$result = $this->_approval_chain->add_chain($instructions['id'], 'vacancy', '3', 'approved', (!empty($instructions['reason'])? htmlentities($instructions['reason'], ENT_QUOTES): 'NONE') );\n\t\t\t\t\t# The vacancy status is changed by the approval chain\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'reject_frompublish':\n\t\t\t\t\t$result = $this->_approval_chain->add_chain($instructions['id'], 'vacancy', '3', 'rejected', (!empty($instructions['reason'])? htmlentities($instructions['reason'], ENT_QUOTES): 'NONE') );\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'archive':\n\t\t\t\t\t$result = $this->change_status($instructions['id'], 'archived');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'restore':\n\t\t\t\t\t$result = $this->change_status($instructions['id'], 'saved');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function verify();",
"public function checkIsVerified(Varien_Event_Observer $observer)\n {\n if (!Mage::getModel('postident/config')->isEnabled()) {\n return;\n }\n\n /* @var $controller Mage_Checkout_CartController */\n $controller = $observer->getControllerAction();\n if (($controller->getRequest()->getControllerName() == 'onepage' && $controller->getRequest()->getActionName() != 'success') && false === Mage::getModel('postident/verification')->userIsVerified()\n ) {\n //Set quote to hasErrors -> this causes a redirect to cart in all cases\n $controller->getOnepage()->getQuote()->setHasError(true);\n\n //Add notice message, that the user has to be verified before he is allowed to enter the checkout\n Mage::getSingleton(\"core/session\")->addNotice(\n Mage::helper(\"postident\")->__(\"An identification by E-POSTIDENT is necessary to enter the checkout.\")\n );\n }\n }",
"public function emailtest(){\n\t\t$sub = array(\n\t \t'email' => '[email protected]',\n\t \t'order_no' => '14615660058503',\n\t \t'sequence' => 8,\n\t \t'rent_price' => 808.00,\n\t \t'rent_start' => '2016-04-26',\n\t \t'rent_end' => '2016-04-26',\n\t \t'balance' =>12,\n\t \t'username' => 'zhihui',\n\t \t'date' => '2016-04',\n\t \t'url' => 'http://www.kuaizu365.cn/home/account/bill.html'\n\t\t);\n\t\t$email = new \\Common\\Service\\EmailService();\n\t\t$flag = $email ->billWarning($sub);\n\t\tvar_dump($flag);\n\n\t}",
"public function destinatary_email_verification_is_good()\n {\n //Se usa para fngir envío de correo\n Mail::fake();\n $this->withoutMiddleware();\n\n //1. Given -> Teniendo un usuario\n $user = factory(User::class)->create();\n $petition = factory(Petition::class)->create([\n 'ID_user' => $user->ID,\n ]);\n\n //2. When -> Se envía un correo a dicho usuario\n Mail::to($user)->send(new UserCreatedEmail($user,$petition));\n\n //3. Then -> Entonces el coreo destinatario es el mismo que el ingresado por el usuario\n Mail::assertSent(UserCreatedEmail::class, function ($mail) use ($user,$petition) {\n return $mail->to[0]['address'] === $user['email'];\n });\n }",
"function deliveryAddressCheck($storeId=null,$merchant_id=null,$address_id=null) {\n \n App::import('Model', 'DeliveryAddress');\n $this->DeliveryAddress = new DeliveryAddress();\n $result=FALSE;\n $deliveryAddressCheck=$this->DeliveryAddress->find('first',array('conditions'=>array('DeliveryAddress.merchant_id'=>$merchant_id,'DeliveryAddress.is_deleted'=>0,'DeliveryAddress.id'=>$address_id,'DeliveryAddress.is_active'=>1),'fields'=>array('id')));\n //pr($deliveryAddressCheck);\n if(!empty($deliveryAddressCheck)){\n $result=TRUE;\n }else{\n $result=FALSE;\n }\n return $result;\n }",
"public function isSent() {}",
"public function isVerified(): bool;",
"public function testWinnerVerifiedStatus()\n\t{\n\t\t$data = new OLPBlackbox_Data();\n\t\t$data->phone_home = '123451234';\n\t\t$data->phone_work = '123451234';\n\t\t$data->paydates = array(time(), strtotime('+1 week'));\n\n\t\t$init = array('target_name' => 'ca', 'name' => 'ca');\n\t\t$state_data = new OLPBlackbox_TargetStateData($init);\n\n\t\t$rule = $this->getMock('OLPBlackbox_Enterprise_Impact_Rule_WinnerVerifiedStatus',\n\t\t\t\t\t\tarray('logEvent')\n\t\t);\n\t\t$rule->expects($this->at(0))\n\t\t\t->method('logEvent')\n\t\t\t->with($this->equalTo('VERIFY_SAME_WH'),\n\t\t\t\t\t$this->equalTo('VERIFY'),\n\t\t\t\t\t$this->equalTo($state_data->name));\n\n\t\t$rule->isValid($data, $state_data);\n\t}",
"abstract function is_paying();",
"function ctr_validateConfirmation(&$ctx)\n{\n $reservation = $ctx['reservation'];\n\n if ($reservation->persons AND $reservation->destination)\n return true;\n\n $ctx['warning'] .= \"Please, do not play with the URL.\\n\";\n\n return false;\n}",
"function is_automattician( $user_id = false ) {\n\tif ( $user_id ) {\n\t\t$user = new WP_User( $user_id );\n\t} else {\n\t\t$user = wp_get_current_user();\n\t}\n\n\tif ( ! isset( $user->ID ) || ! $user->ID ) {\n\t\treturn false;\n\t}\n\n\t// Check that their address is an a8c one, *and* they have validated that address\n\tif ( ! class_exists( 'WPCOM_VIP_Support_User' ) ) {\n\t\treturn false;\n\t}\n\n\t// $vip_support = WPCOM_VIP_Support_User::init();\n\n\tif ( WPCOM_VIP_Support_User::is_verified_automattician( $user->ID ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"public function check_activation_status () {\n $licenses_link = get_option( $this->token . '-url', '' );\n //echo \"<pre>\"; print_r( $this ); echo \"</pre>\"; die();\n $products = $this->get_detected_products();\n //echo \"<pre>\"; print_r( $products ); echo \"</pre>\"; die();\n $messages = array();\n if ( 0 < count( $products ) ) {\n foreach ( $products as $k => $v ) {\n if ( isset( $v['product_status'] ) && 'inactive' == $v['product_status'] ) {\n if( !empty( $licenses_link ) ) {\n $message = sprintf( __( '%s License is not active. To get started, activate it <a href=\"%s\">here</a>.', $this->domain ), $v['product_name'], $licenses_link );\n } else {\n $message = sprintf( __( '%s License is not active.', $this->domain ), $v['product_name'] );\n }\n if( !empty( $v[ 'errors_callback' ] ) && is_callable( $v[ 'errors_callback' ] ) ) {\n call_user_func_array( $v[ 'errors_callback' ], array( $message, 'warning' ) );\n } else {\n $messages[] = $message;\n }\n }\n }\n }\n if( !empty( $messages ) ) {\n $this->messages = $messages;\n }\n\n /**\n * We also ping UD server once per 24h\n * for getting any specific information.\n */\n $this->maybe_ping_ud();\n }",
"protected function verifyBillingAddress($value, array $column, $index)\n {\n if (!$this->verifyValueAsEmpty($value) && !$this->verifyValueAsBoolean($value)) {\n $this->addWarning('USER-BILADDR-FMT', array('column' => $column, 'value' => $value), $index);\n }\n }",
"public function accept(LogMessage $event): bool\n {\n return ($event->level()->criticality() >= $this->level);\n }",
"private function validateEmail($addr) {\n // Set result to false (guilty until proven innocent)\n $this->log->write('[Form] Email - validation begun');\n $result = FALSE;\n\n $boolDebug = FALSE;\n\n // Part 1: Consult isemail.info via curl\n // 0 = invalid format\n // 1 = valid format\n\n /*\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://isemail.info/valid/\".$addr);\n // curl_setopt($ch, CURLOPT_URL, \"http://www.asdasdljaskdhf.org/\".$addr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $out = curl_exec($ch);\n $log->write(\"FORM: Email - check result: \".$out);\n curl_close($ch);\n */\n\n // This uses a local copy of is_email() to verify emails, rather than the remote service\n $out = is_email($addr);\n\n // Part 2: DNS lookup (provided first part passed)\n if($out==1) {\n $this->log->write('[Form] Email validation 1 of 2');\n // isolate the domain (\"remote part\")\n // adapted from http://www.linuxjournal.com/article/9585?page=0,3\n $domain = substr($addr,strrpos($addr, \"@\")+1);\n\n // If domain checks out, set result to true\n if (checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")) {\n\n $this->log->write('[Form] Email validation 2 of 2');\n\n $result = TRUE;\n\n // A planned third component is to contact the MX server in the email address and \n // confirm that the address is valid. Not all servers will respond, but some will\n\n } else {\n\n $this->log->write('[FORM] Email validation failed step 2');\n\n }\n\n } else {\n $this->log->write('[FORM] Email validation failed step 1');\n }\n\n // Part 3: coming (either here or inside previous block)\n\n return $result;\n}",
"public function verify($to, $l) {\n if ($to == 'usr') {\n $ver = $this->usr()->query(\"SELECT * FROM verify\");\n while($row = $ver->fetch(PDO::FETCH_ASSOC)) {\n if($row['verify_link'] == $l) {\n $name = $row['user_name'];\n $email = $row['user_email'];\n }\n }\n $this->usr()->query(\"UPDATE users SET verify = 1 WHERE user_email = '$email'\");\n $this->usr()->query(\"DELETE FROM verify WHERE user_name = '$name'\");\n }\n else if ($to == \"cmpn\") {\n $ver = $this->cmp()->query(\"SELECT * FROM verify\");\n while($row = $ver->fetch(PDO::FETCH_ASSOC)) {\n if($row['verify_link'] == $l) {\n $name = $row['company_name'];\n $email = $row['company_email'];\n }\n }\n $this->cmp()->query(\"UPDATE companies SET verified = 1 WHERE company_name = '$name'\");\n $this->cmp()->query(\"DELETE FROM verify WHERE company_name = '$name'\");\n }\n }",
"abstract function is_agency();",
"private function shouldSend($user)\n {\n $activation = $this->activationRepo->getActivation($user);\n return $activation === null || strtotime($activation->created_at) + 60 * 60 * $this->resendAfter < time();\n }",
"public function testReturnTrueOnValidLitecoinAddress()\n {\n $result = Wallet::validate(self::VALID_LITECOIN_ADDRESS, Wallet::LITECOIN);\n\n $this->assertTrue($result);\n }",
"public function recieve_verify_payee(){\n\t\t//Wallet*****Loyality*****Discount*****Points///\t\t\n\t\t$data['wal_debit'] \t= $this->ledger_model->total_wallet_debit();\n\t\t$data['wal_credit'] \t= $this->ledger_model->total_wallet_credit();\n\t\t$data['loy_debit'] \t= $this->ledger_model->total_loyality_debit();\n\t\t$data['loy_credit'] \t= $this->ledger_model->total_loyality_credit();\n\t\t$data['dis_debit'] \t= $this->ledger_model->total_discount_debit();\n\t\t$data['dis_credit'] \t= $this->ledger_model->total_discount_credit();\t\n\t\t\n\t\t\n\t\t$user_info = $this->session->userdata('logged_user');\n $user_id = $user_info['user_id'];\n\t\t$user_referral_code = singleDbTableRow($user_id)->referral_code;\t\n\t\t$user_account_no = singleDbTableRow($user_id)->account_no;\n\t\t$user_rolename\t = singleDbTableRow($user_id)->rolename;\t\n\t\t$user_email\t\t = singleDbTableRow($user_id)->email;\t\n\t\t$user_fname\t\t = singleDbTableRow($user_id)->first_name;\t\n\t\t$user_mobile\t = singleDbTableRow($user_id)->contactno;\n\t\t\n\t\t\n\t\t$data['ledgerDebit'] \t= $this->ledger_model->ledgerDebit();\n\t\t$data['ledgerCredit'] = $this->ledger_model->ledgerCredit();\t\t\n\t\t$data['debits'] \t\t= $this->ledger_model->totalDebits();\n\t\t$data['credits']\t\t= $this->ledger_model->totalCredits();\n\t\t$data['wallet'] \t\t= $this->ledger_model->totalWallet();\n\t\t$data['usedwallet'] \t= $this->ledger_model->usedWallet();\n\t\t\n\t\t$data['countries'] = $this->db->get('countries');\n\t\t\n\t\t//$data['rolename'] = $this->db->get_where('role', ['type' => 'role_name']); \t\n\t\t$where_array = array ('type' => 'role_name', 'permission_id' => '1');\n\t\t$data['rolename'] = $this->db->where($where_array)->get('role');\n\t\t\n\t\t$input_referralid = $this->input->post('referredByCode');\n\t\t\n\t\t//Get Decision who in online?\n\t\t$user = loggedInUserData();\n\t\t$userID = $user['user_id'];\n\n\t\tif($user['role'] == 'admin')\n\t\t{\n\t\t\t$data['users'] = $this->db->order_by('id', 'desc')->get_where('users', ['active' => '1']);\n\t\t}\n\t\telseif ($user['role'] == 'user')\n\t\t{\n\t\t\t$data['users'] = $this->db->order_by('id', 'desc')->get_where('users', ['role' => 'user']);\n\t\t}\n\t\t\n\t\telseif ($user['role'] == 'agent')\n\t\t{\n\t\t\t$data['users'] = $this->db->where('created_by', $userID)->order_by('id', 'desc')->get_where('users', ['role' => 'agent']);\n\t\t}\n\t\t\n\t\t$data['client'] = $this->db->order_by('id', 'desc')->get_where('users', ['active' => '1']);\n\t\t\n\t\t\n\t\t\t$data['category'] = $this->db->where('parentid', '0')->order_by('id', 'asc')->get_where('acct_categories', ['visible' => '0']);\n\t\n\t\t\t$data['main_account'] = $this->db->get_where('acct_categories', ['category_type' => 'main']);\n\t\t\t\n\t\t\tif($user['role'] == 'admin')\n\t\t{\n\t\t\t$data['sub_account'] = $this->db->get_where('acct_categories', ['category_type' => 'sub']);\n\t\t}\n\t\telseif ($user['role'] == 'agent')\n\t\t{\n\t\t\t$data['sub_account'] = $this->db->get_where('acct_categories', ['visible' => '1']);\n\t\t}\n\t\t\n\t\telseif ($user['role'] == 'user')\n\t\t{\n\t\t\t$data['sub_account'] = $this->db->get_where('acct_categories', ['visible' => '2']); \n\t\t}\n\t\n\t\tif($this->input->post())\n\t\t{\n\t\t\t//if($this->input->post('submit') != 'verify_payee') die('Error! sorry');\n\t\t\t\n\t\t\tif($this->input->post('submit') != 'receive_verify_payee') die('Error! sorry');\n\t\t\t$this->form_validation->set_rules('referredByCode', 'Payee ID', 'required|trim');\n\t\t//\t$this->form_validation->set_rules('key_id', 'Key Code', 'required|trim');\n\t\t//\t$this->form_validation->set_rules('pay_type', 'Business Category', 'required|trim');\n\t\t\t$this->form_validation->set_rules('amount', 'Amount', 'required|trim');\n\t\t\t$this->form_validation->set_rules('tranx_id', 'Transaction Remarks', 'required|trim');\n\t\t\t\n\n\t\t\tif($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$insert = $this->product_model->otp_transactions();\n\t\t\t\tif($insert)\n\t\t\t\t{\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->session->set_flashdata('successMsg', 'Please Check OTP Password to Complete Referral Process...!');\n\t\t\t\t\tredirect(base_url('product/payee_payments/'));\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\ttheme('recieve_verify_payee', $data);\n\t\n}",
"function check_ipn_request_is_valid() {\n\t\tglobal $woocommerce;\n\n\t\t$debug = ( $this->get_option( \"debug\" ) === \"yes\" ) ? 1 : 0;\n\n\t\t$this->option = array( 'merchant' => $this->get_option( \"merchant\" ), \n\t\t\t\t\t\t 'secretkey' => $this->get_option( \"secret_key\" ), \n\t\t\t\t\t\t 'debug' => $debug, \n\t\t\t\t \t\t);\n\t\t$this->payansewer = PayU::getInst()->setOptions( $this->option )->IPN();\n\n\t\tif ($_POST['ORDERSTATUS'] !== \"COMPLETE\" && ( $debug == 1 && $_POST['ORDERSTATUS'] !== \"TEST\") ) return false;\n\n\t\treturn $this->payansewer;\n\t\n }",
"public function passes($attribute, $value)\r\n {\r\n $domains = array('gmail.com', 'outlook.com', 'outlock.se', 'live.com', 'live.se', 'icloud.com', 'yhaoo', 'hotmail.com', 'hotmail.se', 'me.com', 'johanalmquist.se');\r\n $mailDomain = substr($value, strpos($value, '@')+1);\r\n if(!in_array($mailDomain, $domains)){\r\n $this->message = 'Du kan bara använda en e-post ifrån dessa domäner: gmail.com, outlook.com, outlock.se, live.com, live.se, icloud.com, yhaoo.com, hotmail.com, hotmail.se, me.com';\r\n return false;\r\n }\r\n return true;\r\n }",
"public function testOn()\n\t{\n\t\t$this->assertTrue(Catapult\\Log::isOn());\n\t}",
"public function validate_fields() {\n\n\t\t$this->validate_refund_address_field();\n\t}",
"public function assess_late_fees() {\n // Setup finance_charge record.\n $late_charge = ORM::factory('finance_charge');\n $data = array(\n 'title' => sprintf('Late Fee: %s', $this->title),\n 'due' => date::to_db(),\n 'site_id' => $this->site_id,\n 'user_id' => $this->user_id,\n 'amount' => $this->late_fee_type == 'percent' ? number_format($this->amount * $this->late_fee / 100, 2) : $this->late_fee, // Fix to use percentage as well.\n 'budget_id' => $this->budget_id,\n 'deposit_account_id' => $this->deposit_account_id\n );\n $late_charge->validate($data, TRUE);\n \n // Assess charge to the individual members.\n foreach ($this->finance_charge_members as $member_charge) {\n $charge = ORM::factory('finance_charge_member');\n $data = array(\n 'finance_charge_id' => $late_charge->id,\n 'site_id' => $this->site_id,\n 'user_id' => $member_charge->user_id,\n 'amount' => $this->late_fee_type == 'percent' ? number_format($member_charge->balance() * $this->late_fee / 100, 2) : $this->late_fee, \n );\n $charge->validate($data, TRUE);\n }\n \n // Send out emails to all members who have received the late fee.\n $late_charge->notify_members();\n \n // Update late_fee_assessed record so we don't assess this late fee again.\n $this->late_fee_assessed = TRUE;\n $this->save();\n }",
"public function verifiedAt();",
"public function testVerify()\n {\n $this->assertFalse(\n SmsVerification::of($this->config)->verify('+456', 'TEST_SECRET')\n );\n\n // Assert false when the phone is not stored\n $this->assertFalse(\n SmsVerification::of($this->config)->verify('+123', 'CLIENT_SECRET')\n );\n\n // Assert true when the phone and secret are properly given\n $this->assertFalse(\n SmsVerification::of($this->config)->verify('+123', 'TEST_SECRET')\n );\n }",
"public function validate()\n {\n if ($this->addressA->getCountryCode() !== $this->addressB->getCountryCode()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getZip() !== $this->addressB->getZip()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getCity() !== $this->addressB->getCity()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getStreet() !== $this->addressB->getStreet()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getAddressAdditional() !== $this->addressB->getAddressAdditional()) {\n $this->invalidate();\n return false;\n }\n\n return true;\n }",
"public function require_refund_address() {\n\t\treturn $this->show_refund_address() && $this->get_option( 'refund_address_optional', 'yes' ) == 'no';\n\t}",
"public function verifyFlightAddition($entity){\n // FORMAT: Array ( [id] => [plane_id] => 1 [depart] => YGE [depart_time] => 08:00 [arrive] => YVE [arrive_time] => )\n $flightDetails = $entity->toArray(); //Collects all created flight details in array\n\n //Retrieve purchased planes with IDs\n $flights = $this->fleetModel->all();\n $planes = array();\n foreach ($flights as $key => $plane) {\n $planes[$plane->id] = $plane->model_id;\n }\n\n //Retrieve plane details from wacky in format:\n //Array ( [id] => kingair [manufacturer] => Beechcraft [model] => King Air C90 [price] => 3900 [seats] => 12 [reach] => 2446 [cruise] => 500 [takeoff] => 1402 [hourly] => 990 )\n $planeDetails = $this->wackyModel->getPlane($planes[$flightDetails['plane_id']]);\n\n //Retrieving distance between depart and arrive airport:\n $dist = $this->returnAirportDistance($flightDetails['depart'], $flightDetails['arrive']);\n\n //Total flight duration in minutes is distance/speed times 60 plus 10 minutes\n $flightDuration = (($dist/$planeDetails['cruise'])*60)+10;\n\n //VALIDATION\n //1)Selected plane must be able to arrive to destination\n if($planeDetails['reach'] < $dist){\n //plane cannot fly to location so new flight cannot be accepted\n echo(\"Plane cannot reach destination\");\n return false;\n }\n //2)Ensure depart times are between 8am and 10pm. Note: arrive_time will be auto set up\n if($entity->getHours($flightDetails['depart_time']) < 8 ){\n echo(\"Cannot depart at \".$flightDetails['depart_time']);\n return false;\n }\n\n //3)Check that there are no planes departing or arriving on the\n //selected airport at the selected timestamp (This is a compromise to a more complex logic)\n foreach ($this->flightModel->getAllArrivalDepartureTimes($flightDetails['depart']) as $time){\n if ($time == $flightDetails['depart_time']){\n echo(\"Other planes departing at \".$flightDetails['depart_time'].\" from \".$flightDetails['depart']);\n return false;\n }\n }\n\n //4)Calculate Arrival Time\n $arr_time = ($entity->getHours($flightDetails['depart_time'])) + $flightDuration/60;\n\n //5) Check arrival time is not greater than 22:00 hours\n if ($arr_time > 22){\n echo(\"Cannot depart from \".$flightDetails['depart'].\" at \".$flightDetails['depart_time'].\" because the plane will arrive past 22:00 pm\");\n return false;\n }\n\n //6)Set temporary arrival Time in string format and ensure it doesn't collide with any of the\n //arrival times in the airport.\n $timestamp = ($arr_time * 3600) + strtotime(\"00:00\");\n $arr_time_string = date('H:i',$timestamp);\n $timeslot_available = true;\n $coliding_arrival_time = \"\";\n foreach ($this->flightModel->getAllArrivalDepartureTimes($flightDetails['arrive']) as $time){\n if ($time == $arr_time_string){\n $timeslot_available = false;\n $coliding_arrival_time = $time;\n break;\n }\n }\n\n //If nothing returns false then set time to arrival time in string format $arr_time_string\n if($timeslot_available){\n $entity->setArriveTime($arr_time_string);\n } else {\n echo(\"There is another flight in \". $flightDetails['arrive'].\" arriving at the same time: \".$coliding_arrival_time.'\\n');\n echo(\"Update that flight first\");\n return false;\n }\n\n return true;\n }",
"public function passes($attribute, $value)\n {\n if(str_contains($value, '*'))\n {\n // checking for * postal code block is free\n $f_var = explode(\"*\", $value);\n $salesManInfo = SalesManInfo::where('postalCode', 'like', $f_var[0].'%')->get();\n\n if(count($salesManInfo) > 0)\n { \n Session::flash('conflictList', $salesManInfo);\n return false;\n }\n } \n else {\n\n // checking for existing postal code\n $salesManInfo = SalesManInfo::where('postalCode', $value)->get();\n \n if(count($salesManInfo) > 0)\n {\n Session::flash('conflictList', $salesManInfo);\n return false;\n }\n\n // checking the * block is free or not\n $salesManInfoWithRange = SalesManInfo::where('postalCode', 'like', '%*%')->get();\n\n foreach($salesManInfoWithRange as $info)\n {\n $i_var = explode(\"*\", $info->postalCode);\n $i_var2 = $i_var[0];\n $sNumber = str_pad($i_var2, 5, \"0\"); \n $eNumber = str_pad($i_var2, 5, \"9\"); \n \n if(($sNumber <= $value) && ($value <= $eNumber))\n {\n Session::flash('conflictList', $salesManInfoWithRange->where('postalCode', $info->postalCode));\n return false;\n }\n }\n\n }\n\n return true;\n \n }",
"private function checkOrderSent(OrderInterface $commerce_order): bool {\n $order = new OrderController($commerce_order);\n /** @var User $proveedor */\n $proveedor = User::load($this->account->id());\n $enviado = TRUE;\n foreach ($order->getOrderItemsProvider($proveedor) as $line) {\n if ($line->get('field_estado')->value != 'enviado') {\n $enviado = FALSE;\n break;\n }\n }\n return $enviado;\n }",
"public function getRecipientState();",
"public function simulateEnabledMatchAllConditionsSucceeds() {}",
"public function simulateEnabledMatchAllConditionsSucceeds() {}",
"function run_activity_completed_pos()\n\t\t{\n\t\t\t//this will send an email only if the configuration says to do so\n\t\t\tif (!($this->bo_agent->send_completed()))\n\t\t\t{\n\t\t\t\t$this->error[] = lang('Smtp Agent has detected some errors when sending email after completion of the activity');\n\t\t\t\t$ok = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ok = true;\n\t\t\t}\n\t\t\t$this->error[] = $this->bo_agent->get_error();\n\t\t\tif ($this->bo_agent->debugmode) echo '<br />COMPLETED: Mail agent in DEBUG mode:'.implode('<br />',$this->error);\n\t\t\treturn $ok;\n\t\t}",
"public function postFlightCheck($direction = null);",
"function wcfm_wcpvendors_order_mark_fulfilled() {\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$product_id = $_POST['productid'];\r\n\t\t\t$order_item_id = $_POST['orderitemid'];\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t\r\n\t\t\t$tracking_url = apply_filters( 'wcfm_tracking_url', $tracking_url, $tracking_code, $order_id );\r\n\t\t\t\r\n\t\t\tif( $order_item_id ) {\r\n\t\t\t\tif( wcfm_is_vendor() ) {\r\n\t\t\t\t\t$vendor_data = WC_Product_Vendors_Utils::get_vendor_data_from_user();\r\n\t\t\t\t\t\r\n\t\t\t\t\tWC_Product_Vendors_Utils::set_fulfillment_status( absint( $order_item_id ), 'fulfilled' );\r\n\t\t\t\r\n\t\t\t\t\tWC_Product_Vendors_Utils::send_fulfill_status_email( $vendor_data, 'fulfilled', $order_item_id );\r\n\t\t\t\t\t\r\n\t\t\t\t\tWC_Product_Vendors_Utils::clear_reports_transients();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$shop_name = ! empty( $vendor_data['shop_name'] ) ? $vendor_data['shop_name'] : '';\r\n\t\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\t\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( $user_id, 0, 0, 1, $wcfm_messages, 'shipment_tracking' );\r\n\t\t\t\t\t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\t} else {\r\n\t\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\t}\r\n\t\t\t\t\r\n\t\t\t\t// Update Shipping Tracking Info\r\n\t\t\t\t$this->updateShippingTrackingInfo( $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t\t\r\n\t\t\t\tdo_action( 'wcfm_after_order_mark_shipped', $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo \"complete\";\r\n\t\tdie;\r\n\t}",
"public function testMailLogger()\n\t{\n\t\t$one = $this->user->userByID(1);\n\t\t$this->assertContains('dre', $one);\n\t\t$this->assertContains('1', $one);\n\t\t$this->assertTrue($this->user->checkExisting('dre'), true);\n\t}",
"public function hasVerification()\n {\n return true;\n }",
"protected function canLog($order) {\n if ($order instanceof Mage_Sales_Model_Order\n && $this->helper()->isLogEnable()){\n return $order->getStatus() == $this->helper()->getOrderStatus();\n }\n return false;\n }",
"public function isVerified()\n {\n return ! is_null($this->domain_verified_at);\n }",
"private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }",
"public function isMultiAddressDelivery(){\n static $cache = null;\n\n if (is_null($cache)) {\n $db = JFactory::getDBO();\n\n $query = \"SELECT count(distinct address_delivery_id) FROM \" . $db->quoteName('#__jeproshop_cart_product');\n $query .= \" AS cart_product WHERE cart_product.cart_id = \" . (int)$this->cart_id;\n\n $db->setQuery($query);\n $cache = (bool)($db->loadResult() > 1);\n }\n return $cache;\n }",
"public function testFormCountryMissingAddressVisible() {\n $form = new RedirectForm();\n $form_state = [];\n $payment = $this->mockPayment([\n 'firstname' => 'First',\n 'lastname' => 'Last',\n 'address1' => 'Address1',\n 'postcode' => 'TEST',\n 'city' => 'London',\n ]);\n $element = $form->form([], $form_state, $payment);\n $pd = $element['personal_data'];\n $pd['address'] += ['#access' => TRUE];\n $this->assertTrue($pd['address']['#access']);\n $this->assertTrue($pd['address']['city']['#access']);\n $this->assertEquals('London', $pd['address']['city']['#default_value']);\n }",
"protected function onValid(Blackbox_Data $data, Blackbox_IStateData $state_data)\n\t{\n\t\tif ($event = $this->getEventName())\n\t\t{\n\t\t\t$this->logEvent($event, 'PASS', VendorAPI_Blackbox_EventLog::PASS);\n\t\t}\n\t}",
"public function verifyDecisionProperties(): void\n {\n $decision = $this->userContext->decide(FLAG_KEY);\n\n $this->printDecision($decision, \"Check that the following decision properties are expected for user $this->userId\");\n }",
"public function issetSpecifiedLogisticsServiceCharge($index)\n {\n return isset($this->specifiedLogisticsServiceCharge[$index]);\n }",
"function validateLine(& $line, $attended) {\n\t$errors = [];\n\t\n\t$stateAbbrevs = [\"AL\", \"AK\", \"AZ\", \"AR\", \"CA\", \"CO\", \"CT\", \"DE\", \"FL\", \"GA\", \"HI\", \"ID\", \"IL\", \"IN\", \"IA\", \"KS\", \"KY\", \"LA\", \"ME\", \"MD\", \"MA\", \"MI\", \"MN\", \"MS\", \"MO\", \"MT\", \"NE\", \"NV\", \"NH\", \"NJ\", \"NM\", \"NY\", \"NC\", \"ND\", \"OH\", \"OK\", \"OR\", \"PA\", \"RI\", \"SC\", \"SD\", \"TN\", \"TX\", \"UT\", \"VT\", \"VA\", \"WA\", \"WV\", \"WI\", \"WY\", \"AS\", \"DC\", \"FM\", \"GU\", \"MH\", \"MP\", \"PW\", \"PR\", \"VI\", \"AE\", \"AA\", \"AP\"];\n\t\n\t// validate orgcode (alphanumeric 1-25)\n\tif (preg_match('/[^a-z0-9]/i', $line[0]))\n\t\t$errors[] = \"ORGCODE value must be alphanumeric (contain only numbers and letters)\";\n\tif (strlen($line[0]) < 1 or strlen($line[0]) > 25)\n\t\t$errors[] = \"ORGCODE value must have a length of 1 to 25 alphanumeric characters\";\n\t// validate participant ID\n\tif (preg_match('/[^a-z0-9]/i', $line[1]))\n\t\t$errors[] = \"PARTICIP value must be alphanumeric (contain only numbers and letters)\";\n\tif (strlen($line[1]) < 1 or strlen($line[1]) > 25)\n\t\t$errors[] = \"PARTICIP value must have a length of 1 to 25 alphanumeric characters\";\n\t// validate ENROLL\n\tif (preg_match('/[^0-9]/', $line[2]))\n\t\t$errors[] = \"ENROLL must contain numeric characters only\";\n\tif (intval($line[2]) < 1 or intval($line[2]) > 10)\n\t\t$errors[] = \"ENROLL must be an integer value 1-10\";\n\t// validate PAYER\n\tif (preg_match('/[^0-9]/', $line[3]))\n\t\t$errors[] = \"PAYER must contain numeric characters only\";\n\tif (intval($line[3]) < 1 or intval($line[3]) > 9)\n\t\t$errors[] = \"PAYER must be an integer value 1-9\";\n\t// validate STATE\n\tif (!in_array($line[4], $stateAbbrevs))\n\t\t$errors[] = \"STATE must be a valid 2 character state abbreviation -- see: <a href=\\\"https://www.50states.com/abbreviations.htm\\\">50states</a> for valid abbrevations\";\n\t// validate GLUCTEST, GDM, RISKTEST\n\tif ($line[5] !== 1 and $line[5] !== 2)\n\t\t$errors[] = \"GLUCTEST MUST be either 1 or 2\";\n\tif ($line[6] !== 1 and $line[6] !== 2)\n\t\t$errors[] = \"GDM MUST be either 1 or 2\";\n\tif ($line[7] !== 1 and $line[7] !== 2)\n\t\t$errors[] = \"RISKTEST MUST be either 1 or 2\";\n\t// validate AGE\n\tif (preg_match('/[^0-9]/', $line[8]))\n\t\t$errors[] = \"AGE must contain numeric characters only\";\n\tif (intval($line[8]) < 18 or intval($line[8]) > 125)\n\t\t$errors[] = \"AGE must be an integer value 18-125\";\n\t// validate ETHNIC\n\tif (!in_array($line[9], [\"1\", \"2\", \"9\"]))\n\t\t$errors[] = \"ETHNIC MUST be either \\\"1\\\", \\\"2\\\", or \\\"9\\\"\";\n\t// validate race values\n\tif (!in_array($line[10], [\"1\", \"2\"]))\n\t\t$errors[] = \"AIAN MUST be either \\\"1\\\" or \\\"2\\\"\";\n\tif (!in_array($line[11], [\"1\", \"2\"]))\n\t\t$errors[] = \"ASIAN MUST be either \\\"1\\\" or \\\"2\\\"\";\n\tif (!in_array($line[12], [\"1\", \"2\"]))\n\t\t$errors[] = \"BLACK MUST be either \\\"1\\\" or \\\"2\\\"\";\n\tif (!in_array($line[13], [\"1\", \"2\"]))\n\t\t$errors[] = \"NHOPI MUST be either \\\"1\\\" or \\\"2\\\"\";\n\tif (!in_array($line[14], [\"1\", \"2\"]))\n\t\t$errors[] = \"WHITE MUST be either \\\"1\\\" or \\\"2\\\"\";\n\t// validate SEX\n\tif (!in_array($line[15], [\"1\", \"2\", \"9\"]))\n\t\t$errors[] = \"SEX MUST be either \\\"1\\\", \\\"2\\\", or \\\"9\\\"\";\n\t// validate HEIGHT\n\tif (preg_match('/[^0-9]/', $line[16]))\n\t\t$errors[] = \"HEIGHT value must contain numeric characters only\";\n\tif (intval($line[16]) < 30 or intval($line[16]) > 98)\n\t\t$errors[] = \"HEIGHT value must be an integer value 30-98\";\n\t// validate EDU\n\tif (!in_array($line[17], [\"1\", \"2\", \"3\", \"4\", \"9\"]))\n\t\t$errors[] = \"EDU MUST be either \\\"1\\\" - \\\"4\\\", or \\\"9\\\"\";\n\t// validate DMODE\n\tif (!in_array($line[18], [\"1\", \"2\", \"3\"]))\n\t\t$errors[] = \"DMODE MUST be \\\"1\\\" - \\\"3\\\"\";\n\t// validate SESSID\n\tif (!in_array($line[19], [\"88\", \"99\"]) and intval($line[19]) < 1 and intval($line[19]) > 26)\n\t\t$errors[] = \"SESSID MUST be an integer from 1-26 or 88 or 99\";\n\t// validate SESSTYPE\n\tif (!in_array($line[20], [\"C\", \"CM\", \"OM\", \"MU\"]))\n\t\t$errors[] = 'SESSTYPE must be one of these values: \"C\", \"CM\", \"OM\", \"MU\"';\n\t// validate DATE\n\t$month = substr($line[21], 0, 2);\n\t$day = substr($line[21], 3, 2);\n\t$year = substr($line[21], 6, 4);\n\tif (preg_match(\"/[^0-9\\/\\-]/\", $line[21]) or !checkdate($month, $day, $year))\n\t\t$errors[] = \"DATE must be a valid date in format 'mm/dd/yyyy' -- plugin may have failed in conversion\";\n\t// validate WEIGHT\n\tif (preg_match('/[^0-9]/', $line[22]))\n\t\t$errors[] = \"WEIGHT must contain numeric characters only\";\n\tif (empty($line[22])) {\n\t\tif ($attended) {\n\t\t\t$line[22] = 999;\n\t\t// } else {\n\t\t\t// $errors[] = \"WEIGHT value missing and [sess_attended] != TRUE\";\n\t\t}\n\t} else {\n\t\t$weight = intval($line[22]);\n\t\tif (($weight < 0 or $weight > 997) and $weight != 999)\n\t\t\t$errors[] = \"Valid WEIGHT values are 0 - 997. If a participant chooses not to submit a weight, please use value 999\";\n\t}\n\t\n\t// validate PA\n\tif (preg_match('/[^0-9]/', $line[23]))\n\t\t$errors[] = \"PA must contain numeric characters only\";\n\tif (empty($line[23])) {\n\t\tif ($attended) {\n\t\t\t$line[23] = 999;\n\t\t// } else {\n\t\t\t// $errors[] = \"PA value missing and [sess_attended] != TRUE\";\n\t\t}\n\t} else {\n\t\t$pa = intval($line[23]);\n\t\tif (($pa < 0 or $pa > 997) and $pa != 999)\n\t\t\t$errors[] = \"Valid PA values are 0 - 997. If a participant chooses not to submit a physical activity value for this session, please use value 999\";\n\t}\n\t\n\tif (!$attended and empty($line[22]) and empty($line[23])) {\n\t\t$errors[] = \"PA value, WEIGHT value, and [sess_attended] are all missing/blank/empty for this session.\";\n\t}\n\t\n\t// append error messages to end of line array\n\t$line = array_merge($line, $errors);\n}",
"public function passes($attribute, $value)\n {\n //\n if(isset($value) && !empty($value)) : \n try {\n return $this->isValidBTCAddress($value);\n } catch(\\Exception $e) {\n return false;\n }\n else :\n return true;\n endif;\n }",
"function jx_mark_delivered_status_for_courier_traspost()\r\n\t{\r\n\t\t$user=$this->erpm->auth();\r\n\t\t\r\n\t\tif(!$_POST)\r\n\t\t\tdie();\r\n\t\t\r\n\t\t$send_log_id=$this->input->post('send_log_id');\r\n\t\t$invoices_list=$this->input->post('delivered');\r\n\t\t$received_by=$this->input->post('received_by');\r\n\t\t$received_on=$this->input->post('received_on');\r\n\t\t$contact_no=$this->input->post('contact_no');\r\n\t\t\r\n\t\tif($invoices_list)\r\n\t\t{\r\n\t\t\tforeach($invoices_list as $i=>$incoice)\r\n\t\t\t{\r\n\t\t\t\t$param=array();\r\n\t\t\t\t$param['sent_log_id']=$send_log_id;\r\n\t\t\t\t$param['invoice_no']=$incoice;\r\n\t\t\t\t$param['status']=3;\r\n\t\t\t\t$param['received_by']=$received_by[$i];\r\n\t\t\t\t$param['received_on']=$received_on[$i];\r\n\t\t\t\t$param['contact_no']=$contact_no[$i];\r\n\t\t\t\t$param['logged_on']=cur_datetime();\r\n\t\t\t\t$param['logged_by']=$user['userid'];\r\n\t\t\t\t\r\n\t\t\t\t$already=$this->db->query(\"select count(*) as ttl from pnh_invoice_transit_log where invoice_no=? and status=3\",array($incoice))->row()->ttl;\r\n\t\t\t\tif(!$already)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->db->insert('pnh_invoice_transit_log',$param);\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Selected invoices status to be updated\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->session->set_flashdata(\"erp_pop_info\",\"Selected invoices status already updated\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tredirect($_SERVER['HTTP_REFERER']);\r\n\t}",
"public function isItHome() {\n if (!$this->getExpectedDelivery()) {\n return false;\n }\n return (time() - $this->getExpectedDelivery() < 0) ? false : true;\n }",
"public function isPaid()\n\t{\n\t\t$externalDump = ExternalDump::where('lab_no', '=', $this->external_id)->get()->first();\n\n\t\t//Not from the external system\n\t\tif(is_null($externalDump)) {\n\t\t\treturn true;\n\t\t}\n\t\telseif( $this->visit->patient->getAge('Y') >= 6\n\t\t\t&& $externalDump->order_stage == \"op\" \n\t\t\t&& $externalDump->receipt_number == \"\" \n\t\t\t&& $externalDump->receipt_type == \"\" )\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}",
"public static function checkForSiteTimings() {\n $addressModel = new StoreAddress();\n $open_close = $addressModel->checkSiteTimings();\n if (!empty($open_close)) {\n return false;\n }\n return true;\n }",
"public function validatePayment()\n\t{\n\t\t$array_result = array();\n\t\t$array_result['verified'] = 0;\n\t\t$array_result['tot_paid'] = 0.0;\n\t\t$array_result['log'] = '';\n\t\t\n\t\t//cURL Method HTTP1.1 October 2013\n\t\t$raw_post_data \t= file_get_contents('php://input');\n\t\t$raw_post_array = explode('&', $raw_post_data);\n\t\t\n\t\t$myPost = array();\n\t\tforeach ($raw_post_array as $keyval)\n\t\t{\n\t\t\t$keyval = explode('=', $keyval);\n\t\t\tif (count($keyval) == 2)\n\t\t\t{\n\t\t\t\t$myPost[$keyval[0]] = urldecode($keyval[1]);\n\t\t\t}\n\t\t}\n\n\t\t// check if the form has been spoofed\n\t\t$against = array(\n\t\t\t'business' \t => $this->account,\n\t\t\t'mc_gross' \t => number_format($this->order_info['total_net_price'], 2, '.', ''),\n\t\t\t'mc_currency' => $this->order_info['transaction_currency'],\n\t\t\t'tax'\t\t => number_format($this->order_info['total_tax'], 2, '.', ''),\n\t\t);\n\n\t\t/**\n\t\t * If the account name contains the merchant code instead\n\t\t * of the e-mail related to the account, the spoofing check will fail\n\t\t * as the merchant code is always converted into the account e-mail.\n\t\t *\n\t\t * For example, if we specify 835383648, PayPal will return the related\n\t\t * account: [email protected]\n\t\t * Then, 2 different values will be compared:\n\t\t * \"835383648\" ($this->account) againt \"[email protected]\" ($myPost['business'])\n\t\t */\n\n\t\t// inject the original values within the payment data\n\t\tforeach ($against as $k => $v)\n\t\t{\n\t\t\tif (isset($myPost[$k]))\n\t\t\t{\n\t\t\t\t$myPost[$k] = $v;\n\t\t\t}\n\t\t}\n\t\t//\n\n\t\t$req = 'cmd=_notify-validate';\n\t\tif (function_exists('get_magic_quotes_gpc'))\n\t\t{\n\t\t\t$get_magic_quotes_exists = true;\n\t\t}\n\n\t\tforeach ($myPost as $key => $value)\n\t\t{\n\t\t\tif ($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1)\n\t\t\t{\n\t\t\t\t$value = urlencode(stripslashes($value));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = urlencode($value);\n\t\t\t}\n\n\t\t\t$req .= \"&$key=$value\";\n\t\t\t$array_result['log'] .= \"&$key=$value\\n\";\n\t\t}\n\t\t\n\t\tif (!function_exists('curl_init'))\n\t\t{\n\t\t\t$array_result['log'] = \"FATAL ERROR: cURL is not installed on the server\\n\\n\" . $array_result['log'];\n\n\t\t\treturn $array_result;\n\t\t}\n\t\t\n\t\tif ($this->sandbox == 1)\n\t\t{\n\t\t\t$paypal_url = \"https://www.sandbox.paypal.com/cgi-bin/webscr\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$paypal_url = \"https://www.paypal.com/cgi-bin/webscr\";\n\t\t}\n\t\t\n\t\t$ch = curl_init($paypal_url);\n\t\tif ($ch == false)\n\t\t{\n\t\t\t$array_result['log'] = \"Curl error: \" . curl_error($ch) . \"\\n\\n\" . $array_result['log'];\n\n\t\t\treturn $array_result;\n\t\t}\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $req);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\t\n\t\t/**\n\t\t * Turn on TLS 1.2 protocol in case of safe mode or sandbox enabled.\n\t\t *\n\t\t * @since 1.6.2\n\t\t */\n\t\tif (defined('CURLOPT_SSLVERSION') && ($this->sandbox || $this->safemode))\n\t\t{\n\t\t\tcurl_setopt($ch, CURLOPT_SSLVERSION, 6);\n\t\t}\n\n\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));\n\t\t\n\t\t// CONFIG: Please download 'cacert.pem' from \"http://curl.haxx.se/docs/caextract.html\" and copy it in the same folder as this php file\n\t\t// This is mandatory for some environments.\n\t\t// $cert = dirname(__FILE__) . \"/cacert.pem\";\n\t\t// curl_setopt($ch, CURLOPT_CAINFO, $cert);\n\t\t\n\t\t$res = curl_exec($ch);\n\n\t\tif (curl_errno($ch) != 0)\n\t\t{\n\t\t\t$array_result['log'] .= date('[Y-m-d H:i e] ') . \" Can't connect to PayPal to validate IPN message: \" . curl_error($ch) . PHP_EOL;\n\n\t\t\tcurl_close($ch);\n\n\t\t\treturn $array_result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$array_result['log'] .= date('[Y-m-d H:i e]') . \" HTTP request of validation request:\". curl_getinfo($ch, CURLINFO_HEADER_OUT) .\" for IPN payload: $req\" . PHP_EOL;\n\t\t\t$array_result['log'] .= date('[Y-m-d H:i e]') . \" HTTP response of validation request: $res\" . PHP_EOL;\n\t\t\t\n\t\t\tcurl_close($ch);\n\t\t}\n\t\t\n\t\tif (strcmp(trim($res), 'VERIFIED') == 0)\n\t\t{\n\t\t\t$array_result['tot_paid'] = $_POST['mc_gross'];\n\t\t\t$array_result['verified'] = 1;\n\t\t\t$array_result['log'] = '';\n\t\t}\n\t\telse if (strcmp(trim($res), 'INVALID') == 0)\n\t\t{\n\t\t\t$array_result['log'] .= date('[Y-m-d H:i e]'). \" Invalid IPN: $req\\n\\nResponse: [$res]\" . PHP_EOL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$array_result['log'] .= date('[Y-m-d H:i e]'). \" Unknown Error: $req\\n\\nResponse: [$res]\" . PHP_EOL;\n\t\t}\n\t\t\n\t\t//END cURL Method HTTP1.1 October 2013\n\t\t\n\t\treturn $array_result;\n\t}",
"public function logData($merchant_id, $order_id)\n\t{\n\t\t\n\t\t$timetotalstart = microtime(true);\n\t\t$address_delivery = new Address((int)$this->context->cart->id_address_delivery);\n\t\t$address_billing = new Address((int)$this->context->cart->id_address_invoice);\n\t\t$country = Tools::strtoupper($address_delivery->country);\n\t\t$country = new Country((int)$address_delivery->id_country);\n\n\t\t$countryname = BillmateCountry::getContryByNumber(BillmateCountry::fromCode($country->iso_code));\n\t\t$countryname = Tools::strtoupper($countryname);\n\t\t$country_to_currency = array(\n\t\t\t'NOR' => 'NOK',\n\t\t\t'SWE' => 'SEK',\n\t\t\t'FIN' => 'EUR',\n\t\t\t'DNK' => 'DKK',\n\t\t\t'DEU' => 'EUR',\n\t\t\t'NLD' => 'EUR',\n\t\t\t);\n\t\t$country = 209;\n\t\t$language = 138;\n\t\t$encoding = 2;\n\t\t$currency = 0;\n\t\t\n\t\t$country = new Country((int)$address_delivery->id_country);\n\t\t$countryname = BillmateCountry::getContryByNumber(BillmateCountry::fromCode($country->iso_code));\n\t\t$countryname = Tools::strtoupper($countryname);\n\t\t$country = $countryname == 'SWEDEN' ? 209 : $countryname;\n\t\t\n\t\t$ship_address = array(\n\t\t\t'email' => $this->context->customer->email,\n\t\t\t'telno' => $address_delivery->phone,\n\t\t\t'cellno' => $address_delivery->phone_mobile,\n\t\t\t'fname' => $address_delivery->firstname,\n\t\t\t'lname' => $address_delivery->lastname,\n\t\t\t'company' => ($address_delivery->company == 'undefined') ? '' : $address_delivery->company,\n\t\t\t'careof' => '',\n\t\t\t'street' => $address_delivery->address1,\n\t\t\t'zip' => $address_delivery->postcode,\n\t\t\t'city' => $address_delivery->city,\n\t\t\t'country' => (string)$countryname,\n\t\t\t);\n\n\t\t$country = new Country((int)$address_billing->id_country);\n\n\t\t$countryname = BillmateCountry::getContryByNumber(BillmateCountry::fromCode($country->iso_code));\n\t\t$countryname = Tools::strtoupper($countryname);\n\t\t$country = $countryname == 'SWEDEN' ? 209 : $countryname;\n\n\t\t$bill_address = array(\n\t\t\t'email' => $this->context->customer->email,\n\t\t\t'telno' => $address_billing->phone,\n\t\t\t'cellno' => $address_billing->phone_mobile,\n\t\t\t'fname' => $address_billing->firstname,\n\t\t\t'lname' => $address_billing->lastname,\n\t\t\t'company' => ($address_billing->company == 'undefined') ? '' : $address_billing->company,\n\t\t\t'careof' => '',\n\t\t\t'street' => $address_billing->address1,\n\t\t\t'house_number' => '',\n\t\t\t'house_extension' => '',\n\t\t\t'zip' => $address_billing->postcode,\n\t\t\t'city' => $address_billing->city,\n\t\t\t'country' => (string)$countryname,\n\t\t);\n\n\t\tforeach ($ship_address as $key => $col)\n\t\t{\n\t\t\tif (!is_array($col))\n\t\t\t\t$ship_address[$key] = utf8_decode(Encoding::fixUTF8($col));\n\t\t}\n\n\t\tforeach ($bill_address as $key => $col)\n\t\t{\n\t\t\tif (!is_array($col))\n\t\t\t\t$bill_address[$key] = utf8_decode(Encoding::fixUTF8($col));\n\t\t}\n\t\t$products = $this->context->cart->getProducts();\n\t\t$cart_details = $this->context->cart->getSummaryDetails(null, true);\n\n\t\t$vatrate = 0;\n\t\t$goods_list = array();\n\t\tforeach ($products as $product)\n\t\t{\n\t\t\tif (!empty($product['price']))\n\t\t\t{\n\t\t\t\t$taxrate = ($product['price_wt'] == $product['price']) ? 0 : $product['rate'];\n\t\t\t\t$goods_list[] = array(\n\t\t\t\t\t'qty' => (int)$product['cart_quantity'],\n\t\t\t\t\t'goods' => array(\n\t\t\t\t\t\t'artno' => $product['reference'],\n\t\t\t\t\t\t'title' => $product['name'],\n\t\t\t\t\t\t'price' => $product['price'] * 100,\n\t\t\t\t\t\t'vat' => (float)$taxrate,\n\t\t\t\t\t\t'discount' => 0.0,\n\t\t\t\t\t\t'flags' => 0,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t$vatrate = $taxrate;\n\t\t}\n\t\t$carrier = $cart_details['carrier'];\n\t\tif (!empty($cart_details['total_discounts']))\n\t\t{\n\t\t\t$discountamount = $cart_details['total_discounts'] / (($vatrate + 100) / 100);\n\t\t\tif (!empty($discountamount))\n\t\t\t{\n\t\t\t\t$goods_list[] = array(\n\t\t\t\t\t'qty' => 1,\n\t\t\t\t\t'goods' => array(\n\t\t\t\t\t\t'artno' => '',\n\t\t\t\t\t\t'title' => $this->context->controller->module->l('Rabatt'),\n\t\t\t\t\t\t'price' => 0 - abs($discountamount * 100),\n\t\t\t\t\t\t'vat' => $vatrate,\n\t\t\t\t\t\t'discount' => 0.0,\n\t\t\t\t\t\t'flags' => 0,\n\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// Do we have any gift products in cart\n\t\tif (isset($cart_details['gift_products']) && !empty($cart_details['gift_products']))\n\t\t{\n\t\t\tforeach ($cart_details['gift_products'] as $gift_product)\n\t\t\t{\n\t\t\t\t$discountamount = 0;\n\t\t\t\tforeach ($products as $product){\n\t\t\t\t\tif($gift_product['id_product'] == $product['id_product']){\n\t\t\t\t\t\t$taxrate = ($product['price_wt'] == $product['price']) ? 0 : $product['rate'];\n\t\t\t\t\t\t$discountamount = $product['price'];\n\t\t\t\t\t\t$ref = $product['reference'];\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t$goods_list[] = array(\n\t\t\t\t\t'qty' => (int) $gift_product['cart_quantity'],\n\t\t\t\t\t'goods' => array(\n\t\t\t\t\t\t'artno' => $ref,\n\t\t\t\t\t\t'title' => $this->context->controller->module->l('Gift :').' '.$gift_product['name'],\n\t\t\t\t\t\t'price' => $gift_product['price'] - round($discountamount * 100,0),\n\t\t\t\t\t\t'vat' => $taxrate,\n\t\t\t\t\t\t'discount' => 0.0,\n\t\t\t\t\t\t'flags' => 0\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$totals = array('total_shipping','total_handling');\n\t\t$label = array();\n\t\t//array('total_tax' => 'Tax :'. $cart_details['products'][0]['tax_name']);\n\t\tforeach ($totals as $total)\n\t\t{\n\t\t\t$flag = $total == 'total_handling' ? 16 : ( $total == 'total_shipping' ? 8 : 0);\n\t\t\tif (empty($cart_details[$total]) || $cart_details[$total] <= 0) continue;\n\t\t\tif ($total == 'total_shipping' && $cart_details['free_ship'] == 1) continue;\n\t\t\tif (empty($cart_details[$total])) continue;\n\t\t\tif ($total == 'total_shipping')\n\t\t\t{\n\t\t\t\t$carrier = new Carrier($this->context->cart->id_carrier, $this->context->cart->id_lang);\n\t\t\t\t$vatrate = $carrier->getTaxesRate(new Address($this->context->cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));\n\t\t\t}\n\t\t\t$flags = ($vatrate > 0) ? $flag | 32 : $flag;\n\t\t\t$goods_list[] = array(\n\t\t\t\t'qty' => 1,\n\t\t\t\t'goods' => array(\n\t\t\t\t\t'artno' => '',\n\t\t\t\t\t'title' => isset($label[$total])? $label[$total] : ucwords(str_replace('_', ' ', str_replace('total_', '', $total))),\n\t\t\t\t\t'price' => $cart_details[$total] * 100,\n\t\t\t\t\t'vat' => (float)$vatrate,\n\t\t\t\t\t'discount' => 0.0,\n\t\t\t\t\t'flags' => $flags,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t$pclass = -1;\n\t\t$customer_id = (int)$this->context->cart->id_customer;\n\t\t$customer_id = $customer_id > 0 ? $customer_id: time();\n\n\t\t$transaction = array(\n\t\t\t'order1'=>(string)$order_id,\n\t\t\t'comment'=>'',\n\t\t\t'gender'=>'1',\n\t\t\t'order2' =>'',\n\t\t\t'flags'=>0,\n\t\t\t'reference'=>'',\n\t\t\t'reference_code'=>'',\n\t\t\t'currency'=>$this->context->currency->iso_code,\n\t\t\t'country'=>getCountryID(),\n\t\t\t'language'=>$this->context->language->iso_code,\n\t\t\t'pclass'=>$pclass,\n\t\t\t'shipInfo'=>array('delay_adjust'=>'1'),\n\t\t\t'travelInfo'=>array(),\n\t\t\t'incomeInfo'=>array(),\n\t\t\t'bankInfo'=>array(),\n\t\t\t'sid'=>array('time'=>microtime(true)),\n\t\t\t'extraInfo'=>array(array('cust_no'=>'0' ,'creditcard_data'=> $_REQUEST))\n\t\t);\n\n\t\t$timestart = microtime(true);\n\t\t$measurements = array();\n\t\t$k = $this->getBillmate();\n\t\t$result1 = $k->AddOrder('', $bill_address, $ship_address, $goods_list, $transaction);\n\t\t$measurements['add_order'] = microtime(true) - $timestart;\n\t\t$duration = (microtime(true) - $timetotalstart ) * 1000;\n\t\t$k->stat('client_bank_add_order_measurements', Tools::jsonEncode(array('order_id'=>$order_id, 'measurements'=>$measurements)), '', $duration);\n\n\t}",
"public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}",
"public function testCheckAvailability() {\n $date = '15/10/2015';\n $this->assertTrue($this->loan->checkAvailability($date));\n }"
] | [
"0.55464864",
"0.51403135",
"0.5114555",
"0.5101803",
"0.5084732",
"0.5070056",
"0.503418",
"0.503383",
"0.5028527",
"0.49749124",
"0.49424875",
"0.48795176",
"0.48772293",
"0.48682237",
"0.48483664",
"0.48474276",
"0.4845719",
"0.48379055",
"0.48240072",
"0.48130557",
"0.4799043",
"0.4786995",
"0.47841454",
"0.47839996",
"0.47782376",
"0.47779354",
"0.47751766",
"0.4774617",
"0.47668582",
"0.47651744",
"0.47602567",
"0.47424453",
"0.47349247",
"0.4734057",
"0.47340104",
"0.47167307",
"0.47123227",
"0.47099975",
"0.47075227",
"0.47066706",
"0.47027943",
"0.46965295",
"0.4685955",
"0.4678846",
"0.46716812",
"0.4667609",
"0.46552575",
"0.46487418",
"0.4645032",
"0.4639547",
"0.463762",
"0.46364945",
"0.4632212",
"0.4630046",
"0.46273756",
"0.46131018",
"0.46000686",
"0.45926696",
"0.45812497",
"0.4578915",
"0.45765072",
"0.45737982",
"0.45719492",
"0.45683184",
"0.45643896",
"0.45603698",
"0.4555845",
"0.45470965",
"0.45443037",
"0.45437124",
"0.4537594",
"0.45365733",
"0.45346004",
"0.4528974",
"0.45258033",
"0.45168656",
"0.45162177",
"0.45154518",
"0.45136824",
"0.4513593",
"0.45087147",
"0.45046663",
"0.45013493",
"0.44972017",
"0.4497074",
"0.44857782",
"0.44841674",
"0.44840536",
"0.44821757",
"0.44788292",
"0.44761044",
"0.44715476",
"0.44706059",
"0.44675183",
"0.44662002",
"0.44615382",
"0.44615006",
"0.44572508",
"0.44564474",
"0.4456153"
] | 0.67062056 | 0 |
The subscriber classes to register. | public function boot()
{
parent::boot();
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function registerSubscribers()\n {\n $extensions = $this->dataGridFactory->getExtensions();\n\n foreach ($extensions as $extension) {\n $extension->registerSubscribers($this);\n }\n }",
"public static function registerListeners()\n {\n static::creating('Wildside\\Userstamps\\Listeners\\Creating@handle');\n static::updating('Wildside\\Userstamps\\Listeners\\Updating@handle');\n\n if( method_exists(get_called_class(), 'deleting') )\n {\n static::deleting('Wildside\\Userstamps\\Listeners\\Deleting@handle');\n }\n\n if( method_exists(get_called_class(), 'restoring') )\n {\n static::restoring('Wildside\\Userstamps\\Listeners\\Restoring@handle');\n }\n }",
"private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }",
"public function createSubscriber();",
"private function get_subscribers()\n {\n return array(\n new CommentIQ_Subscriber_AssetsSubscriber($this->plugin_url . 'assets/', $this->get_supported_post_types()),\n new CommentIQ_Subscriber_PostmaticAssetsSubscriber($this->plugin_path . 'assets/' ),\n new CommentIQ_Subscriber_AutomatedatozsitesCommentSubscriber($this->get_atozsites_comment_generator(), $this->get_supported_post_types()),\n new CommentIQ_Subscriber_CommentIQAPISubscriber($this->api_client, $this->get_supported_post_types()),\n );\n }",
"public function subscribers() {\n return new Subscriber($this);\n }",
"public static function getSubscribedServices()\r\n {\r\n return [\r\n MDHelper::class,\r\n LoggerInterface::class\r\n ];\r\n }",
"public function collectSubscribers();",
"protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }",
"protected abstract function registerClasses(): void;",
"protected function registerListeners()\n {\n }",
"protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }",
"public function subscribe(): void\n {\n foreach (static::$eventHandlerMap as $eventName => $handler) {\n $this->events->listen($eventName, [$this, $handler]);\n }\n }",
"private function subscribeEvents()\n {\n // Subscribe the needed event for less merge and compression\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n\n $this->subscribeEvent(\n 'Shopware_Controllers_Widgets_Emotion_AddElement',\n 'onEmotionAddElement'\n );\n\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend',\n 'onPostDispatchFrontend'\n );\n }",
"public function __construct()\n\t{\n\t\t$this->type('subscriber');\n\t}",
"public function init()\n {\n $notified = [];\n /** @var ListenerInterface $subscriber */\n foreach ($this->subscribers as $message => $subscribers) {\n foreach ($subscribers as $subscriber) {\n if (in_array($subscriber, $notified)) {\n continue;\n }\n $subscriber->init();\n $notified[] = $subscriber;\n }\n }\n }",
"public function subscribe($events)\n {\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameCreated::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onCreated'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameDeleted::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onDeleted'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameermanentlyDeleted::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onermanentlyDeleted'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameRestored::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onRestored'\n );\n\n $events->listen(\n \\App\\Events\\Backend\\ClassName\\ClassNameUpdated::class,\n 'App\\Listeners\\Backend\\ClassName\\ClassNameEventListener@onUpdated'\n );\n }",
"public static function register_services()\n {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }",
"public function getSubscribedDelegates() {\n\t\t\t\t\treturn array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'page' => '/backend/',\n\t\t\t\t\t\t\t'delegate' => 'InitaliseAdminPageHead',\n\t\t\t\t\t\t\t'callback' => 'initializeAdmin'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}",
"public function subscribes();",
"private function registerAll()\n {\n $this->registerApp();\n $this->registerPsr();\n $this->registerRequests();\n $this->registerResponses();\n $this->registerPlugins();\n $this->registerCallables();\n $this->registerViews();\n $this->registerUtils();\n }",
"public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }",
"public function getSubscribedEvents();",
"public function register()\n {\n return array(T_CLASS);\n\n }",
"public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}",
"public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }",
"protected function registerClasses()\n {\n //region Annotations\n AnnotationRegistry::registerLoader('class_exists');\n\n $this->app->singleton('app.annotation_reader', function (Application $app) {\n return new AnnotationReader;\n });\n //endregion\n\n //region Serializer\n $this->app->singleton('api.serializer', function (Application $app) {\n return $this->prepareSerializer()->build();\n });\n //endregion\n\n //region JSON Schema Constraint\n $this->app->singleton('api.schema.constraint', function (Application $app) {\n $fileRetriever = new FileGetContents;\n $fileRetriever->setBasePath(config(self::CONFIG_KEY . '.request.schema_path') . DIRECTORY_SEPARATOR);\n\n $retriever = (new UriRetriever)\n ->setUriRetriever($fileRetriever);\n\n $constraintFactory = new Factory(new SchemaStorage($retriever));\n $constraintFactory->setConfig(Constraint::CHECK_MODE_APPLY_DEFAULTS | Constraint::CHECK_MODE_COERCE_TYPES);\n\n return $constraintFactory;\n });\n //endregion\n\n //region JSON Schema Validator\n $this->app->singleton('api.schema.validator', function (Application $app) {\n return new Validator(\n $app->make('api.schema.constraint')\n );\n });\n //endregion\n\n //region RequestHandler\n $this->app->singleton(RequestHandler::class, function (Application $app) {\n $serializer = $this->prepareSerializer()\n ->configureListeners(function (EventDispatcher $dispatcher) use ($app) {\n $dispatcher->addSubscriber(\n new RequestDeserializationHandler(\n $app->make('api.schema.validator'),\n $app->make('purifier')\n )\n );\n })\n ->build();\n\n return new RequestHandler($serializer);\n });\n //endregion\n }",
"public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$classes = $this->get_service_classes();\n\n\t\t$this->services = array_map(\n\t\t\t[ $this, 'instantiate_service' ],\n\t\t\t$classes\n\t\t);\n\n\t\tarray_walk( $this->services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}",
"protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }",
"public function getSubscribedEvents()\n {\n return array(\n Events::onFlush,\n Events::loadClassMetadata\n );\n }",
"public function getSubscribedEvents()\n {\n return array(\n 'loadClassMetadata'\n );\n }",
"public function getSubscribedEvents()\n {\n return array(\n 'prePersist',\n 'preUpdate',\n 'loadClassMetadata'\n );\n }",
"public function getSubscribedEvents()\n {\n return array('onFlush', 'loadClassMetadata');\n }",
"public function subscribe();",
"protected function getRegisteredClasses() {}",
"public static function getSubscribedEvents();",
"public static function getSubscribedEvents();",
"public function register()\n {\n return [T_CLASS, T_INTERFACE];\n }",
"private function registerEventHandlers()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_PaymentProcessorCsrf',\n 'onGetControllerPathFrontend'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_PaymentProcessor',\n 'onGetControllerPathFrontend'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_PaymentInformation',\n 'onGetControllerPathFrontendInformation'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Backend_Order_Save',\n 'onOrderSaveAction'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_VrpayecommerceClient',\n 'onInitResourceVrpayecommerceClient'\n );\n $this->subscribeEvent(\n 'Shopware_Modules_Admin_GetPaymentMeans_DataFilter',\n 'onGetPaymentMeans'\n );\n $this->subscribeEvent(\n 'Shopware_Modules_Admin_GetPaymentMeanById_DataFilter',\n 'onGetPaymentMeanById'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch',\n 'onPostDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchTemplate'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Checkout',\n 'onPostDispatchFinish'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Checkout',\n 'onFrontendCheckoutPostDispatch'\n );\n }",
"public function subscribe(Dispatcher $events): void\n {\n $events->listen('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n $events->listen('wp_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('login_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('admin_init', [$this, 'enqueueEditorAssets']);\n }",
"public function subscribe(Dispatcher $events): void\n {\n $events->listen('admin_enqueue_scripts', [$this, 'enqueueAdminAssets']);\n $events->listen('wp_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('login_enqueue_scripts', [$this, 'enqueueAppAssets']);\n $events->listen('admin_init', [$this, 'enqueueEditorAssets']);\n }",
"public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }",
"static function register(){\n\n /**\n * Il y a deux arguments: la classe actuelle et la fonction que l'on souhaite appeler ()\n */\n spl_autoload_register(array(__CLASS__,'autoload'));\n }",
"protected function setListeners()\n\t{\n\t\t$this->templates->listenEmitBasic('foreach', array($this, 'tpl_foreach'));\n\t\t$this->templates->listenEmitBasic('not-last', array($this, 'tpl_not_last'));\n\t}",
"public function registerEvents()\n {\n $this->subscribeEvent(\n 'Shopware_Controllers_Widgets_Emotion_AddElement',\n 'onEmotionAddElement'\n );\n\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Widgets_Campaign',\n 'extendsEmotionTemplates'\n );\n\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n\n /**\n * Subscribe to the post dispatch event of the emotion backend module to extend the components.\n */\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Emotion',\n 'onPostDispatchBackendEmotion'\n );\n }",
"public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_INITIALIZE => [\n ['disableUser', 0],\n ],\n FOSUserEvents::REGISTRATION_SUCCESS => [\n ['registrationFlashMessage', 0],\n ],\n ];\n }",
"public function subscribe($events)\n\t{\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginCreated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onCreated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginUpdated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onUpdated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginDeleted::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onDeleted'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginRestored::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onRestored'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginPermanentlyDeleted::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onPermanentlyDeleted'\n\t\t\t\t);\n\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginDeactivated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onDeactivated'\n\t\t\t\t);\n\t\t\n\t\t$events->listen(\n\t\t\t\t\\App\\Events\\Backend\\Plugins\\PluginReactivated::class,\n\t\t\t\t'App\\Listeners\\Backend\\Plugins\\PluginEventListener@onReactivated'\n\t\t\t\t);\n\t}",
"public function subscribe($events)\n {\n foreach ([\n QueryExecuted::class,\n TransactionBeginning::class,\n TransactionCommitted::class,\n TransactionRolledBack::class,\n ] as $className) {\n $events->listen($className, [__CLASS__, 'handle'.class_basename($className)]);\n }\n }",
"public function __construct()\n {\n $this->subscribe = new Subscribe();\n }",
"public function register()\n {\n // Bind any implementations.\n }",
"public function getSubscribedEvents()\n {\n return [Events::loadClassMetadata];\n }",
"public function getSubscribedEvents()\n {\n return [InvitedNewUserToTenancy::class => ['whenInvitedNewUserToTenancy']];\n }",
"public function register() {\n\n // Bind any implementations.\n\n }",
"public function getSubscribedEvents()\n {\n return array(\n 'postPersist',\n \t'postFlush',\n 'onFlush'\n );\n }",
"public static function getSubscribedEvents()\n {\n // event can be dispatch with dispatcher in a controller ...\n return [\n 'user.update' => 'updateUser'\n ];\n }",
"public static function register(){\n spl_autoload_register(array(__CLASS__, 'autoload'));\n }",
"public static function register(){\n spl_autoload_register(array(__CLASS__, 'autoload'));\n }",
"public function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\t'Nette\\Application\\Application::onStartup' => 'appStartup',\n\t\t\t'Nette\\Application\\Application::onRequest' => 'appRequest',\n\t\t];\n\t}",
"public function getSubscribers()\n\t\t{\n\t\t\treturn $this->subscribers;\n\t\t}",
"protected function setupListeners()\n {\n //\n }",
"public function __construct()\n {\n Hook::listen(__CLASS__);\n }",
"public function setup()\n {\n $this->getClient()->addSubscriber($this);\n }",
"public function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\tEvents::onFlush\n\t\t];\n\t}",
"public function registerEvents($class)\n {\n $class = new $class;\n\n $class->register();\n }",
"public function subscribe(Dispatcher $events)\n {\n $events->listen(\n [\n 'App\\EventSourcing\\Events\\Merchant\\LoggedIn',\n 'App\\EventSourcing\\Events\\Merchant\\SignedUp',\n ],\n 'App\\EventSourcing\\Listeners\\UserListener@handle'\n );\n }",
"public function subscribeOn(): array\n {\n }",
"protected function registerServers()\n {\n $this->container['server.lighttpd'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\Server\\Lighttpd($c['dispatcher']);\n });\n\n $this->container['server.nginx'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\Server\\Nginx($c['dispatcher']);\n });\n }",
"public function register()\n {\n spl_autoload_register($this);\n }",
"public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}",
"static function register()\n {\n spl_autoload_register([__CLASS__, 'autoload']);\n }",
"public function listen(\\ReflectionClass $class): void;",
"public function register(): array\n {\n return [\\T_CLASS];\n }",
"public function getSubscribedEvents()\n {\n return array(Events::postLoad);\n }",
"public function register()\n\t{\n\t\t$this->runListeners();\n\t}",
"public static function getSubscribedEvents()\n {\n return array(\n 'Enlight_Controller_Dispatcher_ControllerPath_Widgets_SwagBrowserLanguage' => 'onGetFrontendController',\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend' => 'onPostDispatchFrontend'\n );\n }",
"public static function getSubscribedEvents()\n {\n return [\n CoucouEvent::NAME => 'onCoucou'\n ];\n }",
"public function getSubscribedEvents()\n {\n return [\n InvitedExistingUserToTenancy::class => 'whenInvitedExistingUserToTenancy',\n InvitedNewUserToTenancy::class => 'whenInvitedNewUserToTenancy',\n ];\n }",
"public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_CONFIRM => [\n ['onRegistrationConfirm', -10],\n ],\n ];\n }",
"public function getSubscribedEvents()\n {\n return array(\n Events::prePersist,\n Events::onFlush,\n Events::loadClassMetadata\n );\n }",
"protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }",
"public function boot()\n {\n if (!chdir($this->path)) {\n return;\n }\n\n $directories = array_filter(glob('*'), 'is_dir');\n\n foreach ($directories as $directory) {\n if ($this->hasListenFile($directory)) {\n $this->registerListeners($directory);\n }\n }\n\n foreach ($this->subscribe as $subscriber) {\n Event::subscribe($subscriber);\n }\n }",
"public function plugin_classes() {\n\t\t$this->options = new Options( $this ) ;\n\t\t$this->helpers = new Helpers( $this );\n\t\t$this->core = new Core( $this );\n\t}",
"public function subscribe($events)\n {\n $events->listen(\n \\App\\Listeners\\Backend\\GemSighting\\GemSightingCreated::class,\n 'App\\Listeners\\Backend\\GemSightingEventListener@onCreated'\n );\n\n $events->listen(\n \\App\\Listeners\\Backend\\GemSighting\\GemSightingUpdated::class,\n 'App\\Listeners\\Backend\\GemSightingEventListener@onUpdated'\n );\n\n $events->listen(\n \\App\\Listeners\\Backend\\GemSighting\\GemSightingDeleted::class,\n 'App\\Listeners\\Backend\\GemSightingEventListener@onDeleted'\n );\n }",
"public function _register()\n {\n }",
"static function register()\r\n {\r\n spl_autoload_register(array(__CLASS__, 'autoload'));\r\n }",
"public function subscribe($events)\n {\n\n foreach($this->actions as $action){\n $events->listen(\n 'RoiUp\\Zoom\\Events\\Meeting\\\\MeetingRegistrant' . $action,\n self::class . '@onRegistrant' . $action\n );\n }\n\n }",
"public static function getSubscribedEvents()\n {\n return array(\n Events::RESOLVE_UPLOADED_CONTENT => 'onResolveContent',\n Events::HANDLE_UPLOADED_CONTENT => 'onHandleContent',\n );\n }",
"static public function register()\r\n {\r\n spl_autoload_register(array(self::instance(), 'autoload'));\r\n }",
"public function subscribeEvents()\n {\n $this->subscribeEvent('Enlight_Controller_Front_StartDispatch', 'onStartDispatch');\n }",
"public static function getSubscribedEvents()\n {\n return array(\n GetFormDataControllerEvent::NAME => array(\n array('getFormDataNewsController')\n )\n );\n }",
"public function __construct() {\n\t\tif($this->getAutoGlobalListen())\n\t\t\t$this->listen();\n\n\t\t$classes=array_reverse($this->getClassHierarchy(true));\n\t\tforeach($classes as $class) {\n\t\t\tif(isset(self::$_um[$class]))\n\t\t\t\t$this->attachBehaviors(self::$_um[$class]);\n\t\t}\n\t}",
"static function register()\n {\n spl_autoload_register(array(__CLASS__, 'autoload'));\n }",
"public static function register()\n {\n ini_set('unserialize_callback_func', 'spl_autoload_call');\n spl_autoload_register(array('app\\framework\\queue\\Autoloader', 'autoload'));\n }",
"protected function registerEvents(): void\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }",
"public static function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\tMeetupEvents::MEETUP_JOIN\t=> 'onUserJoins',\n\t\t\tKernelEvents::TERMINATE\t\t=> 'generatePreferences'\n\t\t];\n\t}",
"public function observers();",
"public static function defaultSubscriber(string $clazz): array\n {\n return [\n [\n 'event' => Events::POST_SERIALIZE,\n 'class' => $clazz,\n 'format' => 'json',\n 'method' => 'onPostSerialize',\n ],\n ];\n }",
"protected function __construct() {\r\n $types = Array('classes', isset($_SERVER['SHELL']) ? 'classes_shell' : 'classes_web');\r\n foreach($types as $type) {\r\n foreach(self::$config->$type as $class) {\r\n $class = __NAMESPACE__ . \"\\\\\" . $class;\r\n $this->add(new $class());\r\n }\r\n }\r\n }",
"public function subscribe($events)\n {\n $events->listen(\n 'App\\Events\\Subscriber\\Created',\n 'App\\Listeners\\SubscriberSubscriber@sendVerification'\n );\n }",
"static public function register()\n {\n spl_autoload_register(array(self::instance(), 'doAutoload'));\n }",
"function register_class()\n\t{\n\t\t\n\t\t// NO LONGER NEEDED\n\t}"
] | [
"0.6959309",
"0.68337286",
"0.677041",
"0.6584533",
"0.6566439",
"0.65212345",
"0.65051955",
"0.6474598",
"0.64124864",
"0.63344884",
"0.62822944",
"0.61335224",
"0.6133493",
"0.6128859",
"0.61268526",
"0.61158365",
"0.60067147",
"0.5923109",
"0.5922395",
"0.5919775",
"0.59045213",
"0.5903353",
"0.5897921",
"0.58734024",
"0.5871986",
"0.5870055",
"0.5868595",
"0.5866932",
"0.5860794",
"0.5853712",
"0.5848776",
"0.58459556",
"0.58454514",
"0.5834684",
"0.5815165",
"0.58066493",
"0.58066493",
"0.57962924",
"0.5794257",
"0.57822025",
"0.57822025",
"0.5774045",
"0.5752901",
"0.5742532",
"0.5737405",
"0.5733469",
"0.5723619",
"0.57203543",
"0.5718672",
"0.5710411",
"0.571006",
"0.567764",
"0.5675392",
"0.56642723",
"0.5642065",
"0.5641603",
"0.5641603",
"0.5636977",
"0.5635402",
"0.56314313",
"0.56252885",
"0.5619309",
"0.5615811",
"0.56100166",
"0.5607351",
"0.56069833",
"0.5605662",
"0.56009513",
"0.55834603",
"0.5576848",
"0.5571052",
"0.5570157",
"0.5566341",
"0.5560603",
"0.55579674",
"0.5557846",
"0.5556212",
"0.55539477",
"0.55536526",
"0.5546555",
"0.55436933",
"0.553893",
"0.5532734",
"0.5527624",
"0.55271256",
"0.552426",
"0.5524169",
"0.5521057",
"0.5520419",
"0.55172354",
"0.5513464",
"0.55120975",
"0.5497438",
"0.54955643",
"0.54949397",
"0.54942685",
"0.5491347",
"0.54784214",
"0.54749787",
"0.5472572",
"0.54698896"
] | 0.0 | -1 |
/ACTIVATING SINGLE ADMIN /DECLINING SINGLE ADMIN | public function declineSingle(){
if(isset($_SESSION['admin_email'])){
$this->model("AdminApproveModel");
if(isset($_POST['admin_decline'])){
$this->sanitizeString($_POST['admin_decline']);
$id = $this->sanitizeString($_POST['id']);
AdminApproveModel::where('id', $id)->delete();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }",
"function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}",
"function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public static function activate()\n {\n $role = get_role('administrator');\n if (!empty($role)) {\n $role->add_cap('my_plugin_manage');\n }\n }",
"private function action_adminAccount()\n\t{\n\t\tglobal $txt, $db_type, $db_connection, $databases, $incontext, $db_prefix, $db_passwd, $webmaster_email;\n\t\tglobal $db_persist, $db_server, $db_user, $db_port;\n\t\tglobal $db_type, $db_name, $mysql_set_mode;\n\n\t\t$incontext['sub_template'] = 'admin_account';\n\t\t$incontext['page_title'] = $txt['user_settings'];\n\t\t$incontext['continue'] = 1;\n\n\t\t// Need this to check whether we need the database password.\n\t\trequire(TMP_BOARDDIR . '/Settings.php');\n\t\tif (!defined('ELK'))\n\t\t{\n\t\t\tdefine('ELK', 1);\n\t\t}\n\t\tdefinePaths();\n\n\t\t// These files may be or may not be already included, better safe than sorry for now\n\t\trequire_once(SOURCEDIR . '/Subs.php');\n\n\t\t$db = load_database();\n\n\t\tif (!isset($_POST['username']))\n\t\t{\n\t\t\t$_POST['username'] = '';\n\t\t}\n\n\t\tif (!isset($_POST['email']))\n\t\t{\n\t\t\t$_POST['email'] = '';\n\t\t}\n\n\t\t$incontext['username'] = htmlspecialchars(stripslashes($_POST['username']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['email'] = htmlspecialchars(stripslashes($_POST['email']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['require_db_confirm'] = empty($db_type) || !empty($databases[$db_type]['require_db_confirm']);\n\n\t\t// Only allow create an admin account if they don't have one already.\n\t\t$db->skip_next_error();\n\t\t$request = $db->query('', '\n\t\t\tSELECT \n\t\t\t\tid_member\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_group = {int:admin_group} \n\t\t\t\tOR FIND_IN_SET({int:admin_group}, additional_groups) != 0\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'admin_group' => 1,\n\t\t\t)\n\t\t);\n\t\t// Skip the step if an admin already exists\n\t\tif ($request->num_rows() != 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t$request->free_result();\n\n\t\t// Trying to create an account?\n\t\tif (isset($_POST['password1']) && !empty($_POST['contbutt']))\n\t\t{\n\t\t\t// Wrong password?\n\t\t\tif ($incontext['require_db_confirm'] && $_POST['password3'] != $db_passwd)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_db_connect'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Not matching passwords?\n\t\t\tif ($_POST['password1'] != $_POST['password2'])\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_again_match'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No password?\n\t\t\tif (strlen($_POST['password1']) < 4)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_no_password'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!file_exists(SOURCEDIR . '/Subs.php'))\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_subs_missing'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Update the main contact email?\n\t\t\tif (!empty($_POST['email']) && (empty($webmaster_email) || $webmaster_email == '[email protected]'))\n\t\t\t{\n\t\t\t\tupdateSettingsFile(array('webmaster_email' => $_POST['email']));\n\t\t\t}\n\n\t\t\t// Work out whether we're going to have dodgy characters and remove them.\n\t\t\t$invalid_characters = preg_match('~[<>&\"\\'=\\\\\\]~', $_POST['username']) != 0;\n\t\t\t$_POST['username'] = preg_replace('~[<>&\"\\'=\\\\\\]~', '', $_POST['username']);\n\n\t\t\t$db->skip_next_error();\n\t\t\t$result = $db->query('', '\n\t\t\t\tSELECT \n\t\t\t\t\tid_member, password_salt\n\t\t\t\tFROM {db_prefix}members\n\t\t\t\tWHERE member_name = {string:username} \n\t\t\t\t\tOR email_address = {string:email}\n\t\t\t\tLIMIT 1',\n\t\t\t\tarray(\n\t\t\t\t\t'username' => stripslashes($_POST['username']),\n\t\t\t\t\t'email' => stripslashes($_POST['email']),\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($result->num_rows() != 0)\n\t\t\t{\n\t\t\t\tlist ($incontext['member_id'], $incontext['member_salt']) = $result->fetch_row();\n\t\t\t\t$result->free_result();\n\n\t\t\t\t$incontext['account_existed'] = $txt['error_user_settings_taken'];\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (trim($_POST['username']) === '' || strlen($_POST['username']) > 25)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $_POST['username'] == '' ? $txt['error_username_left_empty'] : $txt['error_username_too_long'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($invalid_characters || $_POST['username'] == '_' || $_POST['username'] == '|' || strpos($_POST['username'], '[code') !== false || strpos($_POST['username'], '[/code') !== false)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $txt['error_invalid_characters_username'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (empty($_POST['email']) || !filter_var(stripslashes($_POST['email']), FILTER_VALIDATE_EMAIL) || strlen(stripslashes($_POST['email'])) > 255)\n\t\t\t{\n\t\t\t\t// One step back, this time fill out a proper email address.\n\t\t\t\t$incontext['error'] = sprintf($txt['error_valid_email_needed'], $_POST['username']);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// All clear, lets add an admin\n\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\n\t\t\t$incontext['member_salt'] = substr(base64_encode(sha1(mt_rand() . microtime(), true)), 0, 16);\n\n\t\t\t// Format the username properly.\n\t\t\t$_POST['username'] = preg_replace('~[\\t\\n\\r\\x0B\\0\\xA0]+~', ' ', $_POST['username']);\n\t\t\t$ip = isset($_SERVER['REMOTE_ADDR']) ? substr($_SERVER['REMOTE_ADDR'], 0, 255) : '';\n\n\t\t\t// Get a security hash for this combination\n\t\t\t$password = stripslashes($_POST['password1']);\n\t\t\t$incontext['passwd'] = validateLoginPassword($password, '', $_POST['username'], true);\n\n\t\t\t$request = $db->insert('',\n\t\t\t\t$db_prefix . 'members',\n\t\t\t\tarray(\n\t\t\t\t\t'member_name' => 'string-25', 'real_name' => 'string-25', 'passwd' => 'string', 'email_address' => 'string',\n\t\t\t\t\t'id_group' => 'int', 'posts' => 'int', 'date_registered' => 'int', 'hide_email' => 'int',\n\t\t\t\t\t'password_salt' => 'string', 'lngfile' => 'string', 'avatar' => 'string',\n\t\t\t\t\t'member_ip' => 'string', 'member_ip2' => 'string', 'buddy_list' => 'string', 'pm_ignore_list' => 'string',\n\t\t\t\t\t'message_labels' => 'string', 'website_title' => 'string', 'website_url' => 'string',\n\t\t\t\t\t'signature' => 'string', 'usertitle' => 'string', 'secret_question' => 'string',\n\t\t\t\t\t'additional_groups' => 'string', 'ignore_boards' => 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tstripslashes($_POST['username']), stripslashes($_POST['username']), $incontext['passwd'], stripslashes($_POST['email']),\n\t\t\t\t\t1, 0, time(), 0,\n\t\t\t\t\t$incontext['member_salt'], '', '',\n\t\t\t\t\t$ip, $ip, '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '',\n\t\t\t\t),\n\t\t\t\tarray('id_member')\n\t\t\t);\n\n\t\t\t// Awww, crud!\n\t\t\tif ($request->hasResults() === false)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_query'] . '<br />\n\t\t\t\t<div style=\"margin: 2ex;\">' . nl2br(htmlspecialchars($db->last_error($db_connection), ENT_COMPAT, 'UTF-8')) . '</div>';\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$incontext['member_id'] = $db->insert_id(\"{$db_prefix}members\", 'id_member');\n\n\t\t\t// If we're here we're good.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function ensureAdminRoleIfRequested() {}",
"public function makeAdministrator()\n {\n $this->setRole('administrator');\n }",
"public function clickLaunchAdmin()\n {\n $this->_rootElement->find($this->launchAdmin, Locator::SELECTOR_XPATH)->click();\n }",
"public function SystemAdministratorAction()\n {\n $this->requireRoleOrRedirect('SystemAdministrator');\n $this->view->setLayout('application');\n $this->view->userProfile = (new \\Apprecie\\Library\\Security\\Authentication())->getAuthenticatedUser(\n )->getUserProfile();\n }",
"public function administration()\n {\n\n if (!empty($_SESSION) && $_SESSION['login'] == 'admin') {\n\n if (isset($_GET['deconnexion'])) {\n\n session_destroy();\n header('Location: .');\n exit();\n } elseif (isset($_GET['Appli'])) {\n $this->ctrlAdminAppli->adminappli();\n } elseif (isset($_GET['Data'])) {\n\n $this->ctrlAdminData->admindata();\n } else {\n\n $this->ctrlAdminmenu->adminmenu();\n }\n } else {\n $this->ctrlConnexion->connexion();\n }\n }",
"function xanthia_admin_main()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t* potential security holes or just too much wasted processing. For the\n\t* main function we want to check that the user has at least edit privilege\n\t* for some item within this component, or else they won't be able to do\n\t* anything and so we refuse access altogether. The lowest level of access\n\t* for administration depends on the particular module, but it is generally\n\t* either 'edit' or 'delete'\n\t*/\n if (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n // Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\t \n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n // Return the Admin View Function\n\t//return xanthia_adminmenu();\n\treturn xanthia_admin_view();\n}",
"public function setupAdmin() {\n\t\t$answer = strtoupper($this->in('Would you like to [c]reate a new user, or use an [e]xisting user?', array('C', 'E')));\n\n\t\t// New User\n\t\tif ($answer === 'C') {\n\t\t\t$this->install['username'] = $this->_newUser('username');\n\t\t\t$this->install['password'] = $this->_newUser('password');\n\t\t\t$this->install['email'] = $this->_newUser('email');\n\n\t\t\t$result = $this->db->execute(sprintf(\"INSERT INTO `%s` (`%s`, `%s`, `%s`, `%s`) VALUES (%s, %s, %s, %s);\",\n\t\t\t\t$this->install['table'],\n\t\t\t\t$this->config['userMap']['username'],\n\t\t\t\t$this->config['userMap']['password'],\n\t\t\t\t$this->config['userMap']['email'],\n\t\t\t\t$this->config['userMap']['status'],\n\t\t\t\t$this->db->value(Sanitize::clean($this->install['username'])),\n\t\t\t\t$this->db->value(Security::hash($this->install['password'], null, true)),\n\t\t\t\t$this->db->value($this->install['email']),\n\t\t\t\t$this->db->value($this->config['statusMap']['active'])\n\t\t\t));\n\n\t\t\tif ($result) {\n\t\t\t\t$this->install['user_id'] = $this->db->lastInsertId();\n\t\t\t} else {\n\t\t\t\t$this->out('An error has occured while creating the user.');\n\n\t\t\t\treturn $this->setupAdmin();\n\t\t\t}\n\n\t\t// Old User\n\t\t} else if ($answer === 'E') {\n\t\t\t$this->install['user_id'] = $this->_oldUser();\n\n\t\t// Redo\n\t\t} else {\n\t\t\treturn $this->setupAdmin();\n\t\t}\n\n\t\t$result = $this->db->execute(sprintf(\"INSERT INTO `%saccess` (`access_level_id`, `user_id`, `created`) VALUES (4, %d, NOW());\",\n\t\t\t$this->install['prefix'],\n\t\t\t$this->install['user_id']\n\t\t));\n\n\t\tif (!$result) {\n\t\t\t$this->out('An error occured while granting administrator access.');\n\n\t\t\treturn $this->setupAdmin();\n\t\t}\n\n\t\treturn true;\n\t}",
"public static function requireAdmin()\n {\n if(!SessionHelper::isAdmin()){\n header('location: ' . (string)getenv('URL') . '/');\n }\n }",
"public function administrator(){\n\t\t$this->verify();\n\t\t$data['title']=\"Administrator\";\n\t\t$data['admin_list']=$this->admin_model->fetch_admin();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('administrator/administrator', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}",
"public function actionAdmin()\n {\n if (User::findOne(['email' => '[email protected]'])) {\n echo \"Руководитель уже существует\\n\";\n\n return ExitCode::USAGE;\n }\n\n $user = new User();\n $user->email = '[email protected]';\n $user->full_name = 'Тестовый Руководитель';\n $user->is_admin = 1;\n $user->password = Yii::$app->security->generatePasswordHash('test');\n $user->save();\n echo \"Руководитель создан\\n\";\n\n return ExitCode::OK;\n }",
"static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }",
"public static function activate() {\n $random = substr(str_shuffle(MD5(microtime())), 0, 16);\n\n add_option('haa_admin_area', 'hidden-admin');\n add_option('haa_secret_key', $random);\n }",
"public function relatorio4(){\n $this->isAdmin();\n }",
"function enableAdministrator($id) {\r\n\r\n\t\t$this->query('UPDATE admins SET `enabled` = 1 WHERE id= '. $id .';');\r\n\r\n\t}",
"public function checkAdmin();",
"public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}",
"private function checkAdmin()\n {\n $admin = false;\n if (isset($_SESSION['admin'])) {\n F::set('admin', 1);\n $admin = true;\n }\n F::view()->assign(array('admin' => $admin));\n }",
"function psswrdhsh_activate()\n{\n\tglobal $lang, $mybb;\n\n\tif (psswrdhsh_core_edits('activate') === false) {\n\t\tpsswrdhsh_uninstall();\n\n\t\tflash_message($lang->error_pwh_activate, 'error');\n\t\tadmin_redirect('index.php?module=config-plugins');\n\t}\n\t\n\t// assume core edits succeeded\n\t\n\tif ($mybb->settings['regtype'] == \"randompass\") {\n\t\t\n\t\t// Sending the user a random password, which thus becomes _their_ password\n\t\t// for at least some amount of time, in plain text across media that may or\n\t\t// may not be secure and/or confidential is just an absolutely braindamaged\n\t\t// idea that should never, ever be used on a modern site. </endrant>\n\n\t\t$decent_regtype_optionscode = \"select\ninstant=Instant Activation\nverify=Send Email Verification\nadmin=Administrator Activation\nboth=Email Verification & Administrator Activation\";\n\t\t\n\t\t\n\t\t$db->update_query(\"settings\", [\"value\" => \"verify\"], \"name = 'regtype'\");\n\t\t$db->update_query(\"settings\", [\"optionscode\" => $decent_regtype_optionscode], \"name = 'regtype'\");\n\t\trebuild_settings();\n\t}\n\t\n\tif (!$mybb->settings[\"requirecomplexpasswords\"]) {\n\t\t$db->update_query(\"settings\", [\"value\" => 1], \"name = 'requirecomplexpasswords'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// Since we're requiring complex passwords, the min length should already be\n\t// considered 8 in the core, so that part is alright. But let's remove the unnecessary\n\t// ceiling to the password length, since bcrypt will work with the first 72\n\t// characters of input and 72 bytes really isn't all that much data to send.\n\t\n\tif ($mybb->settings[\"maxpasswordlength\"] < 72) {\n\t\t$db->update_query(\"settings\", [\"value\" => 72], \"name = 'maxpasswordlength'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// redirect back informing the admin of any settings we changed\n\tflash_message($lang->pwh_activate_regtype_changed, 'error');\n\tadmin_redirect('index.php?module=config-plugins');\n}",
"public function executeIndex()\n {\n sfConfig::set('config_menu','active');\n if (!$this->getUser()->hasAttribute('page', 'tv_admin/role'))\n $this->getUser()->setAttribute('page', 1, 'tv_admin/role');\n }",
"public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }",
"public function admin_activate($id = null) {\n\n if (!$id) {\n $this->Session->setFlash(__('Proporcione un Id.'), 'alert', array(\n 'plugin' => 'BoostCake',\n 'class' => 'alert-danger'\n ));\n $this->redirect(array('action' => 'index'));\n }\n\n $this->User->id = $id;\n if (!$this->User->exists()) {\n $this->Session->setFlash(__('proporsione un usuario correcto, no posee acceso ha esta informacion!!'), 'alert', array(\n 'plugin' => 'BoostCake',\n 'class' => 'alert-danger'\n ));\n $this->redirect(array('action' => 'index'));\n }\n if ($this->User->saveField('active', 1)) {\n $this->Session->setFlash(__('El usuario %s se activado correctamente.',h($id)), 'alert', array('plugin' => 'BoostCake', 'class' => 'alert-success'));\n\n $this->redirect(array('action' => 'index'));\n }\n $this->Session->setFlash(__('Usuario no activado'));\n $this->redirect(array('action' => 'index'));\n }",
"public function isAdmin()\n\t{\n\t\t$this->reply(true);\n\t}",
"public function adminOnly();",
"public function adminOnly();",
"protected function requiresAdmin() {\n if (!$this->evaluateACLS(self::ACL_ADMIN)) {\n $this->unauthorizedAccess();\n }\n }",
"protected function activateAdminMenu()\n {\n app()->singleton(\n 'AdminMenu',\n AdminMenu::class\n );\n }",
"protected function executeAdminCommand() {}",
"protected function executeAdminCommand() {}",
"protected function executeAdminCommand() {}",
"public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}",
"function require_administrator() {\n if ($this->auth->is_administrator())\n return TRUE;\n\n $this->setFlash('error', 'Area is restricted to administrators only.');\n $this->redirect('admin/login');\n }",
"public static function requireAdmin() {\n\t$status = (Yii::$app->user->identity->roles == 'admin') ? true : false;\n return $status\n }",
"protected function setupAdminUser()\n {\n $GLOBALS['current_user'] = \\BeanFactory::getBean('Users')->getSystemUser();\n }",
"function allow_admin_privileges() {\n\tif($_SESSION['role']!=='administrator'):\n\t\theader('Location: ?q=start');\n\tendif;\n}",
"function admin()\n{\n # clear the user session by default upon reaching this page\n clearUserSession();\n\n header('Location: ./adminLogin');\n exit;\n}",
"public function manageAsAdmin()\n {\n try {\n $server = $this->server->currentOrFail();\n } catch (\\RuntimeException $exc) {\n $this->exitWithMessage($exc->getMessage());\n }\n\n $this->transferTo(\n $this->api->getAdminUrlFromApi(sprintf(\n 'hardware/server/%d',\n $server->id\n ))\n );\n }",
"public function mustbeadmin()\n {\n if (!$this->hasadmin())\n {\n $this->web()->noaccess();\n }\n }",
"private function grantAdminAccess()\n {\n if ($this->checkColumn(\"shopgate\", TABLE_ADMIN_ACCESS)) {\n // Create column shopgate in admin_access...\n xtc_db_query(\n \"alter table \" . TABLE_ADMIN_ACCESS\n . \" ADD shopgate INT( 1 ) NOT NULL\"\n );\n\n // ... grant access to to shopgate for main administrator\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate=1 where customers_id=1 LIMIT 1\"\n );\n\n if (!empty($_SESSION['customer_id'])\n && $_SESSION['customer_id'] != 1\n ) {\n // grant access also to current user\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 1 where customers_id='\"\n . $_SESSION['customer_id']\n . \"' LIMIT 1\"\n );\n }\n\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 5 where customers_id = 'groups'\"\n );\n }\n }",
"function check_admin() {\n\t\t// check session exists\n\t\tif(!$this->Session->check('Admin')) {\n\t\t\t$this->Session->setFlash(__('ERROR: You must be logged in for that action.', true));\n\t\t\t$this->redirect(array('controller'=>'contenders', 'action'=>'index', 'admin'=>false));\n\t\t}\n\t}",
"public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"public function showAdminAction()\n {\n header (\"location: admin.php?route=adminAccueil\");\n }",
"function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }",
"public static function adminLoggedIn(){\n //Hvis en bruker ikke er logget inn eller han ikke er admin, vil han bli sent til login.php\n if (!isset($_SESSION['user']) || !$_SESSION['user']->isAdmin()) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $alert = new Alert(Alert::ERROR, \"Du er nødt til å være administrator for å se den siden. Du er ikke administrator.\");\n $alert->displayOnIndex();\n\n }\n }",
"public function admin() {\n\n\t\t\tif ( ! is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trequire_once $this->includes_path() . 'admin/class-cyprus-admin.php';\n\t\t}",
"public function getAdministrator() {}",
"function mod_core_admin() {\n\t\tglobal $NeptuneCore;\n\t\tglobal $NeptuneSQL;\n\t\tglobal $NeptuneAdmin;\n\t\t\n\t\tif (!isset($NeptuneCore)) {\n\t\t\t$NeptuneCore = new NeptuneCore();\n\t\t}\t\n\t\tif (!isset($NeptuneSQL)) {\n\t\t\t$NeptuneSQL = new NeptuneSQL();\n\t\t}\t\n\t\tif (!isset($NeptuneAdmin)) {\n\t\t\t$NeptuneAdmin = new NeptuneAdmin();\n\t\t}\t\n\t\t\n\t\t\n\t\tif (neptune_get_permissions() >= 3) {\n\t\t\t$query = $NeptuneCore->var_get(\"system\",\"query\");\n\t\t\tif (@isset($query[1]) && @isset($query[2])) {\n\t\t\t\t$AdminFunction = \"acp_\" . $query[1] . \"_\" . $query[2];\n\t\t\t\t\n\t\t\t\t$AdminFunction();\n\t\t\t} else {\n\t\t\t\t$NeptuneAdmin->run();\n\t\t\t}\n\t\t} else {\n\t\t\t$NeptuneCore->title($NeptuneCore->var_get(\"locale\",\"accessdenied\"));\n\t\t\t$NeptuneCore->neptune_echo(\"<p>\" . $NeptuneCore->var_get(\"locale\",\"nopermission\") . \"</p>\");\n\t\t\t\n\t\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\t}\n\t}",
"public function apymd()\n {\n session_start();\n\n if (!isset($_SESSION[\"Apoyo_admin\"])) {\n\n header(\"Location:\" . RUTA_URL . \"/inicio\");\n\n } else {\n\n $this->vista('apoyoAdministrador/menu');\n\n }\n\n }",
"function checkAdmin()\n\t {\n\t \tif(!$this->checkLogin())\n\t \t{\n\t \t\treturn FALSE;\n\t \t}\n\t \treturn TRUE;\n\t }",
"public function addadminAction()\n {\n $this->doNotRender();\n\n $email = $this->getParam('email');\n $user = \\Entity\\User::getOrCreate($email);\n\n $user->stations->add($this->station);\n $user->save();\n\n \\App\\Messenger::send(array(\n 'to' => $user->email,\n 'subject' => 'Access Granted to Station Center',\n 'template' => 'newperms',\n 'vars' => array(\n 'areas' => array('Station Center: '.$this->station->name),\n ),\n ));\n\n $this->redirectFromHere(array('action' => 'index', 'id' => NULL, 'email' => NULL));\n }",
"public function activateAdmin($id) {\n\t\t$this->__allowSuperAdminOnly();\n\t\t$adminUserData = $this->User->findById($id);\n\t\tif (!empty($adminUserData)) {\n\t\t\t$success = $this->User->activateUser($id);\n\t\t\tif ($success === true) {\n\t\t\t\t$this->__sendAdminActivatedEmail($adminUserData);\n\t\t\t\t$adminUsername = $adminUserData['User']['username'];\n\t\t\t\t$message = __('Successfully activated the user \"%s\".', $adminUsername);\n\t\t\t\t$this->Session->setFlash($message, 'success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Failed to activate the admin user.'), 'error');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('No admin with id: %d.', $id), 'error');\n\t\t}\n\t\t$this->redirect('admins');\n\t}",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function adminPermisionListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t $_SESSION['pid']\t=\t$_GET['id'];\n\t\t\t\t \n\t\t\t}",
"public static function adminPage(){\n\t\tif(!self::isAdmin()){\n\t\t\theader(\"Location: index.php\");\n\t\t\texit;\n\t\t}\n\t}",
"public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }",
"protected function isAdmin()\n {\n if($_SESSION['statut'] !== 'admin')\n {\n header('Location: index.php?route=front.connectionRegister&access=adminDenied');\n exit;\n }\n }",
"public function administrador()\n {\n return false;\n }",
"public function admin()\n {\n if ($this->loggedIn()) {\n $data['flights'] = $this->modalPage->getFlights();\n $data['name'] = $_SESSION['user_name'];\n $data['title'] = 'dashboard ' . $_SESSION['user_name'];\n $this->view(\"dashboard/\" . $_SESSION['user_role'], $data);\n\n } else {\n redirect('users/login');\n }\n\n }",
"function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}",
"function admin_member() {\n\n\t\t}",
"public function isAdmin(){\n\t\tparent::isAdmin();\n\t}",
"public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }",
"function admin_enable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 0;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been enabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"function admin_index()\n {\n if(!$this->Session->check('Admin'))\n {\n $this->redirect('/admin/login');\n }\n\n\n }",
"function userAdmin(){\r\n if(userConnect() && $_SESSION['user']['privilege']==1) return TRUE; else return FALSE;\r\n }",
"public function actionIndex()\n {\n $authManager = \\Yii::$app->authManager;\n $adminRole = $authManager->createRole(\"admin\");\n $authManager->add($adminRole);\n $adminUser = new AccountUser();\n $adminUser->username = \"admin\";\n $adminUser->password = \"pf3Zt49nsgoPFbr\";\n $adminUser->authKey= uniqid();\n $adminUser->accessToken = uniqid();\n if ($adminUser->save()) {\n $authManager->assign($adminRole, $adminUser->id);\n /*assign the role */\n }\n }",
"function is_user_admin()\n {\n }",
"public function isAdmin() {}",
"public function adminAccount(){\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $password = password_hash(trim($_POST['password']),PASSWORD_DEFAULT);\n $this->adminModel->updateAdmin($_SESSION['adminID'],trim($_POST['email']),$password);\n unset($_SESSION['adminEmail']);\n $_SESSION['adminEmail'] = trim($_POST['email']);\n $this->view('admins/adminAccount');\n }\n\n $this->view('admins/adminAccount');\n\n }",
"function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }",
"public function checkLoginAdmin() {\n $this->login = User::loginAdmin();\n $type = UserType::read($this->login->get('idUserType'));\n if ($type->get('managesPermissions')!='1') {\n $permissionsCheck = array('listAdmin'=>'permissionListAdmin',\n 'insertView'=>'permissionInsert',\n 'insert'=>'permissionInsert',\n 'insertCheck'=>'permissionInsert',\n 'modifyView'=>'permissionModify',\n 'modifyViewNested'=>'permissionModify',\n 'modify'=>'permissionModify',\n 'multiple-activate'=>'permissionModify',\n 'sortSave'=>'permissionModify',\n 'delete'=>'permissionDelete',\n 'multiple-delete'=>'permissionDelete');\n $permissionCheck = $permissionsCheck[$this->action];\n $permission = Permission::readFirst(array('where'=>'objectName=\"'.$this->type.'\" AND idUserType=\"'.$type->id().'\" AND '.$permissionCheck.'=\"1\"'));\n if ($permission->id()=='') {\n if ($this->mode == 'ajax') {\n return __('permissionsDeny');\n } else { \n header('Location: '.url('NavigationAdmin/permissions', true));\n exit();\n }\n }\n }\n }",
"protected function startup()\n\t{\n\t\tparent::startup();\n\n\t\tif (!$this->getUser()->isAllowed($this->getName(), $this->getAction())) {\n\t\t\t$this->flashMessage('Daná sekcia alebo akcia je dostupná len po prihlásení.\n\t\t\t\tAk ste prihlásený požiadajte administrátora o pridelenie\n\t\t\t\toprávnení pre túto sekciu.');\n\n\t\t\tif ($this->loginPresenter) {\n\t\t\t\t$this->redirect('Administration:default');\n\t\t\t}\n\t\t}\n\t}",
"public function ensureAdministratorAccess() {\r\n /** @var modUserGroup $adminGroup */\r\n $adminGroup = $this->modx->getObject('modUserGroup',array('name' => 'Administrator'));\r\n /** @var modAccessPolicy $adminContextPolicy */\r\n $adminContextPolicy = $this->modx->getObject('modAccessPolicy',array('name' => 'Context'));\r\n if ($adminGroup) {\r\n if ($adminContextPolicy) {\r\n /** @var modAccessContext $adminAdminAccess */\r\n $adminAdminAccess = $this->modx->newObject('modAccessContext');\r\n $adminAdminAccess->set('principal',$adminGroup->get('id'));\r\n $adminAdminAccess->set('principal_class','modUserGroup');\r\n $adminAdminAccess->set('target',$this->object->get('key'));\r\n $adminAdminAccess->set('policy',$adminContextPolicy->get('id'));\r\n $adminAdminAccess->save();\r\n }\r\n }\r\n }",
"public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }",
"function admin() {\r\n\t\tglobal $zdb;\r\n\t\t\r\n\t\tif (isset($_COOKIE['admin'])) {\r\n\t\t\t$cookie = unserialize(stripslashes($_COOKIE['admin']));\r\n\t\t\tif (!isset($cookie['username']) || !isset($cookie['password'])) {\r\n\t\t\t\t$this->loggedin = false;\r\n\t\t\t} else {\r\n\t\t\t\t$valid = $this->validate($cookie['username'],$cookie['password']);\r\n\t\t\t\tif ($valid === true) { $this->loggedin = true; }\r\n\t\t\t\telse { $this->loggedin = false; }\r\n\t\t\t\t\r\n\t\t\t\t$quser = $zdb->qstr($cookie['username']);\r\n\t\t\t\t$query = $zdb->Execute(\"SELECT `userid` FROM `admins` WHERE `username` = $quser\");\r\n\t\t\t\t$this->username = $cookie['username'];\r\n\t\t\t\t$this->password = $cookie['password'];\r\n\t\t\t\t$this->userid = $query->fields[0];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->loggedin = false;\r\n\t\t}\r\n\t}",
"public function admin_enable($id = null) {\n\n\t\t\t/*disable rendering of view*/\n\t\t\t$this->autoRender = false;\n\n\t\t\t/*set activity as \"Enable\"*/\n\t\t\t$act=array('activ'=>'1');\n\n\t\t\t/*save activity parameter to table \"modules\"*/\n\t\t\t$this->Module->id=$id;\n\t\t\t$this->Module->save($act);\n\n\t\t\t/*back to method \"admin_index\"*/\n\t\t\t$this->redirect(array('action' => 'admin_index'));\n\t\t\t}",
"public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }",
"public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }",
"function oaupostgrad_admin_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `administrator` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function isAdmin();",
"private function notAdmin() : void\n {\n if( intval($this->law) === self::CREATOR_LAW_LEVEL)\n {\n (new Session())->set('user','error','Impossible d\\'effectuer cette action');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }",
"function registradoadmin(){\n\t\tif (isset($_SESSION[\"adminvalido\"])==false){\n\t\t\theader(\"Refresh: 0; URL=index.php\");\n\t\t\tob_end_flush();\n\t\t\texit();\n\t\t}\n\t}",
"public function admin() {\n // Check the arguments\n $args = func_get_args();\n\n if (count($args) == 1) {\n if ($this->isPHPScript($args[0])) {\n $this->_adminPanel = array('script' => $args[0]);\n } else {\n $this->_adminPanel = $args[0];\n }\n } elseif (count($args) == 2) {\n // @TODO\n }\n // Implemented by extended classes\n }",
"function grant_super_admin($user_id)\n {\n }",
"public function admin()\n {\n $this->template_admin->displayad('admin');\n }",
"function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}",
"function IsAdmin()\n{\n\treturn false;\n}",
"function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}",
"function is_admin()\r\n{\r\n\tif (!isset($_SESSION['admin']))\r\n\t{\r\n\t\theader(\"Location:index.php?controller=user&action=login\");exit;\r\n\t}\r\n}",
"function anuncios_admin() {\n\t\tinclude('anuncios_admin.php');\n\t}",
"function wporphanageex_activate() {\n\tglobal $wpdb;\n\n\t// set default role if not exist\n\tif ( ! get_option( 'wporphanageex_role' ) && get_option( 'default_role' ) ) {\n\t\tupdate_option( 'wporphanageex_role', get_option( 'default_role' ) );\n\t} else {\n\t\tupdate_option( 'wporphanageex_role', 'subscriber' );\n\t}\n\n\t// set default prefix if not exist\n\t$prefixes = array();\n\t$prefixes[] = $wpdb->prefix;\n\tif ( ! get_option( 'wporphanageex_prefixes' ) ) {\n\t\tupdate_option( 'wporphanageex_prefixes', $prefixes );\n\t}\n\n}",
"function checkPermissionAdmin() {\n\t\tif ($_SESSION['log_admin']!=='1'){\n\t\t\theader('Location: start.php');\n\t\t\tdie();\n\t\t}\n\t}",
"public function testActivateByTenantAdmin(): void\n {\n // Login via tenant-admin\n $token = $this->loginByEmail(self::TENANT_ADMIN_2[0], self::TENANT_ADMIN_2[1]);\n\n // Request\n $response = $this->put('api/v1/outroCards/activate/3?token=' . $token);\n\n // Check response status\n $response->assertStatus(403);\n\n $responseJSON = json_decode($response->getContent(), true);\n $success = $responseJSON['success']; // array\n $code = $responseJSON['code']; // array\n $message = $responseJSON['message']; // array\n\n $this->assertEquals(false, $success);\n $this->assertEquals(403, $code);\n $this->assertEquals('Permission is absent', $message);\n }",
"function manager_admin_init(){\t \n\n\t\t\n\n\t\t\t\n\t}",
"function ad_restr()\n\t{\n\t\tif (!$this->is_admin_logged_in())\n\t\t\tredirect(base_url('admin/login'));\n\t}"
] | [
"0.71095085",
"0.7026808",
"0.7010578",
"0.6986166",
"0.69407046",
"0.69147134",
"0.67336965",
"0.6733146",
"0.66202265",
"0.6595781",
"0.65949076",
"0.6579862",
"0.65641105",
"0.65605295",
"0.65589577",
"0.6549584",
"0.65375936",
"0.6537554",
"0.6527101",
"0.6499236",
"0.646861",
"0.6449254",
"0.6419819",
"0.64123",
"0.6396159",
"0.63912076",
"0.6386679",
"0.6376221",
"0.6376221",
"0.6374248",
"0.6371589",
"0.63624525",
"0.63624525",
"0.63624525",
"0.6361834",
"0.6357832",
"0.6351565",
"0.634813",
"0.63458747",
"0.63385767",
"0.63222235",
"0.6320707",
"0.63200945",
"0.63177264",
"0.63080966",
"0.6279356",
"0.6279356",
"0.6272675",
"0.62590647",
"0.6253258",
"0.62465245",
"0.62411815",
"0.6235484",
"0.62344784",
"0.62147653",
"0.6208472",
"0.6207608",
"0.620243",
"0.61975443",
"0.61970246",
"0.6196277",
"0.6182243",
"0.6181716",
"0.6176664",
"0.6165945",
"0.6158451",
"0.6141436",
"0.6138646",
"0.61334103",
"0.613277",
"0.6124409",
"0.6124138",
"0.6121262",
"0.6118597",
"0.6115412",
"0.61153513",
"0.611145",
"0.6111268",
"0.6103802",
"0.6101175",
"0.6100346",
"0.60984856",
"0.6098304",
"0.609448",
"0.6092655",
"0.6078889",
"0.6072403",
"0.6069115",
"0.60676086",
"0.60548353",
"0.6054667",
"0.6053069",
"0.6052904",
"0.6035525",
"0.60344416",
"0.6028564",
"0.6027093",
"0.60241365",
"0.602347",
"0.6017398",
"0.60074776"
] | 0.0 | -1 |
/DECLINING SINGLE ADMIN /ACTIVATING MULTIPLE ADMIN | public function approveMultiple(){
if(isset($_SESSION['admin_email'])){
$this->model("AdminApproveModel");
if(isset($_POST['admin_approve_all'])){
$approve_all = $this->sanitizeString($_POST['admin_approve_all']);
$id = $this->sanitizeString($_POST['id']);
$check_all = $this->sanitizeString($_POST['admin_check_all']);
if(!empty($check_all)){
AdminApproveModel::where('id', $id)->update(['priority'=>'Activated']);
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function action_adminAccount()\n\t{\n\t\tglobal $txt, $db_type, $db_connection, $databases, $incontext, $db_prefix, $db_passwd, $webmaster_email;\n\t\tglobal $db_persist, $db_server, $db_user, $db_port;\n\t\tglobal $db_type, $db_name, $mysql_set_mode;\n\n\t\t$incontext['sub_template'] = 'admin_account';\n\t\t$incontext['page_title'] = $txt['user_settings'];\n\t\t$incontext['continue'] = 1;\n\n\t\t// Need this to check whether we need the database password.\n\t\trequire(TMP_BOARDDIR . '/Settings.php');\n\t\tif (!defined('ELK'))\n\t\t{\n\t\t\tdefine('ELK', 1);\n\t\t}\n\t\tdefinePaths();\n\n\t\t// These files may be or may not be already included, better safe than sorry for now\n\t\trequire_once(SOURCEDIR . '/Subs.php');\n\n\t\t$db = load_database();\n\n\t\tif (!isset($_POST['username']))\n\t\t{\n\t\t\t$_POST['username'] = '';\n\t\t}\n\n\t\tif (!isset($_POST['email']))\n\t\t{\n\t\t\t$_POST['email'] = '';\n\t\t}\n\n\t\t$incontext['username'] = htmlspecialchars(stripslashes($_POST['username']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['email'] = htmlspecialchars(stripslashes($_POST['email']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['require_db_confirm'] = empty($db_type) || !empty($databases[$db_type]['require_db_confirm']);\n\n\t\t// Only allow create an admin account if they don't have one already.\n\t\t$db->skip_next_error();\n\t\t$request = $db->query('', '\n\t\t\tSELECT \n\t\t\t\tid_member\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_group = {int:admin_group} \n\t\t\t\tOR FIND_IN_SET({int:admin_group}, additional_groups) != 0\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'admin_group' => 1,\n\t\t\t)\n\t\t);\n\t\t// Skip the step if an admin already exists\n\t\tif ($request->num_rows() != 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t$request->free_result();\n\n\t\t// Trying to create an account?\n\t\tif (isset($_POST['password1']) && !empty($_POST['contbutt']))\n\t\t{\n\t\t\t// Wrong password?\n\t\t\tif ($incontext['require_db_confirm'] && $_POST['password3'] != $db_passwd)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_db_connect'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Not matching passwords?\n\t\t\tif ($_POST['password1'] != $_POST['password2'])\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_again_match'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No password?\n\t\t\tif (strlen($_POST['password1']) < 4)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_no_password'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!file_exists(SOURCEDIR . '/Subs.php'))\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_subs_missing'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Update the main contact email?\n\t\t\tif (!empty($_POST['email']) && (empty($webmaster_email) || $webmaster_email == '[email protected]'))\n\t\t\t{\n\t\t\t\tupdateSettingsFile(array('webmaster_email' => $_POST['email']));\n\t\t\t}\n\n\t\t\t// Work out whether we're going to have dodgy characters and remove them.\n\t\t\t$invalid_characters = preg_match('~[<>&\"\\'=\\\\\\]~', $_POST['username']) != 0;\n\t\t\t$_POST['username'] = preg_replace('~[<>&\"\\'=\\\\\\]~', '', $_POST['username']);\n\n\t\t\t$db->skip_next_error();\n\t\t\t$result = $db->query('', '\n\t\t\t\tSELECT \n\t\t\t\t\tid_member, password_salt\n\t\t\t\tFROM {db_prefix}members\n\t\t\t\tWHERE member_name = {string:username} \n\t\t\t\t\tOR email_address = {string:email}\n\t\t\t\tLIMIT 1',\n\t\t\t\tarray(\n\t\t\t\t\t'username' => stripslashes($_POST['username']),\n\t\t\t\t\t'email' => stripslashes($_POST['email']),\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($result->num_rows() != 0)\n\t\t\t{\n\t\t\t\tlist ($incontext['member_id'], $incontext['member_salt']) = $result->fetch_row();\n\t\t\t\t$result->free_result();\n\n\t\t\t\t$incontext['account_existed'] = $txt['error_user_settings_taken'];\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (trim($_POST['username']) === '' || strlen($_POST['username']) > 25)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $_POST['username'] == '' ? $txt['error_username_left_empty'] : $txt['error_username_too_long'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($invalid_characters || $_POST['username'] == '_' || $_POST['username'] == '|' || strpos($_POST['username'], '[code') !== false || strpos($_POST['username'], '[/code') !== false)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $txt['error_invalid_characters_username'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (empty($_POST['email']) || !filter_var(stripslashes($_POST['email']), FILTER_VALIDATE_EMAIL) || strlen(stripslashes($_POST['email'])) > 255)\n\t\t\t{\n\t\t\t\t// One step back, this time fill out a proper email address.\n\t\t\t\t$incontext['error'] = sprintf($txt['error_valid_email_needed'], $_POST['username']);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// All clear, lets add an admin\n\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\n\t\t\t$incontext['member_salt'] = substr(base64_encode(sha1(mt_rand() . microtime(), true)), 0, 16);\n\n\t\t\t// Format the username properly.\n\t\t\t$_POST['username'] = preg_replace('~[\\t\\n\\r\\x0B\\0\\xA0]+~', ' ', $_POST['username']);\n\t\t\t$ip = isset($_SERVER['REMOTE_ADDR']) ? substr($_SERVER['REMOTE_ADDR'], 0, 255) : '';\n\n\t\t\t// Get a security hash for this combination\n\t\t\t$password = stripslashes($_POST['password1']);\n\t\t\t$incontext['passwd'] = validateLoginPassword($password, '', $_POST['username'], true);\n\n\t\t\t$request = $db->insert('',\n\t\t\t\t$db_prefix . 'members',\n\t\t\t\tarray(\n\t\t\t\t\t'member_name' => 'string-25', 'real_name' => 'string-25', 'passwd' => 'string', 'email_address' => 'string',\n\t\t\t\t\t'id_group' => 'int', 'posts' => 'int', 'date_registered' => 'int', 'hide_email' => 'int',\n\t\t\t\t\t'password_salt' => 'string', 'lngfile' => 'string', 'avatar' => 'string',\n\t\t\t\t\t'member_ip' => 'string', 'member_ip2' => 'string', 'buddy_list' => 'string', 'pm_ignore_list' => 'string',\n\t\t\t\t\t'message_labels' => 'string', 'website_title' => 'string', 'website_url' => 'string',\n\t\t\t\t\t'signature' => 'string', 'usertitle' => 'string', 'secret_question' => 'string',\n\t\t\t\t\t'additional_groups' => 'string', 'ignore_boards' => 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tstripslashes($_POST['username']), stripslashes($_POST['username']), $incontext['passwd'], stripslashes($_POST['email']),\n\t\t\t\t\t1, 0, time(), 0,\n\t\t\t\t\t$incontext['member_salt'], '', '',\n\t\t\t\t\t$ip, $ip, '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '',\n\t\t\t\t),\n\t\t\t\tarray('id_member')\n\t\t\t);\n\n\t\t\t// Awww, crud!\n\t\t\tif ($request->hasResults() === false)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_query'] . '<br />\n\t\t\t\t<div style=\"margin: 2ex;\">' . nl2br(htmlspecialchars($db->last_error($db_connection), ENT_COMPAT, 'UTF-8')) . '</div>';\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$incontext['member_id'] = $db->insert_id(\"{$db_prefix}members\", 'id_member');\n\n\t\t\t// If we're here we're good.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public static function activate()\n {\n $role = get_role('administrator');\n if (!empty($role)) {\n $role->add_cap('my_plugin_manage');\n }\n }",
"protected function ensureAdminRoleIfRequested() {}",
"public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }",
"function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function clickLaunchAdmin()\n {\n $this->_rootElement->find($this->launchAdmin, Locator::SELECTOR_XPATH)->click();\n }",
"function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}",
"public function administration()\n {\n\n if (!empty($_SESSION) && $_SESSION['login'] == 'admin') {\n\n if (isset($_GET['deconnexion'])) {\n\n session_destroy();\n header('Location: .');\n exit();\n } elseif (isset($_GET['Appli'])) {\n $this->ctrlAdminAppli->adminappli();\n } elseif (isset($_GET['Data'])) {\n\n $this->ctrlAdminData->admindata();\n } else {\n\n $this->ctrlAdminmenu->adminmenu();\n }\n } else {\n $this->ctrlConnexion->connexion();\n }\n }",
"public function executeIndex()\n {\n sfConfig::set('config_menu','active');\n if (!$this->getUser()->hasAttribute('page', 'tv_admin/role'))\n $this->getUser()->setAttribute('page', 1, 'tv_admin/role');\n }",
"public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}",
"public function administrator(){\n\t\t$this->verify();\n\t\t$data['title']=\"Administrator\";\n\t\t$data['admin_list']=$this->admin_model->fetch_admin();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('administrator/administrator', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}",
"public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}",
"public function makeAdministrator()\n {\n $this->setRole('administrator');\n }",
"public function setupAdmin() {\n\t\t$answer = strtoupper($this->in('Would you like to [c]reate a new user, or use an [e]xisting user?', array('C', 'E')));\n\n\t\t// New User\n\t\tif ($answer === 'C') {\n\t\t\t$this->install['username'] = $this->_newUser('username');\n\t\t\t$this->install['password'] = $this->_newUser('password');\n\t\t\t$this->install['email'] = $this->_newUser('email');\n\n\t\t\t$result = $this->db->execute(sprintf(\"INSERT INTO `%s` (`%s`, `%s`, `%s`, `%s`) VALUES (%s, %s, %s, %s);\",\n\t\t\t\t$this->install['table'],\n\t\t\t\t$this->config['userMap']['username'],\n\t\t\t\t$this->config['userMap']['password'],\n\t\t\t\t$this->config['userMap']['email'],\n\t\t\t\t$this->config['userMap']['status'],\n\t\t\t\t$this->db->value(Sanitize::clean($this->install['username'])),\n\t\t\t\t$this->db->value(Security::hash($this->install['password'], null, true)),\n\t\t\t\t$this->db->value($this->install['email']),\n\t\t\t\t$this->db->value($this->config['statusMap']['active'])\n\t\t\t));\n\n\t\t\tif ($result) {\n\t\t\t\t$this->install['user_id'] = $this->db->lastInsertId();\n\t\t\t} else {\n\t\t\t\t$this->out('An error has occured while creating the user.');\n\n\t\t\t\treturn $this->setupAdmin();\n\t\t\t}\n\n\t\t// Old User\n\t\t} else if ($answer === 'E') {\n\t\t\t$this->install['user_id'] = $this->_oldUser();\n\n\t\t// Redo\n\t\t} else {\n\t\t\treturn $this->setupAdmin();\n\t\t}\n\n\t\t$result = $this->db->execute(sprintf(\"INSERT INTO `%saccess` (`access_level_id`, `user_id`, `created`) VALUES (4, %d, NOW());\",\n\t\t\t$this->install['prefix'],\n\t\t\t$this->install['user_id']\n\t\t));\n\n\t\tif (!$result) {\n\t\t\t$this->out('An error occured while granting administrator access.');\n\n\t\t\treturn $this->setupAdmin();\n\t\t}\n\n\t\treturn true;\n\t}",
"function psswrdhsh_activate()\n{\n\tglobal $lang, $mybb;\n\n\tif (psswrdhsh_core_edits('activate') === false) {\n\t\tpsswrdhsh_uninstall();\n\n\t\tflash_message($lang->error_pwh_activate, 'error');\n\t\tadmin_redirect('index.php?module=config-plugins');\n\t}\n\t\n\t// assume core edits succeeded\n\t\n\tif ($mybb->settings['regtype'] == \"randompass\") {\n\t\t\n\t\t// Sending the user a random password, which thus becomes _their_ password\n\t\t// for at least some amount of time, in plain text across media that may or\n\t\t// may not be secure and/or confidential is just an absolutely braindamaged\n\t\t// idea that should never, ever be used on a modern site. </endrant>\n\n\t\t$decent_regtype_optionscode = \"select\ninstant=Instant Activation\nverify=Send Email Verification\nadmin=Administrator Activation\nboth=Email Verification & Administrator Activation\";\n\t\t\n\t\t\n\t\t$db->update_query(\"settings\", [\"value\" => \"verify\"], \"name = 'regtype'\");\n\t\t$db->update_query(\"settings\", [\"optionscode\" => $decent_regtype_optionscode], \"name = 'regtype'\");\n\t\trebuild_settings();\n\t}\n\t\n\tif (!$mybb->settings[\"requirecomplexpasswords\"]) {\n\t\t$db->update_query(\"settings\", [\"value\" => 1], \"name = 'requirecomplexpasswords'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// Since we're requiring complex passwords, the min length should already be\n\t// considered 8 in the core, so that part is alright. But let's remove the unnecessary\n\t// ceiling to the password length, since bcrypt will work with the first 72\n\t// characters of input and 72 bytes really isn't all that much data to send.\n\t\n\tif ($mybb->settings[\"maxpasswordlength\"] < 72) {\n\t\t$db->update_query(\"settings\", [\"value\" => 72], \"name = 'maxpasswordlength'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// redirect back informing the admin of any settings we changed\n\tflash_message($lang->pwh_activate_regtype_changed, 'error');\n\tadmin_redirect('index.php?module=config-plugins');\n}",
"private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }",
"public function relatorio4(){\n $this->isAdmin();\n }",
"public function checkAdmin();",
"function editAdminsManagement($id_users, $pseudo, $lastname, $firstname, $email, $roleusers){\n $managementAdminsEdition = new \\Project\\Models\\ManagementAdminManager();\n $managementEditionAdmins = $managementAdminsEdition->adminsManagementEdition($id_users, $pseudo, $lastname, $firstname, $email, $roleusers);\n\n header(\"Location: administration.php?action=managementAdmin&id=$id_users\");\n \n \n }",
"function xanthia_admin_main()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t* potential security holes or just too much wasted processing. For the\n\t* main function we want to check that the user has at least edit privilege\n\t* for some item within this component, or else they won't be able to do\n\t* anything and so we refuse access altogether. The lowest level of access\n\t* for administration depends on the particular module, but it is generally\n\t* either 'edit' or 'delete'\n\t*/\n if (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n // Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\t \n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n // Return the Admin View Function\n\t//return xanthia_adminmenu();\n\treturn xanthia_admin_view();\n}",
"public function procMenuAdminUpdateAuth()\n\t{\n\t\t$menuItemSrl = Context::get('menu_item_srl');\n\t\t$exposure = Context::get('exposure');\n\t\t$htPerm = Context::get('htPerm');\n\n\t\t$oMenuModel = getAdminModel('menu');\n\t\t$itemInfo = $oMenuModel->getMenuItemInfo($menuItemSrl);\n\t\t$args = $itemInfo;\n\n\t\t// Menu Exposure update\n\t\t// if exposure target is only login user...\n\t\tif(!$exposure)\n\t\t{\n\t\t\t$args->group_srls = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$exposure = explode(',', $exposure);\n\t\t\tif(in_array($exposure, array('-1','-3')))\n\t\t\t{\n\t\t\t\t$args->group_srls = $exposure;\n\t\t\t}\n\n\t\t\tif($exposure) $args->group_srls = implode(',', $exposure);\n\t\t}\n\n\t\t$output = executeQuery('menu.updateMenuItem', $args);\n\t\tif(!$output->toBool())\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\n\t\t// Module Access update\n\t\tunset($args);\n\t\t$oMenuAdminModel = getAdminModel('menu');\n\t\t$menuInfo = $oMenuAdminModel->getMenu($itemInfo->menu_srl);\n\n\t\t$oModuleModel = getModel('module');\n\t\t$moduleInfo = $oModuleModel->getModuleInfoByMid($itemInfo->url, $menuInfo->site_srl);\n\n\t\t$xml_info = $oModuleModel->getModuleActionXML($moduleInfo->module);\n\n\t\t$grantList = $xml_info->grant;\n\t\tif(!$grantList) $grantList = new stdClass;\n\n\t\t$grantList->access = new stdClass();\n\t\t$grantList->access->default = 'guest';\n\t\t$grantList->manager = new stdClass();\n\t\t$grantList->manager->default = 'manager';\n\n\t\t$grant = new stdClass;\n\t\tforeach($grantList AS $grantName=>$grantInfo)\n\t\t{\n\t\t\tif(!$htPerm[$grantName])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$htPerm[$grantName] = explode(',', $htPerm[$grantName]);\n\n\t\t\t// users in a particular group\n\t\t\tif(is_array($htPerm[$grantName]))\n\t\t\t{\n\t\t\t\t$grant->{$grantName} = $htPerm[$grantName];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// -1 = Log-in user only, -2 = site members only, 0 = all users\n\t\t\telse\n\t\t\t{\n\t\t\t\t$grant->{$grantName}[] = $htPerm[$grantName];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$grant->{$group_srls} = array();\n\t\t}\n\n\t\tif(count($grant))\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->insertModuleGrants($moduleInfo->module_srl, $grant);\n\t\t}\n\n\t\t// recreate menu cache file\n\t\t$this->makeXmlFile($itemInfo->menu_srl);\n\t}",
"function oaupostgrad_admin_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `administrator` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function adminPermisionListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t $_SESSION['pid']\t=\t$_GET['id'];\n\t\t\t\t \n\t\t\t}",
"function enableAdministrator($id) {\r\n\r\n\t\t$this->query('UPDATE admins SET `enabled` = 1 WHERE id= '. $id .';');\r\n\r\n\t}",
"private function grantAdminAccess()\n {\n if ($this->checkColumn(\"shopgate\", TABLE_ADMIN_ACCESS)) {\n // Create column shopgate in admin_access...\n xtc_db_query(\n \"alter table \" . TABLE_ADMIN_ACCESS\n . \" ADD shopgate INT( 1 ) NOT NULL\"\n );\n\n // ... grant access to to shopgate for main administrator\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate=1 where customers_id=1 LIMIT 1\"\n );\n\n if (!empty($_SESSION['customer_id'])\n && $_SESSION['customer_id'] != 1\n ) {\n // grant access also to current user\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 1 where customers_id='\"\n . $_SESSION['customer_id']\n . \"' LIMIT 1\"\n );\n }\n\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 5 where customers_id = 'groups'\"\n );\n }\n }",
"public function SystemAdministratorAction()\n {\n $this->requireRoleOrRedirect('SystemAdministrator');\n $this->view->setLayout('application');\n $this->view->userProfile = (new \\Apprecie\\Library\\Security\\Authentication())->getAuthenticatedUser(\n )->getUserProfile();\n }",
"function require_administrator() {\n if ($this->auth->is_administrator())\n return TRUE;\n\n $this->setFlash('error', 'Area is restricted to administrators only.');\n $this->redirect('admin/login');\n }",
"function allow_admin_privileges() {\n\tif($_SESSION['role']!=='administrator'):\n\t\theader('Location: ?q=start');\n\tendif;\n}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}",
"public static function activate() {\n $random = substr(str_shuffle(MD5(microtime())), 0, 16);\n\n add_option('haa_admin_area', 'hidden-admin');\n add_option('haa_secret_key', $random);\n }",
"protected function requiresAdmin() {\n if (!$this->evaluateACLS(self::ACL_ADMIN)) {\n $this->unauthorizedAccess();\n }\n }",
"public function indexAction() {\n if (in_array(0, $this->_rolesUser) || in_array(1, $this->_rolesUser)) $this->_redirect(\"/admintool/index/go\");\n \n // traductores\n if (in_array(2, $this->_rolesUser)) $this->_redirect(\"/admintool/index/translate\"); \n }",
"protected function executeAdminCommand() {}",
"protected function executeAdminCommand() {}",
"protected function executeAdminCommand() {}",
"protected function activateAdminMenu()\n {\n app()->singleton(\n 'AdminMenu',\n AdminMenu::class\n );\n }",
"private function checkAdmin()\n {\n $admin = false;\n if (isset($_SESSION['admin'])) {\n F::set('admin', 1);\n $admin = true;\n }\n F::view()->assign(array('admin' => $admin));\n }",
"public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}",
"function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}",
"public function checkLoginAdmin() {\n $this->login = User::loginAdmin();\n $type = UserType::read($this->login->get('idUserType'));\n if ($type->get('managesPermissions')!='1') {\n $permissionsCheck = array('listAdmin'=>'permissionListAdmin',\n 'insertView'=>'permissionInsert',\n 'insert'=>'permissionInsert',\n 'insertCheck'=>'permissionInsert',\n 'modifyView'=>'permissionModify',\n 'modifyViewNested'=>'permissionModify',\n 'modify'=>'permissionModify',\n 'multiple-activate'=>'permissionModify',\n 'sortSave'=>'permissionModify',\n 'delete'=>'permissionDelete',\n 'multiple-delete'=>'permissionDelete');\n $permissionCheck = $permissionsCheck[$this->action];\n $permission = Permission::readFirst(array('where'=>'objectName=\"'.$this->type.'\" AND idUserType=\"'.$type->id().'\" AND '.$permissionCheck.'=\"1\"'));\n if ($permission->id()=='') {\n if ($this->mode == 'ajax') {\n return __('permissionsDeny');\n } else { \n header('Location: '.url('NavigationAdmin/permissions', true));\n exit();\n }\n }\n }\n }",
"public function set_admin_caps(){\n\t\t\t\n\t\t\t$caps = $this->set_caps( $this->cpt_args );\n\t\t\t\n\t\t\t$admin = get_role( 'administrator' );\n\n\t\t\tforeach( $caps as $cap ){\n\t\t\t\tif( !$admin->has_cap( $cap ) )\n\t\t\t\t\t$admin->add_cap( $cap );\n\t\t\t}\n\t\t}",
"public function testActivateByTenantAdmin(): void\n {\n // Login via tenant-admin\n $token = $this->loginByEmail(self::TENANT_ADMIN_2[0], self::TENANT_ADMIN_2[1]);\n\n // Request\n $response = $this->put('api/v1/outroCards/activate/3?token=' . $token);\n\n // Check response status\n $response->assertStatus(403);\n\n $responseJSON = json_decode($response->getContent(), true);\n $success = $responseJSON['success']; // array\n $code = $responseJSON['code']; // array\n $message = $responseJSON['message']; // array\n\n $this->assertEquals(false, $success);\n $this->assertEquals(403, $code);\n $this->assertEquals('Permission is absent', $message);\n }",
"public static function requireAdmin() {\n\t$status = (Yii::$app->user->identity->roles == 'admin') ? true : false;\n return $status\n }",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }",
"public function run()\n {\n $admin = $this->admin;\n\n // 1\n $admin['name'] = 'Super Admin';\n $admin['email'] = 'super-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('super-admin');\n\n // 2\n $admin['name'] = 'Helix Admin';\n $admin['email'] = 'helix-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('helix-admin');\n DB::table(self::TABLE2)->insert([\n 'user_id' => $user->id,\n 'company_id' => 1,\n ]);\n\n // 3\n $admin['name'] = 'Tenant Admin';\n $admin['email'] = 'tenant-1-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make('12345678');\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-admin');\n DB::table(self::TABLE2)->insert([\n 'user_id' => $user->id,\n 'company_id' => 2,\n ]);\n\n // 4\n $admin['name'] = 'Tenant-2 Admin';\n $admin['email'] = 'tenant-2-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-admin');\n DB::table(self::TABLE2)->insert([\n 'user_id' => $user->id,\n 'company_id' => 3,\n ]);\n\n // 5\n $admin['name'] = 'Tenant-1 Dep-2 Child-1 User-1';\n $admin['email'] = 'tenant-1-dep-2-child-1-user-1' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-user');\n DB::table(self::TABLE3)->insert([\n 'user_id' => $user->id,\n 'department_id' => 2,\n ]);\n\n // 6\n $admin['name'] = 'Tenant-1 Dep-4 User-1';\n $admin['email'] = 'tenant-1-dep-4-user-1' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-user');\n DB::table(self::TABLE3)->insert([\n 'user_id' => $user->id,\n 'department_id' => 4,\n ]);\n\n // 7\n $admin['name'] = 'Tenant-2 Root-Dep-1 User-1';\n $admin['email'] = 'tenant-2-root-dep-1-user-1' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-user');\n DB::table(self::TABLE3)->insert([\n 'user_id' => $user->id,\n 'department_id' => 3,\n ]);\n }",
"public function manageAsAdmin()\n {\n try {\n $server = $this->server->currentOrFail();\n } catch (\\RuntimeException $exc) {\n $this->exitWithMessage($exc->getMessage());\n }\n\n $this->transferTo(\n $this->api->getAdminUrlFromApi(sprintf(\n 'hardware/server/%d',\n $server->id\n ))\n );\n }",
"public function ensureAdministratorAccess() {\r\n /** @var modUserGroup $adminGroup */\r\n $adminGroup = $this->modx->getObject('modUserGroup',array('name' => 'Administrator'));\r\n /** @var modAccessPolicy $adminContextPolicy */\r\n $adminContextPolicy = $this->modx->getObject('modAccessPolicy',array('name' => 'Context'));\r\n if ($adminGroup) {\r\n if ($adminContextPolicy) {\r\n /** @var modAccessContext $adminAdminAccess */\r\n $adminAdminAccess = $this->modx->newObject('modAccessContext');\r\n $adminAdminAccess->set('principal',$adminGroup->get('id'));\r\n $adminAdminAccess->set('principal_class','modUserGroup');\r\n $adminAdminAccess->set('target',$this->object->get('key'));\r\n $adminAdminAccess->set('policy',$adminContextPolicy->get('id'));\r\n $adminAdminAccess->save();\r\n }\r\n }\r\n }",
"static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}",
"static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }",
"function mod_core_admin() {\n\t\tglobal $NeptuneCore;\n\t\tglobal $NeptuneSQL;\n\t\tglobal $NeptuneAdmin;\n\t\t\n\t\tif (!isset($NeptuneCore)) {\n\t\t\t$NeptuneCore = new NeptuneCore();\n\t\t}\t\n\t\tif (!isset($NeptuneSQL)) {\n\t\t\t$NeptuneSQL = new NeptuneSQL();\n\t\t}\t\n\t\tif (!isset($NeptuneAdmin)) {\n\t\t\t$NeptuneAdmin = new NeptuneAdmin();\n\t\t}\t\n\t\t\n\t\t\n\t\tif (neptune_get_permissions() >= 3) {\n\t\t\t$query = $NeptuneCore->var_get(\"system\",\"query\");\n\t\t\tif (@isset($query[1]) && @isset($query[2])) {\n\t\t\t\t$AdminFunction = \"acp_\" . $query[1] . \"_\" . $query[2];\n\t\t\t\t\n\t\t\t\t$AdminFunction();\n\t\t\t} else {\n\t\t\t\t$NeptuneAdmin->run();\n\t\t\t}\n\t\t} else {\n\t\t\t$NeptuneCore->title($NeptuneCore->var_get(\"locale\",\"accessdenied\"));\n\t\t\t$NeptuneCore->neptune_echo(\"<p>\" . $NeptuneCore->var_get(\"locale\",\"nopermission\") . \"</p>\");\n\t\t\t\n\t\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\t}\n\t}",
"public function admin_activate($id = null) {\n\n if (!$id) {\n $this->Session->setFlash(__('Proporcione un Id.'), 'alert', array(\n 'plugin' => 'BoostCake',\n 'class' => 'alert-danger'\n ));\n $this->redirect(array('action' => 'index'));\n }\n\n $this->User->id = $id;\n if (!$this->User->exists()) {\n $this->Session->setFlash(__('proporsione un usuario correcto, no posee acceso ha esta informacion!!'), 'alert', array(\n 'plugin' => 'BoostCake',\n 'class' => 'alert-danger'\n ));\n $this->redirect(array('action' => 'index'));\n }\n if ($this->User->saveField('active', 1)) {\n $this->Session->setFlash(__('El usuario %s se activado correctamente.',h($id)), 'alert', array('plugin' => 'BoostCake', 'class' => 'alert-success'));\n\n $this->redirect(array('action' => 'index'));\n }\n $this->Session->setFlash(__('Usuario no activado'));\n $this->redirect(array('action' => 'index'));\n }",
"function check_admin() {\n\t\t// check session exists\n\t\tif(!$this->Session->check('Admin')) {\n\t\t\t$this->Session->setFlash(__('ERROR: You must be logged in for that action.', true));\n\t\t\t$this->redirect(array('controller'=>'contenders', 'action'=>'index', 'admin'=>false));\n\t\t}\n\t}",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"public function admin() {\n // Check the arguments\n $args = func_get_args();\n\n if (count($args) == 1) {\n if ($this->isPHPScript($args[0])) {\n $this->_adminPanel = array('script' => $args[0]);\n } else {\n $this->_adminPanel = $args[0];\n }\n } elseif (count($args) == 2) {\n // @TODO\n }\n // Implemented by extended classes\n }",
"function editAdminsManagementMdp($id_users, $pass){\n $managementAdminsEditionMdp = new \\Project\\Models\\ManagementAdminManager();\n $managementEditionAdminsMdp = $managementAdminsEditionMdp->adminsManagementEditionMdp($id_users, $pass);\n\n header(\"Location: administration.php?action=managementAdmin&id=$id_users\");\n }",
"public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }",
"public function actionIndex()\n {\n $authManager = \\Yii::$app->authManager;\n $adminRole = $authManager->createRole(\"admin\");\n $authManager->add($adminRole);\n $adminUser = new AccountUser();\n $adminUser->username = \"admin\";\n $adminUser->password = \"pf3Zt49nsgoPFbr\";\n $adminUser->authKey= uniqid();\n $adminUser->accessToken = uniqid();\n if ($adminUser->save()) {\n $authManager->assign($adminRole, $adminUser->id);\n /*assign the role */\n }\n }",
"public function adminOnly();",
"public function adminOnly();",
"public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }",
"public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }",
"function procMenuAdminAllActList()\n\t{\n\t\t$oModuleModel = getModel('module');\n\t\t$installed_module_list = $oModuleModel->getModulesXmlInfo();\n\t\tif(is_array($installed_module_list))\n\t\t{\n\t\t\t$currentLang = Context::getLangType();\n\t\t\t$menuList = array();\n\t\t\tforeach($installed_module_list AS $key=>$value)\n\t\t\t{\n\t\t\t\t$info = $oModuleModel->getModuleActionXml($value->module);\n\t\t\t\tif($info->menu) $menuList[$value->module] = $info->menu;\n\t\t\t\tunset($info->menu);\n\t\t\t}\n\t\t}\n\t\t$this->add('menuList', $menuList);\n\t}",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function actionAdmin()\n {\n if (User::findOne(['email' => '[email protected]'])) {\n echo \"Руководитель уже существует\\n\";\n\n return ExitCode::USAGE;\n }\n\n $user = new User();\n $user->email = '[email protected]';\n $user->full_name = 'Тестовый Руководитель';\n $user->is_admin = 1;\n $user->password = Yii::$app->security->generatePasswordHash('test');\n $user->save();\n echo \"Руководитель создан\\n\";\n\n return ExitCode::OK;\n }",
"function wporphanageex_activate() {\n\tglobal $wpdb;\n\n\t// set default role if not exist\n\tif ( ! get_option( 'wporphanageex_role' ) && get_option( 'default_role' ) ) {\n\t\tupdate_option( 'wporphanageex_role', get_option( 'default_role' ) );\n\t} else {\n\t\tupdate_option( 'wporphanageex_role', 'subscriber' );\n\t}\n\n\t// set default prefix if not exist\n\t$prefixes = array();\n\t$prefixes[] = $wpdb->prefix;\n\tif ( ! get_option( 'wporphanageex_prefixes' ) ) {\n\t\tupdate_option( 'wporphanageex_prefixes', $prefixes );\n\t}\n\n}",
"public function activate(): void\n {\n if ($this->selectedRowsQuery->count() > 0) {\n Role::whereIn('id', $this->selectedKeys())->update(['is_active' => 1]);\n }\n\n $this->resetSelected();\n }",
"public function getAdministrator() {}",
"public function isAdmin()\n\t{\n\t\t$this->reply(true);\n\t}",
"public function actionAdmin()\n {\n $query = \"SELECT * FROM vartotojai WHERE klase = :klase\";\n $vartotojai = Yii::$app->db_prod->createCommand($query, [':klase' => self::KLASE_ADMINISTRATORIUS])->queryAll();\n foreach ($vartotojai as $vartotojas) {\n if ($this->adminExists($vartotojas['id'])) {\n continue;\n }\n\n $admin = new Admin([\n 'scenario' => Admin::SCENARIO_SYSTEM_MIGRATES_ADMIN_DATA,\n 'id' => $vartotojas['id'],\n 'name' => $vartotojas['vardas'],\n 'surname' => $vartotojas['pavarde'],\n 'email' => $vartotojas['elpastas'],\n 'phone' => $vartotojas['telefonai'],\n 'password_reset_token' => Admin::DEFAULT_PASSWORD_RESET_TOKEN,\n 'admin' => Admin::IS_ADMIN,\n 'archived' => $this->convertArchiveStatus($vartotojas['archive_status']),\n 'created_at' => strtotime($vartotojas['data']),\n 'updated_at' => strtotime($vartotojas['data']),\n ]);\n\n $admin->generateAuthKey();\n\n if ($this->hadOldPassword($vartotojas['raw_password'])) {\n $admin->setPassword($vartotojas['raw_password']);\n } else {\n $admin->setPassword(self::DEFAULT_PASSWORD);\n }\n\n $this->fixValidationErrors($admin);\n $admin->validate();\n if ($admin->errors) {\n $this->writeToCSV(Admin::tableName(), $admin->errors, $admin->id);\n continue;\n }\n\n $admin->detachBehaviors(); // Remove timestamp behaviour\n $admin->save(false);\n }\n }",
"public static function requireAdmin()\n {\n if(!SessionHelper::isAdmin()){\n header('location: ' . (string)getenv('URL') . '/');\n }\n }",
"function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }",
"public function emailAllAdministrators () {\n\t\t\t// Get the authentication model and admin role model\n\t\t\t$admin = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $admin->getUserId () );\n\t\t\t$auth->setId ( $admin->getUserId () );\n\t\t\t$role = Mage::getModel (\"admin/role\");\n\t\t\t// Get the role ID for administrator role\n\t\t\t$roleId = $role;\n\t\t\t$roleId = $roleId->getCollection ();\n\t\t\t$roleId = $roleId->addFieldToFilter ( \"role_name\", array ( \"eq\" => \"Administrators\" ) );\n\t\t\t$roleId = $roleId->getFirstItem ();\n\t\t\t$roleId = $roleId->getId ();\n\t\t\t// Get the users that belong to the administrator role\n\t\t\t$roleUsers = $role;\n\t\t\t$roleUsers = $roleUsers->getCollection ();\n\t\t\t$roleUsers = $roleUsers->addFieldToFilter ( \"parent_id\", array ( \"eq\" => $roleId ) );\n\t\t\t// Loop through all the users belonging to the role\n\t\t\tforeach ( $roleUsers as $roleUser ) {\n\t\t\t\t// Load the data helper class and get user instance\n\t\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t\t$user = Mage::getModel (\"admin/user\")->load ( $roleUser->getUserId () );\n\t\t\t\t// Do not send email if user is inactive\n\t\t\t\tif ( !$user->getIsActive () ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Format timestamp date and time\n\t\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t\t$timestampDate = \"-\";\n\t\t\t\t$timestampTime = \"-\";\n\t\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t\t);\n\t\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Construct the user contact's full name\n\t\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t\t// Construct and send out ban notice email to user\n\t\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_admin\");\n\t\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t\t$template->setType (\"html\");\n\t\t\t\t$template->setSenderEmail (\n\t\t\t\t\tMage::getStoreConfig (\"trans_email/ident_general/email\")\n\t\t\t\t);\n\t\t\t\t$template->setTemplateSubject (\n\t\t\t\t\tMage::helper (\"twofactor\")->__(\"2FA ban notice for user \") .\n\t\t\t\t\t$admin->getUsername ()\n\t\t\t\t);\n\t\t\t\t$test = $template->send ( $user->getEmail (), $fullName,\n\t\t\t\t\tarray (\n\t\t\t\t\t\t\"base_admin_url\" => Mage::getUrl (\"adminhtml\"),\n\t\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\t\"last_address\" => $auth->getLastAddress (),\n\t\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\t\"username\" => $admin->getUsername (),\n\t\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }",
"function addAdminsAsRecipients(){\n $sql = \"SELECT name FROM user WHERE is_admin = 1\";\n $db = new DB();\n $db->query( $sql );\n while( $row = $db->fetchRow()){\n $this->AddRecipient($row[\"name\"]);\n }\n }",
"public function uultra_modules_deactivate_activate_membership()\r\n\t{\r\n\t\t$module_list = array();\r\n\t\t$modules = $_POST[\"modules_list\"]; \r\n\t\t$package_id = $_POST[\"package_id\"]; \r\n\t\t\r\n\t\t\r\n\t\tif($modules!=\"\")\r\n\t\t{\r\n\t\t\t$modules =rtrim($modules,\"|\");\r\n\t\t\t$module_list = explode(\"|\", $modules);\t\t\t\r\n\t\t\t$modules_disalowed = serialize($module_list);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tprint_r($module_list);\r\n\t\t\t\t\r\n\t\t//update custom\t\t\r\n\t\t$defaultmodules = $this->uultra_get_modules_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules\r\n\t\t$user_menu_modules = $this->uultra_get_user_navigator_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules added by admin\r\n\t\t$user_menu_modules_by_admin = $this->uultra_get_custom_modules_for_membership($package_id);\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\t$modules_array = array();\r\n\t\t$i = 1;\r\n\t\tforeach($defaultmodules as $key => $module)\r\n\t\t{\r\n\t\t\tif(!$this->check_if_in_deactivate_array($module_list, $key))\r\n\t\t\t{\r\n\t\t\t\t//if (strpos($modules,$key) !== true) {\r\n\t\t\t\t\t\r\n\t\t\t\t//set position and custom settings\t\t\t\t\t\t\t\r\n\t\t\t\tif(isset($user_menu_modules[$key]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t$modules_array[$key] = $module;\t\t\t\t\t\t\t\r\n\t\t\t\t$i++;\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\techo \"disallowed: \" . $key;\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(is_array($user_menu_modules_by_admin) && $user_menu_modules_by_admin!=\"\")\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$modules_array = $modules_array + $user_menu_modules_by_admin;\t\t\r\n\t\t}\r\n\t\tprint_r($modules_array);\r\n\t\tupdate_option('userultra_default_user_features_custom_package_'.$package_id.'',$modules_array);\t\t\t\t\t\r\n\t\tupdate_option('uultra_excluded_user_modules_package_'.$package_id.'',$modules_disalowed);\r\n\t\tdie();\r\n\t\r\n\t}",
"function btwp_restrict_admin_access() {\n\t\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t\n\tif( !array_key_exists( 'administrator', $current_user->caps ) ) {\n\t\twp_redirect( get_bloginfo( 'url' ) );\n\t\texit;\n\t}\n\n}",
"public function addadminAction()\n {\n $this->doNotRender();\n\n $email = $this->getParam('email');\n $user = \\Entity\\User::getOrCreate($email);\n\n $user->stations->add($this->station);\n $user->save();\n\n \\App\\Messenger::send(array(\n 'to' => $user->email,\n 'subject' => 'Access Granted to Station Center',\n 'template' => 'newperms',\n 'vars' => array(\n 'areas' => array('Station Center: '.$this->station->name),\n ),\n ));\n\n $this->redirectFromHere(array('action' => 'index', 'id' => NULL, 'email' => NULL));\n }",
"private function btn_admin(){\n\n // no admin buttons for some lists\n if (VM::outOfScope() \n\t|| !$this->isWritable() \n\t|| in_array($this->doing,array('show_mails_exchange',))) return array();\n \n bTiming()->cpu(__function__);\n locateAndInclude('bForm_vm_Expenses'); \n \n $notTooLate = (False\n\t\t ? (!VM::isEventEndorsed() || ($this->rec['e_end'] >= time()) || \n\t\t (VM::isEventEndorsed() && bForm_vm_Visit::_getStatus($this->rec) == STATUS_PENDING))\n\t\t : !VM_tooLateForAccommodation($this->rec));\n \n $exp_arePaid= (bForm_vm_Expenses::_exp_arePaid($this->rec)\n\t\t ? bIcons()->get(array('d'=>'Paid up',\n\t\t\t\t\t 'c'=>'only_online',\n\t\t\t\t\t 'i'=>'i-bundle'))\n\t\t : '');\n \n $edit_visit = ($notTooLate\n\t\t ? bIcons()->getButton(array('d'=>'see/update the visit information',\n\t\t\t\t\t\t'c'=>'only_online',\n\t\t\t\t\t\t'i'=>'i-edit',\n\t\t\t\t\t\t'l'=>b_url::same(\"?form=vm_Visit&id=\".$this->rec['v_id'])))\n\t\t : '');\n \n $delete_v = ($notTooLate\n\t\t ? ((!bForm_vm_Visit::_isVisitType_program($this->rec) && \n\t\t\tVM::hasRightTo('book') && \n\t\t\tbForm_vm_Visit::_getStatus($this->rec)==STATUS_NO)\n\t\t ? b_btn::submit_icon('i-drop',\n\t\t\t\t\t txt_deleteVisit,\n\t\t\t\t\t b_url::same(\"?function=vm_cancel_visit&v_id=\".$this->rec['v_id']),\n\t\t\t\t\t $confirm=True)\n\t\t : '')\n\t\t : '');\n \n $reply = array($edit_visit,$delete_v,$exp_arePaid);\n if ($this->doing == 'budget_byProjects'){\n if (empty($this->rec['v_projectid'])) $reply[] = b_btn::submit_icon('i-wallet',\n\t\t\t\t\t\t\t\t\t 'set project number',\n\t\t\t\t\t\t\t\t\t b_url::same(\"?action_once=\".VM_visit_project.\"&form=vm_Visit&id=\".$this->rec['v_id']));\n }\n bTiming()->cpu();\n return $reply;\n }",
"public function activateAdmin($id) {\n\t\t$this->__allowSuperAdminOnly();\n\t\t$adminUserData = $this->User->findById($id);\n\t\tif (!empty($adminUserData)) {\n\t\t\t$success = $this->User->activateUser($id);\n\t\t\tif ($success === true) {\n\t\t\t\t$this->__sendAdminActivatedEmail($adminUserData);\n\t\t\t\t$adminUsername = $adminUserData['User']['username'];\n\t\t\t\t$message = __('Successfully activated the user \"%s\".', $adminUsername);\n\t\t\t\t$this->Session->setFlash($message, 'success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Failed to activate the admin user.'), 'error');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('No admin with id: %d.', $id), 'error');\n\t\t}\n\t\t$this->redirect('admins');\n\t}",
"public function activate() {\n global $wp_roles;\n\n if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {\n // @codingStandardsIgnoreLine\n $wp_roles = new \\WP_Roles();\n }\n\n $all_cap = array(\n 'dokan_view_booking_menu',\n 'dokan_add_booking_product',\n 'dokan_edit_booking_product',\n 'dokan_delete_booking_product',\n 'dokan_manage_booking_products',\n 'dokan_manage_booking_calendar',\n 'dokan_manage_bookings',\n 'dokan_manage_booking_resource',\n );\n\n foreach ( $all_cap as $key => $cap ) {\n $wp_roles->add_cap( 'seller', $cap );\n $wp_roles->add_cap( 'administrator', $cap );\n $wp_roles->add_cap( 'shop_manager', $cap );\n }\n\n // flush rewrite rules after plugin is activate\n $this->flush_rewrite_rules();\n }",
"function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }",
"function checkAdmin()\n\t {\n\t \tif(!$this->checkLogin())\n\t \t{\n\t \t\treturn FALSE;\n\t \t}\n\t \treturn TRUE;\n\t }",
"function seed_csp4_welcome_screen_do_activation_redirect() {\r\n if ( ! get_transient( '_seed_csp4_welcome_screen_activation_redirect' ) ) {\r\n return;\r\n }\r\n\r\n // Delete the redirect transient\r\n delete_transient( '_seed_csp4_welcome_screen_activation_redirect' );\r\n\r\n // Bail if activating from network, or bulk\r\n if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\r\n return;\r\n }\r\n\r\n // Redirect to bbPress about page\r\n wp_safe_redirect( add_query_arg( array( 'page' => 'seed_csp4' ), admin_url( 'admin.php' ) ) );\r\n}",
"public function admin_redirects()\n {\n if (!get_transient('_wc_pos_activation_redirect') || is_network_admin() || isset($_GET['activate-multi']) || !current_user_can('manage_woocommerce')) {\n return;\n }\n\n delete_transient('_wc_pos_activation_redirect');\n\n if (!empty($_GET['page']) && in_array($_GET['page'], array(WC_POS_TOKEN . '-setup', WC_POS_TOKEN . '-about'))) {\n return;\n }\n\n if (defined('DOING_AJAX') && DOING_AJAX) {\n return;\n }\n\n // If the user needs to install, send them to the setup wizard\n if (WC_POS_Admin_Notices::has_notice('pos_install')) {\n wp_safe_redirect(admin_url('index.php?page=' . WC_POS_TOKEN . '-setup'));\n exit;\n // Otherwise, the welcome page\n } else {\n\n /*wp_safe_redirect(admin_url('admin.php?page=' . WC_POS_TOKEN . '-about'));\n exit;*/\n\n }\n }",
"public function run()\n {\n\n \t$adminSys = config('constant.role.ADMIN_SYS');\n \t$admin = config('constant.role.ADMIN');\n $vendor = config('constant.role.VENDOR');\n $customer = config('constant.role.CUSTOMER');\n\n \t$all = [$adminSys,$admin,$vendor,$customer];\n\n \t$adminSysAndAdmin = [$adminSys,$admin];\n\n\n $permissions = array(\n //*******************************************************************************//\n //********************************* Users ***************************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_users_profile_edit',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n [\n 'name' => 'admin_users_profile_update',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n\n [\n 'name' => 'admin_users_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_update',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_users_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_users_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_users_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_users_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n //**********************************************************************************//\n //********************************* fin de users **********************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Images **************************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_images_storage_show',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n [\n 'name' => 'admin_images_fit_show',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n [\n 'name' => 'admin_images_resize_show',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Images *********************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Businesses **********************************//\n //*******************************************************************************//\n\n\n [\n 'name' => 'admin_businesses_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_update',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'businesses_admin_businesses_profile_create_edit',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer],\n ],\n\n [\n 'name' => 'businesses_admin_businesses_profile_store_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer],\n ],\n\n [\n 'name' => 'api_admin_businesses_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_profile_store_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_businesses_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_businesses_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'api_admin_businesses_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n //**********************************************************************************//\n //********************************* Fin de Businesses *****************************//\n //**********************************************************************************//\n\n\n //*******************************************************************************//\n //********************************* Products ************************************//\n //*******************************************************************************//\n\n\n [\n 'name' => 'admin_products_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_products_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_products_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'businesses_admin_products_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'businesses_admin_products_create',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'businesses_admin_products_edit',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_store',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_show',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n [\n 'name' => 'admin_products_update',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_destroy',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Products *******************************//\n //**********************************************************************************//\n\n\n //*******************************************************************************//\n //********************************* Categories **********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_categories_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_update',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_products_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_categories_products',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_categories_businesses',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n [\n 'name' => 'api_admin_categories_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_categories_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_categories_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Categories *****************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Images **************************************//\n //*******************************************************************************//\n [\n 'name' => 'api_admin_images_store_editor_public',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_images_destroy',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Images *********************************//\n //**********************************************************************************//\n\n\n //*******************************************************************************//\n //********************************* Shippings ***********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_shipping_form_list_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_shipping_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_shipping_store',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_shipping_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_shipping_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_shipping_destroy',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_shipping_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Shippings ******************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Departments *********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'api_admin_departments_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Departments ****************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Provinces ***********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'api_admin_provinces_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Provinces ******************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Districts ***********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'api_admin_districts_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Districts ******************************//\n //**********************************************************************************//\n\n //*********************************************************************************//\n //********************************* Price ranges **********************************//\n //*********************************************************************************//\n\n [\n 'name' => 'api_admin_price_ranges_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Price ranges ***************************//\n //**********************************************************************************//\n\n //*********************************************************************************//\n //********************************* Provider Types ********************************//\n //*********************************************************************************//\n\n [\n 'name' => 'api_admin_provider_types_ranges_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Provider Types *************************//\n //**********************************************************************************//\n\n\n //*********************************************************************************//\n //********************************* Business Payment Method ***********************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_business_payment_method_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'api_admin_business_payment_method_businesses_mercado_pago',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_business_payment_method_businesses_wire_transfer',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_business_payment_method_businesses_wire_transfer_store_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'businesses_admin_business_payment_method_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_business_payment_method_businesses_wire_transfer_store',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Business Payment Method ****************//\n //**********************************************************************************//\n\n //*********************************************************************************//\n //********************************* Orders ****************************************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_orders_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'admin_orders_menu_auth_user_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'admin_orders_auth_user_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'businesses_admin_orders_auth_user_business_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_orders_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_orders_auth_user_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'businesses_admin_orders_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_orders_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'api_admin_orders_business_auth_user_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_orders_auth_user_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_orders_change_to_paid_out',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_orders_change_to_delivered',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_orders_change_to_cancelled',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n\n //**********************************************************************************//\n //********************************* Fin de Orders ********************************//\n //**********************************************************************************//\n\n\n //*********************************************************************************//\n //********************************* Claims ****************************************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_claims_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'admin_claims_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'api_admin_claims_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Claims *********************************//\n //**********************************************************************************//\n\n\n //*********************************************************************************//\n //********************************* Contacts **************************************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_contacts_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'admin_contacts_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'api_admin_contacts_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Contacts *******************************//\n //**********************************************************************************//\n\n// //*********************************************************************************//\n// //********************************* Orders Group **********************************//\n// //*********************************************************************************//\n//\n// [\n// 'name' => 'admin_order_groups_auth_user_index',\n// 'guard_name'=>'web',\n// 'roles'=>[$adminSys,$admin,$vendor,$customer]\n// ],\n//\n// //**********************************************************************************//\n// //****************************** Fin de Orders Group *****************************//\n// //**********************************************************************************//\n\n );\n\n \t$this->createRolesPermissions($permissions);\n }",
"public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }",
"public function admin_enable($id = null) {\n\n\t\t\t/*disable rendering of view*/\n\t\t\t$this->autoRender = false;\n\n\t\t\t/*set activity as \"Enable\"*/\n\t\t\t$act=array('activ'=>'1');\n\n\t\t\t/*save activity parameter to table \"modules\"*/\n\t\t\t$this->Module->id=$id;\n\t\t\t$this->Module->save($act);\n\n\t\t\t/*back to method \"admin_index\"*/\n\t\t\t$this->redirect(array('action' => 'admin_index'));\n\t\t\t}",
"public function setAdminParams() {\n\t\tif( $this->_user->role != Core_Acl_Roles::ADMINS ) {\n\t\t\t$this->removeElement('group_id');\n\t\t\t$this->removeElement('active');\n\t\t}\n\t}",
"public function run()\n {\n foreach ($this->administrators as $user) {\n User::factory()->administrator()->create($user);\n }\n }",
"public function showAdminAction()\n {\n header (\"location: admin.php?route=adminAccueil\");\n }",
"public function actionChangeClientAdmins()\n {\n if (isset($_GET['clientID'])) {\n\n //check client id\n $clientID = intval($_GET['clientID']);\n if ($clientID == 0) {\n $this->redirect('/admin');\n die;\n }\n\n // get client with users\n $client = Clients::model()->with('users', 'company')->findByPk($clientID);\n $client_users = $client->users;\n $company = $client->company;\n $userTypes = array();\n\n if ($client_users) {\n foreach ($client_users as $key => $cuser) {\n $uClRow = UsersClientList::model()->findByAttributes(array(\n 'User_ID'=>$cuser->User_ID,\n 'Client_ID'=>$clientID,\n ));\n $this->clientAdmins[$cuser->User_ID] = $uClRow->hasClientAdminPrivileges() ? 1 : 0;\n $userTypes[$cuser->User_ID] = $uClRow->User_Type;\n }\n }\n\n // change admins\n foreach ($_GET as $id => $type) {\n if ($id != 'clientID' && is_numeric($id) && isset($userTypes[$id]) && isset($this->userTypes[$type])) {\n if ($userTypes[$id] != $this->userTypes[$type]) {\n $user = Users::model()->with('person')->findByPk($id);\n $userToClient = UsersClientList::model()->findByAttributes(array(\n 'User_ID' => $id,\n 'Client_ID' => $clientID,\n ));\n if (in_array($this->userTypes[$type], UsersClientList::$clientAdmins)) {\n $userToClient->User_Type = $this->userTypes[$type];\n\n // check company\n if ($company->Auth_Url !== NULL || $company->Auth_Code !== NULL) {\n $company->Auth_Url = NULL;\n $company->Auth_Code = NULL;\n $company->save();\n }\n\n $mailSuccess = Mail::sendClientAssignAdminMail($user->person->Email, $user->person->First_Name, $user->person->Last_Name, $client->company->Company_Name, true);\n Projects::assignClientAdminProjects($userToClient->User_ID, $userToClient->Client_ID);\n } else {\n $userToClient->User_Type = $this->userTypes[$type];\n\n $condition = UsersClientList::getClientAdminCondition($clientID);\n $userToClientAdmin = UsersClientList::model()->find($condition);\n\n if ($userToClientAdmin) {\n $currentAdmin = Users::model()->with('person')->findByPk($userToClientAdmin->User_ID);\n $currentAdminEmail = $currentAdmin->person->Email;\n } else {\n $currentAdminEmail = false;\n }\n\n $mailSuccess = Mail::sendClientAssignAdminMail($user->person->Email, $user->person->First_Name, $user->person->Last_Name, $client->company->Company_Name, false, $currentAdminEmail);\n }\n $userToClient->save();\n $userToClient->User_Approval_Value = UsersClientList::checkUserApprovalValue($id, $clientID, $userToClient->User_Approval_Value);\n $userToClient->save();\n }\n }\n }\n\n Yii::app()->user->setFlash('success', \"Client User Types have been successfully changed!\");\n } else {\n Yii::app()->user->setFlash('success', \"Client User Types were not changed!\");\n }\n $this->redirect('/admin');\n }",
"public function isAdministrator() {\n\t $adminuserId = Mage::getSingleton('admin/session')->getUser()->getUserId();\t \n\t $role_data = Mage::getModel('admin/user')->load($adminuserId)->getRole()->getData();\n\t \n\t return in_array(self::ADMIN_ROLE_NAME, $role_data);\n\t}",
"public function activate()\n {\n $activate = new updates;\n $activate->userid =Auth::User()->id;\n $activate->save();\n\n DB::update('update users set userlevel = ? where id = ?',[2,1]);\n \n return redirect('editor')->with('status',' First id changed');\n }",
"function setUserActive($token) // activate-account.php, admin_user.php\r\n \r\n{\r\n global $mysqli,$db_table_prefix;\r\n\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\r\n\t\tSET active = 1\r\n\r\n\t\tWHERE\r\n\r\n\t\tactivation_token = ?\r\n\r\n\t\tLIMIT 1\");\r\n\r\n\t$stmt->bind_param(\"s\", $token);\r\n\r\n\t$result = $stmt->execute();\r\n\r\n\t$stmt->close();\t\r\n\r\n\treturn $result;\r\n\t\r\n}",
"protected function isAdmin()\n {\n if($_SESSION['statut'] !== 'admin')\n {\n header('Location: index.php?route=front.connectionRegister&access=adminDenied');\n exit;\n }\n }",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}"
] | [
"0.6450845",
"0.643702",
"0.64239943",
"0.6396119",
"0.6369838",
"0.63427883",
"0.6240558",
"0.6168838",
"0.61657673",
"0.616491",
"0.6155982",
"0.6105694",
"0.6054148",
"0.60504663",
"0.60470927",
"0.6045934",
"0.6024513",
"0.6014664",
"0.60117465",
"0.6006739",
"0.60036343",
"0.5998661",
"0.59904236",
"0.5986092",
"0.5977868",
"0.5965767",
"0.59447694",
"0.5943668",
"0.5932834",
"0.5932834",
"0.59281504",
"0.5921822",
"0.59122777",
"0.5908959",
"0.5908959",
"0.5908959",
"0.5896107",
"0.5894602",
"0.5892766",
"0.5892383",
"0.58888894",
"0.58848035",
"0.58792824",
"0.5863704",
"0.5850203",
"0.5850203",
"0.5847878",
"0.58469117",
"0.58351094",
"0.5832441",
"0.58153135",
"0.5809875",
"0.5800992",
"0.57969093",
"0.57868505",
"0.57806706",
"0.57762897",
"0.57759655",
"0.57725126",
"0.5763695",
"0.57571304",
"0.57571304",
"0.5749463",
"0.57482225",
"0.57354486",
"0.5732391",
"0.57308424",
"0.5727282",
"0.572008",
"0.5719588",
"0.5708333",
"0.5700037",
"0.5699264",
"0.5689184",
"0.56887764",
"0.5681105",
"0.5678337",
"0.56755376",
"0.567426",
"0.567133",
"0.5659615",
"0.5655187",
"0.564902",
"0.56446314",
"0.5643171",
"0.56331295",
"0.5630582",
"0.5629277",
"0.5628782",
"0.5621413",
"0.5616543",
"0.5611992",
"0.5608978",
"0.56060326",
"0.5602291",
"0.56022066",
"0.55998915",
"0.55989546",
"0.55970466",
"0.55937093"
] | 0.57161516 | 70 |
/ACTIVATING MULTIPLE ADMIN /DECLINING MULTIPLE ADMIN | public function declineMultiple(){
if(isset($_SESSION['admin_email'])){
$this->model("AdminApproveModel");
if(isset($_POST['admin_decline_all'])){
$approve_all = $this->sanitizeString($_POST['admin_decline_all']);
$id = $this->sanitizeString($_POST['id']);
$check_all = $this->sanitizeString($_POST['admin_check_all']);
if(!empty($check_all)){
AdminApproveModel::where('id', $id)->delete();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function action_adminAccount()\n\t{\n\t\tglobal $txt, $db_type, $db_connection, $databases, $incontext, $db_prefix, $db_passwd, $webmaster_email;\n\t\tglobal $db_persist, $db_server, $db_user, $db_port;\n\t\tglobal $db_type, $db_name, $mysql_set_mode;\n\n\t\t$incontext['sub_template'] = 'admin_account';\n\t\t$incontext['page_title'] = $txt['user_settings'];\n\t\t$incontext['continue'] = 1;\n\n\t\t// Need this to check whether we need the database password.\n\t\trequire(TMP_BOARDDIR . '/Settings.php');\n\t\tif (!defined('ELK'))\n\t\t{\n\t\t\tdefine('ELK', 1);\n\t\t}\n\t\tdefinePaths();\n\n\t\t// These files may be or may not be already included, better safe than sorry for now\n\t\trequire_once(SOURCEDIR . '/Subs.php');\n\n\t\t$db = load_database();\n\n\t\tif (!isset($_POST['username']))\n\t\t{\n\t\t\t$_POST['username'] = '';\n\t\t}\n\n\t\tif (!isset($_POST['email']))\n\t\t{\n\t\t\t$_POST['email'] = '';\n\t\t}\n\n\t\t$incontext['username'] = htmlspecialchars(stripslashes($_POST['username']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['email'] = htmlspecialchars(stripslashes($_POST['email']), ENT_COMPAT, 'UTF-8');\n\t\t$incontext['require_db_confirm'] = empty($db_type) || !empty($databases[$db_type]['require_db_confirm']);\n\n\t\t// Only allow create an admin account if they don't have one already.\n\t\t$db->skip_next_error();\n\t\t$request = $db->query('', '\n\t\t\tSELECT \n\t\t\t\tid_member\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_group = {int:admin_group} \n\t\t\t\tOR FIND_IN_SET({int:admin_group}, additional_groups) != 0\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'admin_group' => 1,\n\t\t\t)\n\t\t);\n\t\t// Skip the step if an admin already exists\n\t\tif ($request->num_rows() != 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t$request->free_result();\n\n\t\t// Trying to create an account?\n\t\tif (isset($_POST['password1']) && !empty($_POST['contbutt']))\n\t\t{\n\t\t\t// Wrong password?\n\t\t\tif ($incontext['require_db_confirm'] && $_POST['password3'] != $db_passwd)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_db_connect'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Not matching passwords?\n\t\t\tif ($_POST['password1'] != $_POST['password2'])\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_again_match'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No password?\n\t\t\tif (strlen($_POST['password1']) < 4)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_no_password'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!file_exists(SOURCEDIR . '/Subs.php'))\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_subs_missing'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Update the main contact email?\n\t\t\tif (!empty($_POST['email']) && (empty($webmaster_email) || $webmaster_email == '[email protected]'))\n\t\t\t{\n\t\t\t\tupdateSettingsFile(array('webmaster_email' => $_POST['email']));\n\t\t\t}\n\n\t\t\t// Work out whether we're going to have dodgy characters and remove them.\n\t\t\t$invalid_characters = preg_match('~[<>&\"\\'=\\\\\\]~', $_POST['username']) != 0;\n\t\t\t$_POST['username'] = preg_replace('~[<>&\"\\'=\\\\\\]~', '', $_POST['username']);\n\n\t\t\t$db->skip_next_error();\n\t\t\t$result = $db->query('', '\n\t\t\t\tSELECT \n\t\t\t\t\tid_member, password_salt\n\t\t\t\tFROM {db_prefix}members\n\t\t\t\tWHERE member_name = {string:username} \n\t\t\t\t\tOR email_address = {string:email}\n\t\t\t\tLIMIT 1',\n\t\t\t\tarray(\n\t\t\t\t\t'username' => stripslashes($_POST['username']),\n\t\t\t\t\t'email' => stripslashes($_POST['email']),\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($result->num_rows() != 0)\n\t\t\t{\n\t\t\t\tlist ($incontext['member_id'], $incontext['member_salt']) = $result->fetch_row();\n\t\t\t\t$result->free_result();\n\n\t\t\t\t$incontext['account_existed'] = $txt['error_user_settings_taken'];\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (trim($_POST['username']) === '' || strlen($_POST['username']) > 25)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $_POST['username'] == '' ? $txt['error_username_left_empty'] : $txt['error_username_too_long'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($invalid_characters || $_POST['username'] == '_' || $_POST['username'] == '|' || strpos($_POST['username'], '[code') !== false || strpos($_POST['username'], '[/code') !== false)\n\t\t\t{\n\t\t\t\t// Try the previous step again.\n\t\t\t\t$incontext['error'] = $txt['error_invalid_characters_username'];\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (empty($_POST['email']) || !filter_var(stripslashes($_POST['email']), FILTER_VALIDATE_EMAIL) || strlen(stripslashes($_POST['email'])) > 255)\n\t\t\t{\n\t\t\t\t// One step back, this time fill out a proper email address.\n\t\t\t\t$incontext['error'] = sprintf($txt['error_valid_email_needed'], $_POST['username']);\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// All clear, lets add an admin\n\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\n\t\t\t$incontext['member_salt'] = substr(base64_encode(sha1(mt_rand() . microtime(), true)), 0, 16);\n\n\t\t\t// Format the username properly.\n\t\t\t$_POST['username'] = preg_replace('~[\\t\\n\\r\\x0B\\0\\xA0]+~', ' ', $_POST['username']);\n\t\t\t$ip = isset($_SERVER['REMOTE_ADDR']) ? substr($_SERVER['REMOTE_ADDR'], 0, 255) : '';\n\n\t\t\t// Get a security hash for this combination\n\t\t\t$password = stripslashes($_POST['password1']);\n\t\t\t$incontext['passwd'] = validateLoginPassword($password, '', $_POST['username'], true);\n\n\t\t\t$request = $db->insert('',\n\t\t\t\t$db_prefix . 'members',\n\t\t\t\tarray(\n\t\t\t\t\t'member_name' => 'string-25', 'real_name' => 'string-25', 'passwd' => 'string', 'email_address' => 'string',\n\t\t\t\t\t'id_group' => 'int', 'posts' => 'int', 'date_registered' => 'int', 'hide_email' => 'int',\n\t\t\t\t\t'password_salt' => 'string', 'lngfile' => 'string', 'avatar' => 'string',\n\t\t\t\t\t'member_ip' => 'string', 'member_ip2' => 'string', 'buddy_list' => 'string', 'pm_ignore_list' => 'string',\n\t\t\t\t\t'message_labels' => 'string', 'website_title' => 'string', 'website_url' => 'string',\n\t\t\t\t\t'signature' => 'string', 'usertitle' => 'string', 'secret_question' => 'string',\n\t\t\t\t\t'additional_groups' => 'string', 'ignore_boards' => 'string',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tstripslashes($_POST['username']), stripslashes($_POST['username']), $incontext['passwd'], stripslashes($_POST['email']),\n\t\t\t\t\t1, 0, time(), 0,\n\t\t\t\t\t$incontext['member_salt'], '', '',\n\t\t\t\t\t$ip, $ip, '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '', '',\n\t\t\t\t\t'', '',\n\t\t\t\t),\n\t\t\t\tarray('id_member')\n\t\t\t);\n\n\t\t\t// Awww, crud!\n\t\t\tif ($request->hasResults() === false)\n\t\t\t{\n\t\t\t\t$incontext['error'] = $txt['error_user_settings_query'] . '<br />\n\t\t\t\t<div style=\"margin: 2ex;\">' . nl2br(htmlspecialchars($db->last_error($db_connection), ENT_COMPAT, 'UTF-8')) . '</div>';\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$incontext['member_id'] = $db->insert_id(\"{$db_prefix}members\", 'id_member');\n\n\t\t\t// If we're here we're good.\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function administrator(){\n\t\t$this->verify();\n\t\t$data['title']=\"Administrator\";\n\t\t$data['admin_list']=$this->admin_model->fetch_admin();\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('administrator/administrator', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}",
"public static function activate()\n {\n $role = get_role('administrator');\n if (!empty($role)) {\n $role->add_cap('my_plugin_manage');\n }\n }",
"public function administration()\n {\n\n if (!empty($_SESSION) && $_SESSION['login'] == 'admin') {\n\n if (isset($_GET['deconnexion'])) {\n\n session_destroy();\n header('Location: .');\n exit();\n } elseif (isset($_GET['Appli'])) {\n $this->ctrlAdminAppli->adminappli();\n } elseif (isset($_GET['Data'])) {\n\n $this->ctrlAdminData->admindata();\n } else {\n\n $this->ctrlAdminmenu->adminmenu();\n }\n } else {\n $this->ctrlConnexion->connexion();\n }\n }",
"protected function ensureAdminRoleIfRequested() {}",
"private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }",
"public function adminPermisionListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t $_SESSION['pid']\t=\t$_GET['id'];\n\t\t\t\t \n\t\t\t}",
"public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }",
"function editAdminsManagement($id_users, $pseudo, $lastname, $firstname, $email, $roleusers){\n $managementAdminsEdition = new \\Project\\Models\\ManagementAdminManager();\n $managementEditionAdmins = $managementAdminsEdition->adminsManagementEdition($id_users, $pseudo, $lastname, $firstname, $email, $roleusers);\n\n header(\"Location: administration.php?action=managementAdmin&id=$id_users\");\n \n \n }",
"private function grantAdminAccess()\n {\n if ($this->checkColumn(\"shopgate\", TABLE_ADMIN_ACCESS)) {\n // Create column shopgate in admin_access...\n xtc_db_query(\n \"alter table \" . TABLE_ADMIN_ACCESS\n . \" ADD shopgate INT( 1 ) NOT NULL\"\n );\n\n // ... grant access to to shopgate for main administrator\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate=1 where customers_id=1 LIMIT 1\"\n );\n\n if (!empty($_SESSION['customer_id'])\n && $_SESSION['customer_id'] != 1\n ) {\n // grant access also to current user\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 1 where customers_id='\"\n . $_SESSION['customer_id']\n . \"' LIMIT 1\"\n );\n }\n\n xtc_db_query(\n \"update \" . TABLE_ADMIN_ACCESS\n . \" SET shopgate = 5 where customers_id = 'groups'\"\n );\n }\n }",
"public function relatorio4(){\n $this->isAdmin();\n }",
"public function set_admin_caps(){\n\t\t\t\n\t\t\t$caps = $this->set_caps( $this->cpt_args );\n\t\t\t\n\t\t\t$admin = get_role( 'administrator' );\n\n\t\t\tforeach( $caps as $cap ){\n\t\t\t\tif( !$admin->has_cap( $cap ) )\n\t\t\t\t\t$admin->add_cap( $cap );\n\t\t\t}\n\t\t}",
"public function executeIndex()\n {\n sfConfig::set('config_menu','active');\n if (!$this->getUser()->hasAttribute('page', 'tv_admin/role'))\n $this->getUser()->setAttribute('page', 1, 'tv_admin/role');\n }",
"function activate ()\n\t{\n\t\tswitch ($this->getAction ())\n\t\t{\n\t\t\tcase 'modifyUser':\n\t\t\t\tif ($this->getUserName () == 'test')\n\t\t\t\t{\n\t\t\t\t\tdie ('not allowed for test user');\n\t\t\t\t}\n\t\t\t\t$checkPasswd = true;\n\t\t\t\t$user = $this->itemFactory->requestToUser ($checkPasswd);\n\t\t\t\t$this->operations->modifyUser ($this->getUserName(), $user);\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tHeader (\"Location: index.php\");\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function clickLaunchAdmin()\n {\n $this->_rootElement->find($this->launchAdmin, Locator::SELECTOR_XPATH)->click();\n }",
"public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Menu.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Menu::showMenu($error);\n return;\n }\n // see if we need to do anything to the db\n if(isset($_REQUEST['newadmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->department_id = $_REQUEST['department_id'];\n $admin->username = $_REQUEST['username'];\n $admin->save();\n }else if (isset($_REQUEST['deladmin'])) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $admin = new Sysinventory_Admin;\n $admin->id = $_REQUEST['id'];\n $admin->delete();\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"public function checkAdmin();",
"public function setupAdmin() {\n\t\t$answer = strtoupper($this->in('Would you like to [c]reate a new user, or use an [e]xisting user?', array('C', 'E')));\n\n\t\t// New User\n\t\tif ($answer === 'C') {\n\t\t\t$this->install['username'] = $this->_newUser('username');\n\t\t\t$this->install['password'] = $this->_newUser('password');\n\t\t\t$this->install['email'] = $this->_newUser('email');\n\n\t\t\t$result = $this->db->execute(sprintf(\"INSERT INTO `%s` (`%s`, `%s`, `%s`, `%s`) VALUES (%s, %s, %s, %s);\",\n\t\t\t\t$this->install['table'],\n\t\t\t\t$this->config['userMap']['username'],\n\t\t\t\t$this->config['userMap']['password'],\n\t\t\t\t$this->config['userMap']['email'],\n\t\t\t\t$this->config['userMap']['status'],\n\t\t\t\t$this->db->value(Sanitize::clean($this->install['username'])),\n\t\t\t\t$this->db->value(Security::hash($this->install['password'], null, true)),\n\t\t\t\t$this->db->value($this->install['email']),\n\t\t\t\t$this->db->value($this->config['statusMap']['active'])\n\t\t\t));\n\n\t\t\tif ($result) {\n\t\t\t\t$this->install['user_id'] = $this->db->lastInsertId();\n\t\t\t} else {\n\t\t\t\t$this->out('An error has occured while creating the user.');\n\n\t\t\t\treturn $this->setupAdmin();\n\t\t\t}\n\n\t\t// Old User\n\t\t} else if ($answer === 'E') {\n\t\t\t$this->install['user_id'] = $this->_oldUser();\n\n\t\t// Redo\n\t\t} else {\n\t\t\treturn $this->setupAdmin();\n\t\t}\n\n\t\t$result = $this->db->execute(sprintf(\"INSERT INTO `%saccess` (`access_level_id`, `user_id`, `created`) VALUES (4, %d, NOW());\",\n\t\t\t$this->install['prefix'],\n\t\t\t$this->install['user_id']\n\t\t));\n\n\t\tif (!$result) {\n\t\t\t$this->out('An error occured while granting administrator access.');\n\n\t\t\treturn $this->setupAdmin();\n\t\t}\n\n\t\treturn true;\n\t}",
"function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}",
"public function procMenuAdminUpdateAuth()\n\t{\n\t\t$menuItemSrl = Context::get('menu_item_srl');\n\t\t$exposure = Context::get('exposure');\n\t\t$htPerm = Context::get('htPerm');\n\n\t\t$oMenuModel = getAdminModel('menu');\n\t\t$itemInfo = $oMenuModel->getMenuItemInfo($menuItemSrl);\n\t\t$args = $itemInfo;\n\n\t\t// Menu Exposure update\n\t\t// if exposure target is only login user...\n\t\tif(!$exposure)\n\t\t{\n\t\t\t$args->group_srls = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$exposure = explode(',', $exposure);\n\t\t\tif(in_array($exposure, array('-1','-3')))\n\t\t\t{\n\t\t\t\t$args->group_srls = $exposure;\n\t\t\t}\n\n\t\t\tif($exposure) $args->group_srls = implode(',', $exposure);\n\t\t}\n\n\t\t$output = executeQuery('menu.updateMenuItem', $args);\n\t\tif(!$output->toBool())\n\t\t{\n\t\t\treturn $output;\n\t\t}\n\n\t\t// Module Access update\n\t\tunset($args);\n\t\t$oMenuAdminModel = getAdminModel('menu');\n\t\t$menuInfo = $oMenuAdminModel->getMenu($itemInfo->menu_srl);\n\n\t\t$oModuleModel = getModel('module');\n\t\t$moduleInfo = $oModuleModel->getModuleInfoByMid($itemInfo->url, $menuInfo->site_srl);\n\n\t\t$xml_info = $oModuleModel->getModuleActionXML($moduleInfo->module);\n\n\t\t$grantList = $xml_info->grant;\n\t\tif(!$grantList) $grantList = new stdClass;\n\n\t\t$grantList->access = new stdClass();\n\t\t$grantList->access->default = 'guest';\n\t\t$grantList->manager = new stdClass();\n\t\t$grantList->manager->default = 'manager';\n\n\t\t$grant = new stdClass;\n\t\tforeach($grantList AS $grantName=>$grantInfo)\n\t\t{\n\t\t\tif(!$htPerm[$grantName])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$htPerm[$grantName] = explode(',', $htPerm[$grantName]);\n\n\t\t\t// users in a particular group\n\t\t\tif(is_array($htPerm[$grantName]))\n\t\t\t{\n\t\t\t\t$grant->{$grantName} = $htPerm[$grantName];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// -1 = Log-in user only, -2 = site members only, 0 = all users\n\t\t\telse\n\t\t\t{\n\t\t\t\t$grant->{$grantName}[] = $htPerm[$grantName];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$grant->{$group_srls} = array();\n\t\t}\n\n\t\tif(count($grant))\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->insertModuleGrants($moduleInfo->module_srl, $grant);\n\t\t}\n\n\t\t// recreate menu cache file\n\t\t$this->makeXmlFile($itemInfo->menu_srl);\n\t}",
"function mod_core_admin() {\n\t\tglobal $NeptuneCore;\n\t\tglobal $NeptuneSQL;\n\t\tglobal $NeptuneAdmin;\n\t\t\n\t\tif (!isset($NeptuneCore)) {\n\t\t\t$NeptuneCore = new NeptuneCore();\n\t\t}\t\n\t\tif (!isset($NeptuneSQL)) {\n\t\t\t$NeptuneSQL = new NeptuneSQL();\n\t\t}\t\n\t\tif (!isset($NeptuneAdmin)) {\n\t\t\t$NeptuneAdmin = new NeptuneAdmin();\n\t\t}\t\n\t\t\n\t\t\n\t\tif (neptune_get_permissions() >= 3) {\n\t\t\t$query = $NeptuneCore->var_get(\"system\",\"query\");\n\t\t\tif (@isset($query[1]) && @isset($query[2])) {\n\t\t\t\t$AdminFunction = \"acp_\" . $query[1] . \"_\" . $query[2];\n\t\t\t\t\n\t\t\t\t$AdminFunction();\n\t\t\t} else {\n\t\t\t\t$NeptuneAdmin->run();\n\t\t\t}\n\t\t} else {\n\t\t\t$NeptuneCore->title($NeptuneCore->var_get(\"locale\",\"accessdenied\"));\n\t\t\t$NeptuneCore->neptune_echo(\"<p>\" . $NeptuneCore->var_get(\"locale\",\"nopermission\") . \"</p>\");\n\t\t\t\n\t\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\t}\n\t}",
"public function admin() {\n // Check the arguments\n $args = func_get_args();\n\n if (count($args) == 1) {\n if ($this->isPHPScript($args[0])) {\n $this->_adminPanel = array('script' => $args[0]);\n } else {\n $this->_adminPanel = $args[0];\n }\n } elseif (count($args) == 2) {\n // @TODO\n }\n // Implemented by extended classes\n }",
"public function makeAdministrator()\n {\n $this->setRole('administrator');\n }",
"public function actionAdmin()\n {\n $query = \"SELECT * FROM vartotojai WHERE klase = :klase\";\n $vartotojai = Yii::$app->db_prod->createCommand($query, [':klase' => self::KLASE_ADMINISTRATORIUS])->queryAll();\n foreach ($vartotojai as $vartotojas) {\n if ($this->adminExists($vartotojas['id'])) {\n continue;\n }\n\n $admin = new Admin([\n 'scenario' => Admin::SCENARIO_SYSTEM_MIGRATES_ADMIN_DATA,\n 'id' => $vartotojas['id'],\n 'name' => $vartotojas['vardas'],\n 'surname' => $vartotojas['pavarde'],\n 'email' => $vartotojas['elpastas'],\n 'phone' => $vartotojas['telefonai'],\n 'password_reset_token' => Admin::DEFAULT_PASSWORD_RESET_TOKEN,\n 'admin' => Admin::IS_ADMIN,\n 'archived' => $this->convertArchiveStatus($vartotojas['archive_status']),\n 'created_at' => strtotime($vartotojas['data']),\n 'updated_at' => strtotime($vartotojas['data']),\n ]);\n\n $admin->generateAuthKey();\n\n if ($this->hadOldPassword($vartotojas['raw_password'])) {\n $admin->setPassword($vartotojas['raw_password']);\n } else {\n $admin->setPassword(self::DEFAULT_PASSWORD);\n }\n\n $this->fixValidationErrors($admin);\n $admin->validate();\n if ($admin->errors) {\n $this->writeToCSV(Admin::tableName(), $admin->errors, $admin->id);\n continue;\n }\n\n $admin->detachBehaviors(); // Remove timestamp behaviour\n $admin->save(false);\n }\n }",
"public function indexAction() {\n if (in_array(0, $this->_rolesUser) || in_array(1, $this->_rolesUser)) $this->_redirect(\"/admintool/index/go\");\n \n // traductores\n if (in_array(2, $this->_rolesUser)) $this->_redirect(\"/admintool/index/translate\"); \n }",
"public function SystemAdministratorAction()\n {\n $this->requireRoleOrRedirect('SystemAdministrator');\n $this->view->setLayout('application');\n $this->view->userProfile = (new \\Apprecie\\Library\\Security\\Authentication())->getAuthenticatedUser(\n )->getUserProfile();\n }",
"public function run()\n {\n $admin = $this->admin;\n\n // 1\n $admin['name'] = 'Super Admin';\n $admin['email'] = 'super-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('super-admin');\n\n // 2\n $admin['name'] = 'Helix Admin';\n $admin['email'] = 'helix-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('helix-admin');\n DB::table(self::TABLE2)->insert([\n 'user_id' => $user->id,\n 'company_id' => 1,\n ]);\n\n // 3\n $admin['name'] = 'Tenant Admin';\n $admin['email'] = 'tenant-1-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make('12345678');\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-admin');\n DB::table(self::TABLE2)->insert([\n 'user_id' => $user->id,\n 'company_id' => 2,\n ]);\n\n // 4\n $admin['name'] = 'Tenant-2 Admin';\n $admin['email'] = 'tenant-2-admin' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-admin');\n DB::table(self::TABLE2)->insert([\n 'user_id' => $user->id,\n 'company_id' => 3,\n ]);\n\n // 5\n $admin['name'] = 'Tenant-1 Dep-2 Child-1 User-1';\n $admin['email'] = 'tenant-1-dep-2-child-1-user-1' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-user');\n DB::table(self::TABLE3)->insert([\n 'user_id' => $user->id,\n 'department_id' => 2,\n ]);\n\n // 6\n $admin['name'] = 'Tenant-1 Dep-4 User-1';\n $admin['email'] = 'tenant-1-dep-4-user-1' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-user');\n DB::table(self::TABLE3)->insert([\n 'user_id' => $user->id,\n 'department_id' => 4,\n ]);\n\n // 7\n $admin['name'] = 'Tenant-2 Root-Dep-1 User-1';\n $admin['email'] = 'tenant-2-root-dep-1-user-1' . self::EMAIL_SUFFIX;\n $admin['password'] = Hash::make(self::PASSWORD);\n $user = new User();\n $user->fill($admin)->save();\n $user->assignRole('tenant-user');\n DB::table(self::TABLE3)->insert([\n 'user_id' => $user->id,\n 'department_id' => 3,\n ]);\n }",
"function xanthia_admin_main()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t* potential security holes or just too much wasted processing. For the\n\t* main function we want to check that the user has at least edit privilege\n\t* for some item within this component, or else they won't be able to do\n\t* anything and so we refuse access altogether. The lowest level of access\n\t* for administration depends on the particular module, but it is generally\n\t* either 'edit' or 'delete'\n\t*/\n if (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n // Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\t \n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n // Return the Admin View Function\n\t//return xanthia_adminmenu();\n\treturn xanthia_admin_view();\n}",
"function editAdminsManagementMdp($id_users, $pass){\n $managementAdminsEditionMdp = new \\Project\\Models\\ManagementAdminManager();\n $managementEditionAdminsMdp = $managementAdminsEditionMdp->adminsManagementEditionMdp($id_users, $pass);\n\n header(\"Location: administration.php?action=managementAdmin&id=$id_users\");\n }",
"function procMenuAdminAllActList()\n\t{\n\t\t$oModuleModel = getModel('module');\n\t\t$installed_module_list = $oModuleModel->getModulesXmlInfo();\n\t\tif(is_array($installed_module_list))\n\t\t{\n\t\t\t$currentLang = Context::getLangType();\n\t\t\t$menuList = array();\n\t\t\tforeach($installed_module_list AS $key=>$value)\n\t\t\t{\n\t\t\t\t$info = $oModuleModel->getModuleActionXml($value->module);\n\t\t\t\tif($info->menu) $menuList[$value->module] = $info->menu;\n\t\t\t\tunset($info->menu);\n\t\t\t}\n\t\t}\n\t\t$this->add('menuList', $menuList);\n\t}",
"function enableAdministrator($id) {\r\n\r\n\t\t$this->query('UPDATE admins SET `enabled` = 1 WHERE id= '. $id .';');\r\n\r\n\t}",
"protected function _setupPrivileges()\n {\n $this->_acl\t->allow( 'guest', 'index', 'index' )\n ->allow( 'guest', 'auth' , array('index', 'login', 'logout') )\n ->allow( 'guest', 'register', 'index');\n\n $this->_acl\t->allow( 'user', 'index', 'index' )\n ->allow( 'user', 'auth' , array('index', 'login', 'logout') )\n ->allow( 'user', 'register', 'index')\n ->allow( 'user', 'dashboard', 'index');\n }",
"public function run()\n {\n\n \t$adminSys = config('constant.role.ADMIN_SYS');\n \t$admin = config('constant.role.ADMIN');\n $vendor = config('constant.role.VENDOR');\n $customer = config('constant.role.CUSTOMER');\n\n \t$all = [$adminSys,$admin,$vendor,$customer];\n\n \t$adminSysAndAdmin = [$adminSys,$admin];\n\n\n $permissions = array(\n //*******************************************************************************//\n //********************************* Users ***************************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_users_profile_edit',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n [\n 'name' => 'admin_users_profile_update',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n\n [\n 'name' => 'admin_users_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_update',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_users_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_users_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_users_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_users_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_users_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n //**********************************************************************************//\n //********************************* fin de users **********************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Images **************************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_images_storage_show',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n [\n 'name' => 'admin_images_fit_show',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n [\n 'name' => 'admin_images_resize_show',\n 'guard_name'=>'web',\n 'roles'=>$all\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Images *********************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Businesses **********************************//\n //*******************************************************************************//\n\n\n [\n 'name' => 'admin_businesses_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_update',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_businesses_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'businesses_admin_businesses_profile_create_edit',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer],\n ],\n\n [\n 'name' => 'businesses_admin_businesses_profile_store_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer],\n ],\n\n [\n 'name' => 'api_admin_businesses_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_profile_store_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_businesses_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_businesses_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'api_admin_businesses_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'api_admin_businesses_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n //**********************************************************************************//\n //********************************* Fin de Businesses *****************************//\n //**********************************************************************************//\n\n\n //*******************************************************************************//\n //********************************* Products ************************************//\n //*******************************************************************************//\n\n\n [\n 'name' => 'admin_products_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_products_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n [\n 'name' => 'admin_products_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'businesses_admin_products_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'businesses_admin_products_create',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'businesses_admin_products_edit',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_store',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_show',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n [\n 'name' => 'admin_products_update',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_destroy',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n [\n 'name' => 'api_admin_products_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>[$admin,$adminSys,$vendor],\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Products *******************************//\n //**********************************************************************************//\n\n\n //*******************************************************************************//\n //********************************* Categories **********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_categories_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_create',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_store',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_edit',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_update',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'admin_categories_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_products_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_categories_products',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_categories_businesses',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n [\n 'name' => 'api_admin_categories_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_categories_destroy',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n [\n 'name' => 'api_admin_categories_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>$adminSysAndAdmin\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Categories *****************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Images **************************************//\n //*******************************************************************************//\n [\n 'name' => 'api_admin_images_store_editor_public',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_images_destroy',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Images *********************************//\n //**********************************************************************************//\n\n\n //*******************************************************************************//\n //********************************* Shippings ***********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'admin_shipping_form_list_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_shipping_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_shipping_store',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_shipping_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_shipping_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_shipping_destroy',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_shipping_destroy_by_ids',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Shippings ******************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Departments *********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'api_admin_departments_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Departments ****************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Provinces ***********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'api_admin_provinces_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Provinces ******************************//\n //**********************************************************************************//\n\n //*******************************************************************************//\n //********************************* Districts ***********************************//\n //*******************************************************************************//\n\n [\n 'name' => 'api_admin_districts_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Districts ******************************//\n //**********************************************************************************//\n\n //*********************************************************************************//\n //********************************* Price ranges **********************************//\n //*********************************************************************************//\n\n [\n 'name' => 'api_admin_price_ranges_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Price ranges ***************************//\n //**********************************************************************************//\n\n //*********************************************************************************//\n //********************************* Provider Types ********************************//\n //*********************************************************************************//\n\n [\n 'name' => 'api_admin_provider_types_ranges_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Provider Types *************************//\n //**********************************************************************************//\n\n\n //*********************************************************************************//\n //********************************* Business Payment Method ***********************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_business_payment_method_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'api_admin_business_payment_method_businesses_mercado_pago',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_business_payment_method_businesses_wire_transfer',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_business_payment_method_businesses_wire_transfer_store_update',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'businesses_admin_business_payment_method_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n [\n 'name' => 'api_admin_business_payment_method_businesses_wire_transfer_store',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Business Payment Method ****************//\n //**********************************************************************************//\n\n //*********************************************************************************//\n //********************************* Orders ****************************************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_orders_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'admin_orders_menu_auth_user_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'admin_orders_auth_user_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'businesses_admin_orders_auth_user_business_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_orders_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'admin_orders_auth_user_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'businesses_admin_orders_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_orders_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n [\n 'name' => 'api_admin_orders_business_auth_user_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor]\n ],\n [\n 'name' => 'api_admin_orders_auth_user_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_orders_change_to_paid_out',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_orders_change_to_delivered',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n [\n 'name' => 'api_admin_orders_change_to_cancelled',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin,$vendor,$customer]\n ],\n\n\n //**********************************************************************************//\n //********************************* Fin de Orders ********************************//\n //**********************************************************************************//\n\n\n //*********************************************************************************//\n //********************************* Claims ****************************************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_claims_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'admin_claims_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'api_admin_claims_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Claims *********************************//\n //**********************************************************************************//\n\n\n //*********************************************************************************//\n //********************************* Contacts **************************************//\n //*********************************************************************************//\n\n [\n 'name' => 'admin_contacts_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'admin_contacts_show',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n [\n 'name' => 'api_admin_contacts_list_table_index',\n 'guard_name'=>'web',\n 'roles'=>[$adminSys,$admin]\n ],\n\n //**********************************************************************************//\n //********************************* Fin de Contacts *******************************//\n //**********************************************************************************//\n\n// //*********************************************************************************//\n// //********************************* Orders Group **********************************//\n// //*********************************************************************************//\n//\n// [\n// 'name' => 'admin_order_groups_auth_user_index',\n// 'guard_name'=>'web',\n// 'roles'=>[$adminSys,$admin,$vendor,$customer]\n// ],\n//\n// //**********************************************************************************//\n// //****************************** Fin de Orders Group *****************************//\n// //**********************************************************************************//\n\n );\n\n \t$this->createRolesPermissions($permissions);\n }",
"public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }",
"public function actionIndex()\n {\n $authManager = \\Yii::$app->authManager;\n $adminRole = $authManager->createRole(\"admin\");\n $authManager->add($adminRole);\n $adminUser = new AccountUser();\n $adminUser->username = \"admin\";\n $adminUser->password = \"pf3Zt49nsgoPFbr\";\n $adminUser->authKey= uniqid();\n $adminUser->accessToken = uniqid();\n if ($adminUser->save()) {\n $authManager->assign($adminRole, $adminUser->id);\n /*assign the role */\n }\n }",
"protected function requiresAdmin() {\n if (!$this->evaluateACLS(self::ACL_ADMIN)) {\n $this->unauthorizedAccess();\n }\n }",
"protected function executeAdminCommand() {}",
"protected function executeAdminCommand() {}",
"protected function executeAdminCommand() {}",
"public function ensureAdministratorAccess() {\r\n /** @var modUserGroup $adminGroup */\r\n $adminGroup = $this->modx->getObject('modUserGroup',array('name' => 'Administrator'));\r\n /** @var modAccessPolicy $adminContextPolicy */\r\n $adminContextPolicy = $this->modx->getObject('modAccessPolicy',array('name' => 'Context'));\r\n if ($adminGroup) {\r\n if ($adminContextPolicy) {\r\n /** @var modAccessContext $adminAdminAccess */\r\n $adminAdminAccess = $this->modx->newObject('modAccessContext');\r\n $adminAdminAccess->set('principal',$adminGroup->get('id'));\r\n $adminAdminAccess->set('principal_class','modUserGroup');\r\n $adminAdminAccess->set('target',$this->object->get('key'));\r\n $adminAdminAccess->set('policy',$adminContextPolicy->get('id'));\r\n $adminAdminAccess->save();\r\n }\r\n }\r\n }",
"private function setAdmins($ids,$log=false){\n \t$adminPermission = $this->getAdminPermission();\n \tforeach ($ids as $id)\n \t\tNewDao::getInstance()->insert('user_permissions',array('user_id'=>$id,'permission_id'=>$adminPermission),$log);\n }",
"function allow_admin_privileges() {\n\tif($_SESSION['role']!=='administrator'):\n\t\theader('Location: ?q=start');\n\tendif;\n}",
"function adminUsers()\n {\n $userLogged = Auth::check(['administrateur']);\n \n $userManager = new UserManager();\n $listUsers = $userManager->getListUsers();\n require'../app/Views/backViews/user/backAdminUsersView.php';\n }",
"private function btn_admin(){\n\n // no admin buttons for some lists\n if (VM::outOfScope() \n\t|| !$this->isWritable() \n\t|| in_array($this->doing,array('show_mails_exchange',))) return array();\n \n bTiming()->cpu(__function__);\n locateAndInclude('bForm_vm_Expenses'); \n \n $notTooLate = (False\n\t\t ? (!VM::isEventEndorsed() || ($this->rec['e_end'] >= time()) || \n\t\t (VM::isEventEndorsed() && bForm_vm_Visit::_getStatus($this->rec) == STATUS_PENDING))\n\t\t : !VM_tooLateForAccommodation($this->rec));\n \n $exp_arePaid= (bForm_vm_Expenses::_exp_arePaid($this->rec)\n\t\t ? bIcons()->get(array('d'=>'Paid up',\n\t\t\t\t\t 'c'=>'only_online',\n\t\t\t\t\t 'i'=>'i-bundle'))\n\t\t : '');\n \n $edit_visit = ($notTooLate\n\t\t ? bIcons()->getButton(array('d'=>'see/update the visit information',\n\t\t\t\t\t\t'c'=>'only_online',\n\t\t\t\t\t\t'i'=>'i-edit',\n\t\t\t\t\t\t'l'=>b_url::same(\"?form=vm_Visit&id=\".$this->rec['v_id'])))\n\t\t : '');\n \n $delete_v = ($notTooLate\n\t\t ? ((!bForm_vm_Visit::_isVisitType_program($this->rec) && \n\t\t\tVM::hasRightTo('book') && \n\t\t\tbForm_vm_Visit::_getStatus($this->rec)==STATUS_NO)\n\t\t ? b_btn::submit_icon('i-drop',\n\t\t\t\t\t txt_deleteVisit,\n\t\t\t\t\t b_url::same(\"?function=vm_cancel_visit&v_id=\".$this->rec['v_id']),\n\t\t\t\t\t $confirm=True)\n\t\t : '')\n\t\t : '');\n \n $reply = array($edit_visit,$delete_v,$exp_arePaid);\n if ($this->doing == 'budget_byProjects'){\n if (empty($this->rec['v_projectid'])) $reply[] = b_btn::submit_icon('i-wallet',\n\t\t\t\t\t\t\t\t\t 'set project number',\n\t\t\t\t\t\t\t\t\t b_url::same(\"?action_once=\".VM_visit_project.\"&form=vm_Visit&id=\".$this->rec['v_id']));\n }\n bTiming()->cpu();\n return $reply;\n }",
"private function checkAdmin()\n {\n $admin = false;\n if (isset($_SESSION['admin'])) {\n F::set('admin', 1);\n $admin = true;\n }\n F::view()->assign(array('admin' => $admin));\n }",
"public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }",
"public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }",
"public static function activate() {\n $random = substr(str_shuffle(MD5(microtime())), 0, 16);\n\n add_option('haa_admin_area', 'hidden-admin');\n add_option('haa_secret_key', $random);\n }",
"public function admin() {\r\n $Conductor = new Conductor($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allCon = $Conductor->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Conductor/admin\", array(\"allCon\" => $allCon));\r\n \r\n }",
"function psswrdhsh_activate()\n{\n\tglobal $lang, $mybb;\n\n\tif (psswrdhsh_core_edits('activate') === false) {\n\t\tpsswrdhsh_uninstall();\n\n\t\tflash_message($lang->error_pwh_activate, 'error');\n\t\tadmin_redirect('index.php?module=config-plugins');\n\t}\n\t\n\t// assume core edits succeeded\n\t\n\tif ($mybb->settings['regtype'] == \"randompass\") {\n\t\t\n\t\t// Sending the user a random password, which thus becomes _their_ password\n\t\t// for at least some amount of time, in plain text across media that may or\n\t\t// may not be secure and/or confidential is just an absolutely braindamaged\n\t\t// idea that should never, ever be used on a modern site. </endrant>\n\n\t\t$decent_regtype_optionscode = \"select\ninstant=Instant Activation\nverify=Send Email Verification\nadmin=Administrator Activation\nboth=Email Verification & Administrator Activation\";\n\t\t\n\t\t\n\t\t$db->update_query(\"settings\", [\"value\" => \"verify\"], \"name = 'regtype'\");\n\t\t$db->update_query(\"settings\", [\"optionscode\" => $decent_regtype_optionscode], \"name = 'regtype'\");\n\t\trebuild_settings();\n\t}\n\t\n\tif (!$mybb->settings[\"requirecomplexpasswords\"]) {\n\t\t$db->update_query(\"settings\", [\"value\" => 1], \"name = 'requirecomplexpasswords'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// Since we're requiring complex passwords, the min length should already be\n\t// considered 8 in the core, so that part is alright. But let's remove the unnecessary\n\t// ceiling to the password length, since bcrypt will work with the first 72\n\t// characters of input and 72 bytes really isn't all that much data to send.\n\t\n\tif ($mybb->settings[\"maxpasswordlength\"] < 72) {\n\t\t$db->update_query(\"settings\", [\"value\" => 72], \"name = 'maxpasswordlength'\");\n\t\trebuild_settings();\n\t}\n\t\n\t// redirect back informing the admin of any settings we changed\n\tflash_message($lang->pwh_activate_regtype_changed, 'error');\n\tadmin_redirect('index.php?module=config-plugins');\n}",
"public function page_activate_users()\n\t{\n\t\t$id = intval(Http::request('id'));\n\t\tif ($id)\n\t\t{\n\t\t\t User::confirm_account($id);\n\t\t}\n\n\t\tHttp::redirect('index.' . PHPEXT);\n\t}",
"function opciones_admin(){\n\tif ($_SESSION[\"tipo_user\"] === \"admin\"){\n\t\t$href = [\"miembros\", \"biografia\", \"discografia\", \"conciertos\", \"usuarios\", \"backup\",\"restore\",\"borrarBD\", \"log\", \"logout\"];\n\t\t$name = [\"Editar miembros Grupo\", \"Editar biografía\", \"Editar discografía\", \"Editar conciertos\", \"Editar usuarios\", \"BackUp\",\"Restore\",\"Borrar BD\",\"Ver log del servidor\", \"Desconectarse\"];\n\t\techo '<div id=\"panel_control\" align=\"center\">';\n\t\t\techo '<div class=\"login\">';\n\t\t\t\techo \"<ul>\";\n\t\t\t\tforeach($href as $i => $val){\n\t\t\t\t\techo \"<li><a href='dashboard.php?accion=$val#panel_control'>{$name[$i]}</a></li>\";\n\t\t\t\t}\n\t\t\t\techo \"</ul>\";\n\t\t\techo \"</div>\";\n\t\techo \"</div>\";\n\t\t\n\t\tacciones();\n\t}\n}",
"public function emailAllAdministrators () {\n\t\t\t// Get the authentication model and admin role model\n\t\t\t$admin = Mage::getSingleton (\"admin/session\")->getUser ();\n\t\t\t$auth = Mage::getModel (\"twofactor/auth\");\n\t\t\t$auth->load ( $admin->getUserId () );\n\t\t\t$auth->setId ( $admin->getUserId () );\n\t\t\t$role = Mage::getModel (\"admin/role\");\n\t\t\t// Get the role ID for administrator role\n\t\t\t$roleId = $role;\n\t\t\t$roleId = $roleId->getCollection ();\n\t\t\t$roleId = $roleId->addFieldToFilter ( \"role_name\", array ( \"eq\" => \"Administrators\" ) );\n\t\t\t$roleId = $roleId->getFirstItem ();\n\t\t\t$roleId = $roleId->getId ();\n\t\t\t// Get the users that belong to the administrator role\n\t\t\t$roleUsers = $role;\n\t\t\t$roleUsers = $roleUsers->getCollection ();\n\t\t\t$roleUsers = $roleUsers->addFieldToFilter ( \"parent_id\", array ( \"eq\" => $roleId ) );\n\t\t\t// Loop through all the users belonging to the role\n\t\t\tforeach ( $roleUsers as $roleUser ) {\n\t\t\t\t// Load the data helper class and get user instance\n\t\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t\t$user = Mage::getModel (\"admin/user\")->load ( $roleUser->getUserId () );\n\t\t\t\t// Do not send email if user is inactive\n\t\t\t\tif ( !$user->getIsActive () ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Format timestamp date and time\n\t\t\t\t$timestamp = $auth->getLastTimestamp ();\n\t\t\t\t$timestampDate = \"-\";\n\t\t\t\t$timestampTime = \"-\";\n\t\t\t\tif ( $timestamp !== null ) {\n\t\t\t\t\t$timestampDate = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\t\"m/d/Y\", strtotime ( $timestamp )\n\t\t\t\t\t);\n\t\t\t\t\t$timestampTime = Mage::getModel (\"core/date\")->date (\n\t\t\t\t\t\t\"h:i:s A\", strtotime ( $timestamp )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Construct the user contact's full name\n\t\t\t\t$fullName = ucfirst ( $user->getFirstname () ) . \" \";\n\t\t\t\t$fullName .= ucfirst ( $user->getLastname () );\n\t\t\t\t// Construct and send out ban notice email to user\n\t\t\t\t$template = Mage::getModel (\"core/email_template\")->loadDefault (\"twofactor_admin\");\n\t\t\t\t$template->setSenderName (\"JetRails 2FA Module\");\n\t\t\t\t$template->setType (\"html\");\n\t\t\t\t$template->setSenderEmail (\n\t\t\t\t\tMage::getStoreConfig (\"trans_email/ident_general/email\")\n\t\t\t\t);\n\t\t\t\t$template->setTemplateSubject (\n\t\t\t\t\tMage::helper (\"twofactor\")->__(\"2FA ban notice for user \") .\n\t\t\t\t\t$admin->getUsername ()\n\t\t\t\t);\n\t\t\t\t$test = $template->send ( $user->getEmail (), $fullName,\n\t\t\t\t\tarray (\n\t\t\t\t\t\t\"base_admin_url\" => Mage::getUrl (\"adminhtml\"),\n\t\t\t\t\t\t\"base_url\" => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB ),\n\t\t\t\t\t\t\"ban_attempts\" => $data->getData () [\"ban_attempts\"],\n\t\t\t\t\t\t\"ban_time\" => $data->getData () [\"ban_time\"],\n\t\t\t\t\t\t\"last_address\" => $auth->getLastAddress (),\n\t\t\t\t\t\t\"last_timestamp_date\" => $timestampDate,\n\t\t\t\t\t\t\"last_timestamp_time\" => $timestampTime,\n\t\t\t\t\t\t\"username\" => $admin->getUsername (),\n\t\t\t\t\t\t\"year\" => date (\"Y\")\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"function gdlr_lms_add_user_role(){\r\n\t\tadd_role('instructor', __('Instructor', 'gdlr-lms'), \r\n\t\t\tarray('instructor'=>true, 'read'=>true, 'edit_users'=>true, 'edit_dashboard'=>true, 'upload_files'=>true,\r\n\t\t\t\t 'edit_course'=>true, 'edit_courses'=>true, 'edit_published_courses'=>true, 'publish_courses'=>true, 'delete_course'=>true, 'delete_courses'=>true, 'delete_published_courses'=>true,\r\n\t\t\t\t 'edit_quiz'=>true, 'edit_quizzes'=>true, 'edit_published_quizzes'=>true,'publish_quizzes'=>true, 'delete_quiz'=>true, 'delete_quizzes'=>true, 'delete_published_quizzes'=>true,\r\n\t\t\t\t 'course_taxes'=>true )\r\n\t\t);\r\n\t\tadd_role('student', __('Student', 'gdlr-lms'));\r\n\t\t\r\n\t\t$administrator = get_role('administrator');\r\n\t\t\r\n\t\t$administrator->add_cap('course_taxes');\r\n\t\t$administrator->add_cap('course_taxes_edit');\r\n\t\t$administrator->add_cap('edit_course');\r\n\t\t$administrator->add_cap('read_course');\r\n\t\t$administrator->add_cap('delete_course');\r\n\t\t$administrator->add_cap('edit_courses');\r\n\t\t$administrator->add_cap('edit_others_courses');\r\n\t\t$administrator->add_cap('publish_courses');\r\n\t\t$administrator->add_cap('read_private_courses');\r\n $administrator->add_cap('delete_courses');\r\n $administrator->add_cap('delete_private_courses');\r\n $administrator->add_cap('delete_published_courses');\r\n $administrator->add_cap('delete_others_courses');\r\n $administrator->add_cap('edit_private_courses');\r\n $administrator->add_cap('edit_published_courses');\t\r\n\r\n\t\t$administrator->add_cap('edit_quiz');\r\n\t\t$administrator->add_cap('read_quiz');\r\n\t\t$administrator->add_cap('delete_quiz');\r\n\t\t$administrator->add_cap('edit_quizzes');\r\n\t\t$administrator->add_cap('edit_others_quizzes');\r\n\t\t$administrator->add_cap('publish_quizzes');\r\n\t\t$administrator->add_cap('read_private_quizzes');\r\n $administrator->add_cap('delete_quizzes');\r\n $administrator->add_cap('delete_private_quizzes');\r\n $administrator->add_cap('delete_published_quizzes');\r\n $administrator->add_cap('delete_others_quizzes');\r\n $administrator->add_cap('edit_private_quizzes');\r\n $administrator->add_cap('edit_published_quizzes');\t\t\r\n\t\t\r\n\t\t// 1.01 capability fix\r\n\t\t$instructor = get_role('instructor');\r\n\t\t$instructor->add_cap('edit_published_courses');\r\n\t\t$instructor->add_cap('edit_published_quizzes');\r\n\t}",
"function addAdminsAsRecipients(){\n $sql = \"SELECT name FROM user WHERE is_admin = 1\";\n $db = new DB();\n $db->query( $sql );\n while( $row = $db->fetchRow()){\n $this->AddRecipient($row[\"name\"]);\n }\n }",
"public function adminOnly();",
"public function adminOnly();",
"static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }",
"public function manageAsAdmin()\n {\n try {\n $server = $this->server->currentOrFail();\n } catch (\\RuntimeException $exc) {\n $this->exitWithMessage($exc->getMessage());\n }\n\n $this->transferTo(\n $this->api->getAdminUrlFromApi(sprintf(\n 'hardware/server/%d',\n $server->id\n ))\n );\n }",
"public function getAdministrator() {}",
"protected function activateAdminMenu()\n {\n app()->singleton(\n 'AdminMenu',\n AdminMenu::class\n );\n }",
"public function run() {\n\n\t\tDB::beginTransaction();\n\n\t\t$superadmin = Role::where('name', '=', 'super_admin')->first();\n\t\t// $shrek = User::where('name','=','Job Boosts Admin')->first();\n\t\t//dd($shrek->hasRole('supper_admin'));\n\n\t\t// if (!$shrek->hasRole('super_admin'))\n\t\t// {\n\t\t// $shrek->attachRole( $superadmin->id );\n\t\t// }\n\n\t\t$this->command->info('Admin user seeded :-)');\n\n\t\t$module_name = ['Role', 'User', 'Cms', 'Faq', 'EmailTemplate', 'Setting', 'HomepageSlider', 'ContactUs', 'Coach', 'Staff'];\n\t\tforeach ($module_name as $item) {\n\t\t\tif ($item == 'EmailTemplate') {\n\t\t\t\t$permistion_list = ['Edit', 'List'];\n\t\t\t} else if ($item == 'Setting') {\n\t\t\t\t$permistion_list = ['Edit', 'List', 'Delete'];\n\t\t\t} else if ($item == 'ContactUs') {\n\t\t\t\t$permistion_list = ['List', 'Delete'];\n\t\t\t} else if ($item == 'Coach') {\n\t\t\t\t$permistion_list = ['Create', 'Edit', 'Delete', 'List', 'Manage'];\n\t\t\t} else {\n\t\t\t\t$permistion_list = ['Create', 'Edit', 'Delete', 'List'];\n\t\t\t}\n\t\t\t//$permistion_list = ['Create','Edit','Delete','List'];\n\t\t}\n\n\t\tfor ($i = 0; $i < count($module_name); $i++) {\n\t\t\tfor ($j = 0; $j < count($permistion_list); $j++) {\n\t\t\t\tif ($module_name[$i] == 'Coach' && $permistion_list[$j] == 'Manage') {\n\t\t\t\t\t$existing_perm = Permission::where('name', strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]) . '-availability')->exists();\n\t\t\t\t} else {\n\t\t\t\t\t$existing_perm = Permission::where('name', strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]))->exists();\n\t\t\t\t}\n\n\t\t\t\t//dd(strtolower($permistion_list[$j]).'-'.strtolower($module_name[$i]), $existing_perm);\n\t\t\t\tif (!$existing_perm) {\n\t\t\t\t\t$createRole = new Permission();\n\t\t\t\t\tif ($module_name[$i] == 'Coach' && $permistion_list[$j] == 'Manage') {\n\t\t\t\t\t\t$createRole->name = strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]) . '-availability';\n\t\t\t\t\t\t$createRole->display_name = $permistion_list[$j] . ' ' . $module_name[$i] . ' availability';\n\t\t\t\t\t\t$createRole->description = 'Can ' . $permistion_list[$j] . ' ' . strtolower($module_name[$i]) . ' availability';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$createRole->name = strtolower($permistion_list[$j]) . '-' . strtolower($module_name[$i]);\n\t\t\t\t\t\t$createRole->display_name = $permistion_list[$j] . ' ' . $module_name[$i];\n\t\t\t\t\t\t$createRole->description = 'Can ' . $permistion_list[$j] . ' ' . strtolower($module_name[$i]);\n\t\t\t\t\t}\n\t\t\t\t\t$createRole->module_name = $module_name[$i];\n\t\t\t\t\t$createRole->save();\n\n\t\t\t\t\t$superadmin->attachPermission($createRole);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tDB::commit();\n\n\t}",
"public function checkLoginAdmin() {\n $this->login = User::loginAdmin();\n $type = UserType::read($this->login->get('idUserType'));\n if ($type->get('managesPermissions')!='1') {\n $permissionsCheck = array('listAdmin'=>'permissionListAdmin',\n 'insertView'=>'permissionInsert',\n 'insert'=>'permissionInsert',\n 'insertCheck'=>'permissionInsert',\n 'modifyView'=>'permissionModify',\n 'modifyViewNested'=>'permissionModify',\n 'modify'=>'permissionModify',\n 'multiple-activate'=>'permissionModify',\n 'sortSave'=>'permissionModify',\n 'delete'=>'permissionDelete',\n 'multiple-delete'=>'permissionDelete');\n $permissionCheck = $permissionsCheck[$this->action];\n $permission = Permission::readFirst(array('where'=>'objectName=\"'.$this->type.'\" AND idUserType=\"'.$type->id().'\" AND '.$permissionCheck.'=\"1\"'));\n if ($permission->id()=='') {\n if ($this->mode == 'ajax') {\n return __('permissionsDeny');\n } else { \n header('Location: '.url('NavigationAdmin/permissions', true));\n exit();\n }\n }\n }\n }",
"public function updateAllPrivileges() {\n\t\t$sql = \"delete from user_rights;\";\n\t\t$results = $this->executerRequete($sql, array());\n\t\t//On recupere le tableau USER/ACTION en join user->groups->roles->actions\n $sql = \"SELECT user.id, actions.id, actions.controleur, actions.name FROM user inner join user_groups on user.id = user_groups.idUser inner join groups_roles on groups_roles.idGroups = user_groups.IdGroup inner join roles_actions on roles_actions.idRole=groups_roles.idRoles inner join actions on roles_actions.idAction = actions.id\";\n\t\t$results = $this->executerRequete($sql, array());\n $user_actions = $results->fetchAll();\n\t\t//on prépare le tableau des droits pour insertion\n\t\t$sqlValueInsert = '';\n\t\tforeach ($user_actions as $item):\n\t\t\t$sqlValueInsert = $sqlValueInsert.\"(\".$item[0].\",\".$item[1].\",'\".$item[2].\"','\".$item[3].\"'),\";\n\t\tendforeach;\n\t\t$sqlValueInsert= rtrim($sqlValueInsert, \",\");\n\t\t$sql = \"INSERT INTO `user_rights` (`idUser`, `IdAction`, `controleurName`, `actionName`) VALUES \".$sqlValueInsert.\";\";\n\t\t$insert_actions = $this->executerRequete($sql);\n\t\tif ($insert_actions->rowCount() > 0)\n\t\t\treturn 1; // Accès à la première ligne de résultat\n\t\telse\n\t\t\treturn 0;\t\t\n }",
"function oaupostgrad_admin_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `administrator` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function setAdminParams() {\n\t\tif( $this->_user->role != Core_Acl_Roles::ADMINS ) {\n\t\t\t$this->removeElement('group_id');\n\t\t\t$this->removeElement('active');\n\t\t}\n\t}",
"public function actionAdmin()\n {\n if (User::findOne(['email' => '[email protected]'])) {\n echo \"Руководитель уже существует\\n\";\n\n return ExitCode::USAGE;\n }\n\n $user = new User();\n $user->email = '[email protected]';\n $user->full_name = 'Тестовый Руководитель';\n $user->is_admin = 1;\n $user->password = Yii::$app->security->generatePasswordHash('test');\n $user->save();\n echo \"Руководитель создан\\n\";\n\n return ExitCode::OK;\n }",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function run()\n {\n foreach ($this->administrators as $user) {\n User::factory()->administrator()->create($user);\n }\n }",
"public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}",
"function check_admin() {\n\t\t// check session exists\n\t\tif(!$this->Session->check('Admin')) {\n\t\t\t$this->Session->setFlash(__('ERROR: You must be logged in for that action.', true));\n\t\t\t$this->redirect(array('controller'=>'contenders', 'action'=>'index', 'admin'=>false));\n\t\t}\n\t}",
"public function actionChangeClientAdmins()\n {\n if (isset($_GET['clientID'])) {\n\n //check client id\n $clientID = intval($_GET['clientID']);\n if ($clientID == 0) {\n $this->redirect('/admin');\n die;\n }\n\n // get client with users\n $client = Clients::model()->with('users', 'company')->findByPk($clientID);\n $client_users = $client->users;\n $company = $client->company;\n $userTypes = array();\n\n if ($client_users) {\n foreach ($client_users as $key => $cuser) {\n $uClRow = UsersClientList::model()->findByAttributes(array(\n 'User_ID'=>$cuser->User_ID,\n 'Client_ID'=>$clientID,\n ));\n $this->clientAdmins[$cuser->User_ID] = $uClRow->hasClientAdminPrivileges() ? 1 : 0;\n $userTypes[$cuser->User_ID] = $uClRow->User_Type;\n }\n }\n\n // change admins\n foreach ($_GET as $id => $type) {\n if ($id != 'clientID' && is_numeric($id) && isset($userTypes[$id]) && isset($this->userTypes[$type])) {\n if ($userTypes[$id] != $this->userTypes[$type]) {\n $user = Users::model()->with('person')->findByPk($id);\n $userToClient = UsersClientList::model()->findByAttributes(array(\n 'User_ID' => $id,\n 'Client_ID' => $clientID,\n ));\n if (in_array($this->userTypes[$type], UsersClientList::$clientAdmins)) {\n $userToClient->User_Type = $this->userTypes[$type];\n\n // check company\n if ($company->Auth_Url !== NULL || $company->Auth_Code !== NULL) {\n $company->Auth_Url = NULL;\n $company->Auth_Code = NULL;\n $company->save();\n }\n\n $mailSuccess = Mail::sendClientAssignAdminMail($user->person->Email, $user->person->First_Name, $user->person->Last_Name, $client->company->Company_Name, true);\n Projects::assignClientAdminProjects($userToClient->User_ID, $userToClient->Client_ID);\n } else {\n $userToClient->User_Type = $this->userTypes[$type];\n\n $condition = UsersClientList::getClientAdminCondition($clientID);\n $userToClientAdmin = UsersClientList::model()->find($condition);\n\n if ($userToClientAdmin) {\n $currentAdmin = Users::model()->with('person')->findByPk($userToClientAdmin->User_ID);\n $currentAdminEmail = $currentAdmin->person->Email;\n } else {\n $currentAdminEmail = false;\n }\n\n $mailSuccess = Mail::sendClientAssignAdminMail($user->person->Email, $user->person->First_Name, $user->person->Last_Name, $client->company->Company_Name, false, $currentAdminEmail);\n }\n $userToClient->save();\n $userToClient->User_Approval_Value = UsersClientList::checkUserApprovalValue($id, $clientID, $userToClient->User_Approval_Value);\n $userToClient->save();\n }\n }\n }\n\n Yii::app()->user->setFlash('success', \"Client User Types have been successfully changed!\");\n } else {\n Yii::app()->user->setFlash('success', \"Client User Types were not changed!\");\n }\n $this->redirect('/admin');\n }",
"public static function requireAdmin() {\n\t$status = (Yii::$app->user->identity->roles == 'admin') ? true : false;\n return $status\n }",
"function xanthia_admin_view()\n{\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n\t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n \t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n $pnRender->assign('showhelp', pnModGetVar('Xanthia','help'));\n\n\t// Themes\n\t// Get a list of all themes in the themes dir\n\t$allthemes = pnModAPIFunc('Xanthia','user','getAllThemes');\n\t// Get a list of all themes in database\n\t$allskins = pnModAPIFunc('Xanthia','user','getAllSkins');\n\n\t$skins = array();\n if ($allskins) {\n\t foreach($allskins as $allskin) {\n\t $skins[] = $allskin['name'];\n\t }\n\t}\n\n // Generate an Authorization ID\n $authid = pnSecGenAuthKey();\n\t$pnRender->assign('authid', $authid);\n\n if ($allthemes){\n //Start Foreach\n foreach($allthemes as $themes) {\n // Add applicable actions\n $actions = array();\n\n \t\tswitch ($themes) {\n //If theme is active in Xanthia then show the edit theme link\n\t\t case in_array($themes, $skins):\n $state = 1;\n break;\n //If theme is not active in Xanthia then show the add theme link \n\t\t\t default:\n $state = 0;\n break;\n\t\t\t}\n \n\t $theme[] = array('state' => $state,\n\t\t\t\t\t\t 'themename' => $themes);\n //End Foreach\n }\n }\n\t$pnRender->assign('theme', $theme);\n // Return the output that has been generated to the template\n return $pnRender->fetch('xanthiaadminviewmain.htm');\n}",
"static public function addAdminCaps()\n {\n // récupérer le rôle administrateur\n $adminRole = get_role('administrator');\n // pour chaque cap prévue pour l'admin sur le CPT courant, on ajoute la cap\n foreach (static::ADMIN_CAPS as $cap => $grant) {\n $adminRole->add_cap($cap, $grant);\n }\n }",
"public function addadminAction()\n {\n $this->doNotRender();\n\n $email = $this->getParam('email');\n $user = \\Entity\\User::getOrCreate($email);\n\n $user->stations->add($this->station);\n $user->save();\n\n \\App\\Messenger::send(array(\n 'to' => $user->email,\n 'subject' => 'Access Granted to Station Center',\n 'template' => 'newperms',\n 'vars' => array(\n 'areas' => array('Station Center: '.$this->station->name),\n ),\n ));\n\n $this->redirectFromHere(array('action' => 'index', 'id' => NULL, 'email' => NULL));\n }",
"function xanthia_admin_config()\n{\n\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n \t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n // Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Visual Block Editor\n $pnRender->assign('vba', pnModGetVar('Xanthia', 'vba'));\n \n if (file_exists(\".htaccess\")){ \n\t $pnRender->assign('htaccess', 1); \n } else {\n \t$pnRender->assign('htaccess', 0); \n } \n\n\t// Short urls\n $pnRender->assign('shorturls', pnModGetVar('Xanthia', 'shorturls'));\n\n\t// Short urls\n $pnRender->assign('shorturlsextension', pnModGetVar('Xanthia', 'shorturlsextension'));\n\n // Enable Cache\n $pnRender->assign('enablecache', pnModGetVar('Xanthia', 'enablecache'));\n\n\t// modules not to cache for\n\t$pnRender->assign('modulesnocache', pnModGetVar('Xanthia', 'modulesnocache'));\n\n // Cache templates to Database\n $pnRender->assign('db_cache', pnModGetVar('Xanthia', 'db_cache'));\n \n // Compile Templates to Database (not active yet)\n $pnRender->assign('db_compile', pnModGetVar('Xanthia', 'db_compile'));\n\n // Check for new version of template\n $pnRender->assign('compile_check', pnModGetVar('Xanthia', 'compile_check'));\n\n // Force Check for new version of template\n $pnRender->assign('force_compile', pnModGetVar('Xanthia', 'force_compile'));\n \n // Cache Time\n $pnRender->assign('cache_lifetime', pnModGetVar('Xanthia', 'cache_lifetime'));\n\n // Base Caching on Database Updates\n $pnRender->assign('use_db', pnModGetVar('Xanthia', 'use_db'));\n\n // Use Database for Templates\n $pnRender->assign('db_templates', pnModGetVar('Xanthia', 'db_templates'));\n\n // use of whitespace output filter\n\t$pnRender->assign('trimwhitespace', pnModGetVar('Xanthia', 'trimwhitespace'));\n\n // Return the output that has been generated by this function\n if (ereg('0.8', _PN_VERSION_NUM)) {\n return $pnRender->fetch('xanthiaadminconfig.htm');\n\t} else {\n return $pnRender->fetch('xanthiaadmin726config.htm');\n\t}\n}",
"public function run()\n {\n App\\Role::find(1)->attachPermission(1);\n App\\Role::find(1)->attachPermission(2);\n App\\Role::find(1)->attachPermission(3);\n }",
"function manager_admin_init(){\t \n\n\t\t\n\n\t\t\t\n\t}",
"public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}",
"function require_administrator() {\n if ($this->auth->is_administrator())\n return TRUE;\n\n $this->setFlash('error', 'Area is restricted to administrators only.');\n $this->redirect('admin/login');\n }",
"public function admin()\n {\n if ($this->loggedIn()) {\n $data['flights'] = $this->modalPage->getFlights();\n $data['name'] = $_SESSION['user_name'];\n $data['title'] = 'dashboard ' . $_SESSION['user_name'];\n $this->view(\"dashboard/\" . $_SESSION['user_role'], $data);\n\n } else {\n redirect('users/login');\n }\n\n }",
"public function approveMultiple(){\n\t\t\tif(isset($_SESSION['admin_email'])){\n\t\t\t$this->model(\"AdminApproveModel\");\n\t\t\tif(isset($_POST['admin_approve_all'])){\n\t\t\t$approve_all = $this->sanitizeString($_POST['admin_approve_all']);\n\t\t\t$id = $this->sanitizeString($_POST['id']);\n\t\t\t$check_all = $this->sanitizeString($_POST['admin_check_all']);\n\t\t\tif(!empty($check_all)){\n\t\t\t\tAdminApproveModel::where('id', $id)->update(['priority'=>'Activated']);\n\t\t\t}\n\t\t}\n\t}\n\t}",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }",
"public function activate() {\n global $wp_roles;\n\n if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {\n // @codingStandardsIgnoreLine\n $wp_roles = new \\WP_Roles();\n }\n\n $all_cap = array(\n 'dokan_view_booking_menu',\n 'dokan_add_booking_product',\n 'dokan_edit_booking_product',\n 'dokan_delete_booking_product',\n 'dokan_manage_booking_products',\n 'dokan_manage_booking_calendar',\n 'dokan_manage_bookings',\n 'dokan_manage_booking_resource',\n );\n\n foreach ( $all_cap as $key => $cap ) {\n $wp_roles->add_cap( 'seller', $cap );\n $wp_roles->add_cap( 'administrator', $cap );\n $wp_roles->add_cap( 'shop_manager', $cap );\n }\n\n // flush rewrite rules after plugin is activate\n $this->flush_rewrite_rules();\n }",
"function btwp_restrict_admin_access() {\n\t\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t\n\tif( !array_key_exists( 'administrator', $current_user->caps ) ) {\n\t\twp_redirect( get_bloginfo( 'url' ) );\n\t\texit;\n\t}\n\n}",
"public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}",
"function checkAdmin()\n\t {\n\t \tif(!$this->checkLogin())\n\t \t{\n\t \t\treturn FALSE;\n\t \t}\n\t \treturn TRUE;\n\t }",
"public function admin_enable($id = null) {\n\n\t\t\t/*disable rendering of view*/\n\t\t\t$this->autoRender = false;\n\n\t\t\t/*set activity as \"Enable\"*/\n\t\t\t$act=array('activ'=>'1');\n\n\t\t\t/*save activity parameter to table \"modules\"*/\n\t\t\t$this->Module->id=$id;\n\t\t\t$this->Module->save($act);\n\n\t\t\t/*back to method \"admin_index\"*/\n\t\t\t$this->redirect(array('action' => 'admin_index'));\n\t\t\t}",
"public function SetAdmin ($admin = TRUE);",
"public function run()\n {\n AdminRole::creates(['name' => '超级管理员', 'description' => '拥有系统的全部权限']);\n AdminRole::creates(['name' => '内容管理员', 'description' => '拥有管理内容的权限']);\n }",
"protected function admin_page_action() {\n\n\t\tif ( $this->is_admin_request_for_users_forget() ) {\n\t\t\t$this->users_forget();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_send_email() ) {\n\t\t\t$this->users_send_email();\n\t\t}\n\n\t\tif ( $this->is_admin_request_for_users_remove() ) {\n\t\t\t$this->users_remove_from_list();\n\t\t}\n\n\t\t/* Default settings page */\n\t\t$this->add_view_option( 'data', $this->get_all_requested_users_data( $confirmed_only = true ) );\n\n\t}",
"function adminMenu($params, &$smarty) {\n\t// is not CSS classed. It is impossible to determine if the current element will be the last active module\n\t// providing an admin interface, so this is the best way to do it.\n\t//$activeModules = array_reverse(Config::getActiveModules());\n\t$activeModules = Config::getActiveModules();\n\t\n\t$adminItems = array('<li class=\"borderRight\"><a href=\"/admin/\">DASHBOARD</a></li>');\n\t\n\t$i = 0;\n\t$thisUser = new User($_SESSION['authenticated_user']->getId());\n\tforeach ($activeModules as $module) {\n\t\tif($thisUser->hasPerm('admin') || $module['module'] == 'Campaigns'){\n\t\t\t$i++;\n\t\t\t// Use object reflection to reverse engineer the class functions\n\t\t\t$modulename = 'Module_' . $module['module'];\n\t\t\tinclude_once SITE_ROOT . '/modules/' . $module['module'] . '/' . $module['module'] . '.php';\n\t\t\t$blah = new $modulename();\n\t\t\t$test = new ReflectionClass($blah);\n\t\t\t\n\t\t\t// Determine if the current object provides and admin interface. Some modules may provide functionality\n\t\t\t// but not require a main admin interface, and instead accomplish their tasks with hooks or no interface\n\t\t\t// at all.\n\t\t\tif ($test->hasMethod('getAdminInterface')) {\n\t\t\t\t// If the array is empty push an un-classed array item onto the stack. If not, then push successive\n\t\t\t\t// array items with the required 'borderRight' class onto the stack.\n\t\t\t\t//if (count($adminItems) == 0) {\n\t\t\t\t//\t$adminItems = array('<li><a href=\"/admin/?module=' . $module['module'] . '\">' . strtolower($module['module']) . '</a></li>');\n\t\t\t\t//} else {\n\t\t\t\t//\tarray_unshift($adminItems, '<li><a href=\"/admin/?module=' . $module['module'] . '\">' . strtolower($module['module']) . '</a></li>');\n\t\t\t\t//}\n\t\t\t\tif (($i != count($activeModules) && $module['module'] != 'Campaigns') || ($module['module'] == 'Campaigns' && $i < 1)) {\n\t\t\t\t\t$liClass = ' class=\"borderRight\"';\n\t\t\t\t} else {\n\t\t\t\t\tunset($liClass);\n\t\t\t\t}\n\t\t\t\t$adminItems[] = '<li' . $liClass . '><a href=\"/admin/' . $module['module'] . '\">' . strtoupper($module['display_name']) . '</a></li>';\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t$menuString = '<ul>';\n\t$menuString .= implode(null, $adminItems);\n\t$menuString .= '</ul>';\n\t\n\treturn $menuString;\n}",
"public function afficherAdministration()\n {\n if (empty($_SESSION[\"id\"])) {\n $controllerUser = new ControllerUser();\n $controllerUser->addErreur(\"Vous devez vous connecter pour accéder à la page d'administration\");\n $controllerUser->afficherConnexion();\n } else {\n $user = new User($_SESSION[\"id\"]);\n if ($user->getAdministrateurSite() != 1) {\n $controllerUser = new ControllerUser();\n $controllerUser->addErreur(\"Vous devez vous connecter pour en tant qu'administrateur pour accéder à la page d'administration\");\n $controllerUser->afficherConnexion();\n } else {\n $this->vue = new Vue(\"Administration\");\n if (!empty($this->erreurs)) $this->vue->setErreurs($this->erreurs);\n $listeUser = new ListeUser();\n $configAdmin = new ConfigAdmin();\n $this->vue->generer(array(\"listeUsers\" => $listeUser, \"inscriptions\" => $configAdmin->getInscriptions()));\n }\n }\n }",
"public function uultra_modules_deactivate_activate_membership()\r\n\t{\r\n\t\t$module_list = array();\r\n\t\t$modules = $_POST[\"modules_list\"]; \r\n\t\t$package_id = $_POST[\"package_id\"]; \r\n\t\t\r\n\t\t\r\n\t\tif($modules!=\"\")\r\n\t\t{\r\n\t\t\t$modules =rtrim($modules,\"|\");\r\n\t\t\t$module_list = explode(\"|\", $modules);\t\t\t\r\n\t\t\t$modules_disalowed = serialize($module_list);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tprint_r($module_list);\r\n\t\t\t\t\r\n\t\t//update custom\t\t\r\n\t\t$defaultmodules = $this->uultra_get_modules_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules\r\n\t\t$user_menu_modules = $this->uultra_get_user_navigator_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules added by admin\r\n\t\t$user_menu_modules_by_admin = $this->uultra_get_custom_modules_for_membership($package_id);\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\t$modules_array = array();\r\n\t\t$i = 1;\r\n\t\tforeach($defaultmodules as $key => $module)\r\n\t\t{\r\n\t\t\tif(!$this->check_if_in_deactivate_array($module_list, $key))\r\n\t\t\t{\r\n\t\t\t\t//if (strpos($modules,$key) !== true) {\r\n\t\t\t\t\t\r\n\t\t\t\t//set position and custom settings\t\t\t\t\t\t\t\r\n\t\t\t\tif(isset($user_menu_modules[$key]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t$modules_array[$key] = $module;\t\t\t\t\t\t\t\r\n\t\t\t\t$i++;\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\techo \"disallowed: \" . $key;\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(is_array($user_menu_modules_by_admin) && $user_menu_modules_by_admin!=\"\")\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$modules_array = $modules_array + $user_menu_modules_by_admin;\t\t\r\n\t\t}\r\n\t\tprint_r($modules_array);\r\n\t\tupdate_option('userultra_default_user_features_custom_package_'.$package_id.'',$modules_array);\t\t\t\t\t\r\n\t\tupdate_option('uultra_excluded_user_modules_package_'.$package_id.'',$modules_disalowed);\r\n\t\tdie();\r\n\t\r\n\t}",
"private function process_adminpanel_actions() {\n\n\t\tif(is_admin()) {\n\t\t\t\n\t\t\trequire_once($this->get_plugin_path() . 'settings-panel.php');\n\t\t\t\n\t\t\t// the settings page has detected an error and asked to abort\n\t\t\tif( isset($_POST['wpudisable']) && check_ajax_referer( 'wp-united-disable') ) {\n\t\t\t\t$this->ajax_auto_disable();\n\t\t\t}\t\n\n\t\t\t// the user wants to manually disable\n\t\t\tif( isset($_POST['wpudisableman']) && check_ajax_referer( 'wp-united-disable') ) {\n\t\t\t\t$this->ajax_manual_disable();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif($this->is_working() && is_object($this->extras)) {\n\t\t\t\t$this->extras->admin_load_actions();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}"
] | [
"0.65529096",
"0.64864045",
"0.6442194",
"0.64154714",
"0.6401228",
"0.6386811",
"0.63789535",
"0.6328153",
"0.631584",
"0.62842196",
"0.6272429",
"0.6272332",
"0.6265186",
"0.624716",
"0.6241716",
"0.6233676",
"0.62327284",
"0.6230447",
"0.6224395",
"0.6224395",
"0.6205569",
"0.6196688",
"0.61790144",
"0.617444",
"0.61632645",
"0.6160868",
"0.61576885",
"0.61431575",
"0.61289716",
"0.6122756",
"0.61201984",
"0.6117766",
"0.6092684",
"0.6081641",
"0.6065919",
"0.6064784",
"0.60528255",
"0.60437304",
"0.6022119",
"0.6021881",
"0.601746",
"0.601746",
"0.601746",
"0.59966606",
"0.5992747",
"0.5987815",
"0.5984696",
"0.5972465",
"0.59691095",
"0.59661937",
"0.5963836",
"0.59587455",
"0.59521",
"0.59414524",
"0.5936642",
"0.5936041",
"0.5931713",
"0.59265965",
"0.5922285",
"0.5915617",
"0.5915617",
"0.5914193",
"0.5909236",
"0.590851",
"0.5900062",
"0.58906484",
"0.58884853",
"0.588763",
"0.5881794",
"0.58714956",
"0.5853417",
"0.58454436",
"0.5843717",
"0.5840463",
"0.5835921",
"0.58319277",
"0.58248335",
"0.5824019",
"0.5820224",
"0.58201087",
"0.58096105",
"0.58038235",
"0.5802916",
"0.5798458",
"0.57843864",
"0.57834536",
"0.5780344",
"0.5778469",
"0.5767111",
"0.5759505",
"0.5759122",
"0.5758395",
"0.57514113",
"0.57510996",
"0.5744696",
"0.57362545",
"0.57361007",
"0.57342017",
"0.5733745",
"0.57318276",
"0.573067"
] | 0.0 | -1 |
$profile: the profile string | public function createUser($name, $pass, $profile, array $extra = [])
{
$users = $this->getStore();
// find unique index (next natural index)
$max = 0;
foreach ($users as $k => $v) {
if (is_integer($k) && $k > $max) {
$max = $k;
}
}
$index = $max + 1;
$users[$index] = [
"name" => $name,
"pass" => $pass,
"profile" => $profile,
"extra" => $extra,
];
return $this->writeUsers($users);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function profile(): string\n {\n if ($this->profile) {\n return $this->profile;\n }\n\n return $this->app['opx.profile'] ?? 'default';\n }",
"public function __construct($profile)\n {\n $this->profile = $profile;\n }",
"public function setProfileInfo($profile){\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n common::abort( \"No such path to profiles: $profile_dir\");\n } \n \n include $profile_dir . \"/profile.inc\";\n $this->profileModules = $_PROFILE_MODULES;\n $this->profileTemplates = $_PROFILE_TEMPLATES;\n $this->profileTemplate = $_PROFILE_TEMPLATE;\n }",
"function __construct($profile = false, $profile_prefix = false) {\r\n\t\t$this->profile_prefix = dirname(__FILE__) . '/' . $profile_prefix;\r\n\t\t$this->loadProfile($profile);\r\n\t}",
"public function createProfileScript($profile){\n \n // Get moduls as a string\n $modules = $this->getModules();\n $module_str = var_export($modules, true); \n \n // Get tempaltes as a string\n $templates = $this->getTemplates();\n $template_str = var_export($templates, true);\n \n // Compose profile script\n $profile_str = '<?php ' . \"\\n\\n\";\n $profile_str.= '$_PROFILE_MODULES = ' . $module_str . \";\";\n $profile_str.= \"\\n\\n\";\n $profile_str.= '$_PROFILE_TEMPLATES = ' . $template_str . \";\";\n $profile_str.= \"\\n\\n\";\n $profile_str.= '$_PROFILE_TEMPLATE = ' . \"'\" . $this->getProfileTemplate() . \"'\" . ';';\n $profile_str.= \"\\n\\n\";\n $file = conf::pathBase() . \"/profiles/$profile/profile.inc\";\n if (!file_put_contents($file, $profile_str)){\n common::abort(\"Could not write to file: $file\");\n }\n }",
"public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }",
"public function profile() {\n return $this->profile;\n }",
"function getProfileName() {\n\t\treturn $this->_ProfileName;\n\t}",
"public function getProfileName() {\n\t\treturn ($this->profileName);\n\t}",
"public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function getProfileName()\n\t\t{\n\t\t return $this->profileName;\n\t\t}",
"function get_profile_usrnm($usrname){\r\n\t\r\n}",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"abstract protected function getUserProfile();",
"public function __construct(Profile $profile)\n {\n $this->profile = $profile;\n }",
"function get_profile_fname($fname){\r\n\t\r\n}",
"public function getUserProfileName(): string {\n\t\treturn ($this->userProfileName);\n\t}",
"public function profileSettings(array $settings);",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function GetProfile()\n {\n return $this->profile;\n }",
"public function getUserProfile();",
"function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}",
"public function createProfile($profile){\n $this->createProfileFiles($profile);\n $this->createProfileScript($profile);\n $this->createConfigIni($profile);\n }",
"public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}",
"public function SetProfile($profile)\n {\n $this->profile = $profile;\n }",
"public function beforeStartProfile(Item $profile)\n {\n echo $profile->getSQLStatement();\n }",
"function getProfile()\n{\n\tglobal $time_start, $db;\n\n\t$start = $time_start;\n\t$end = gettimeofday();\n\t$dbcalls = count($db->queries);\n\t$dbtime = $db->time;\n\n\t$total = (float)($end['sec'] - $start['sec']) + ((float)($end['usec'] - $start['usec'])/1000000);\n\t$script = $total - $dbtime;\n\t$scriptper = $script / $total;\n\n\t$ret = round($total, 3) . 's, ' . round(100 * $scriptper, 1) . '% PHP, ' . round(100* (1 - $scriptper), 1) . '% SQL with ' . $dbcalls . ' ' . makeLink('queries', $_SERVER['QUERY_STRING'] . '&sqlprofile');\n\n\treturn $ret;\n}",
"public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}",
"function setProfileConfig($profile_config){\n\t\t$this->profile_config = $profile_config;\n\t}",
"public function getProfileClass(): string {\n $main_module = $this->xot->main_module;\n $class = 'Modules\\\\'.$main_module.'\\Models\\Profile';\n\n return $class;\n }",
"function get_profile( $key = '' ){\n\t$file = abspath('/contents/user/profile.yaml');\n\tif ( !file_exists($file) )\n\t\treturn -1;\n\n\t$profile = spyc_load_file( $file );\n\t$profile = array_change_key_case_recursive( $profile );\n\n\tif ( !empty($key) && $key = strtolower($key) ){\n\t\tif ( array_key_exists($key, $profile) )\n\t\t\treturn $profile[$key];\n\n\t\treturn null;\n\t}\n\n\treturn $profile;\n}",
"public function loadProfile($profile){\n $this->setProfileInfo($profile);\n $this->loadProfileFiles($profile);\n $this->loadConfigIni($profile);\n }",
"function test28() {\n $profile = 'x';\n return $profile;\n}",
"public function setProfile(Profile $profile): void\n {\n $this->profile = $profile;\n }",
"public function getProfileHash() : string {\n\t\treturn $this->profileHash;\n\t}",
"function write_profile( $catlabel_str , $profile ) {\n\tglobal $cat_array ;\n\t$profilestr = \"\" ;\n\t$pad_id = str_pad( $euid , 5, \"0\", STR_PAD_LEFT);\n\t$cat_id = $profile[\"cat_id\"] ;\n\t$posit_descr = $profile[\"posit_descr\"] ;\n\t$overview = $profile[\"overview\"] ;\n\t$bullet1 = $profile[\"bullet1\"] ;\n\t$bullet2 = $profile[\"bullet2\"] ;\n\t$bullet3 = $profile[\"bullet3\"] ;\n\t$bullet4 = $profile[\"bullet4\"] ;\n\t$bullet5 = $profile[\"bullet5\"] ;\n\t$profilestr .= \"<dt class=\\\"profname\\\">\" . $cat_id . $pad_id ;\n\tif ( $posit_descr != \"\" ){\n\t\t$profilestr .= \" — <font color=\\\"#FF0000\\\">$posit_descr</font>\" ;\n\t}\n\t$profilestr .= \"</dt>\\n<dd class=\\\"profile\\\">\\n\" ;\n\tif ( $overview != \"\" ){\n\t\t$profilestr .= $overview . \"<br />\\n\" ;\n\t}\n\tif ( $bullet1 . $bullet2 . $bullet3 . $bullet4 . $bullet5 != \"\" ) {\n\t\t$profilestr .= \"<ul>\\n\" ;\n\t\tif ( $bullet1 != \"\" ){\n\t\t\t$profilestr .= \"<li>\" . $bullet1 . \"</li>\\n\" ;\n\t\t}\n\t\tif ( $bullet2 != \"\" ){\n\t\t\t$profilestr .= \"<li>\" . $bullet2 . \"</li>\\n\" ;\n\t\t}\n\t\tif ( $bullet3 != \"\" ){\n\t\t\t$profilestr .= \"<li>\" . $bullet3 . \"</li>\\n\" ;\n\t\t}\n\t\tif ( $bullet4 != \"\" ){\n\t\t\t$profilestr .= \"<li>\" . $bullet4 . \"</li>\\n\" ;\n\t\t}\n\t\tif ( $bullet5 != \"\" ){\n\t\t\t$profilestr .= \"<li>\" . $bullet5 . \"</li>\\n\" ;\n\t\t}\n\t\t$profilestr .= \"</ul></dd>\\n\" ;\n\t}\n\tif( str_replace( \"<dt class=\\\"profname\\\">\" . $cat_id . $pad_id , \"\" , $profilestr ) == \"\" ) {\n\t\t$profilestr .= \"<font size=\\\"-1\\\" color=\\\"#FF0000\\\">EMPTY PROFILE</font></dd>\\n\" ;\n\t}\n\t$profilestr = \"<tr>\\n<td colspan=\\\"2\\\"><dt class=\\\"profname\\\">\" . $catlabel_str . \" Category: <font color=\\\"#008000\\\">\" . $cat_array[ $cat_id ] . \"</font></dt>\\n<dd class=\\\"profname\\\">\" . $profilestr ;\n\t$profilestr .= \"</blockquote></dd>\\n\" ;\n\treturn $profilestr ;\n}",
"public function createProfile()\n {\n if (self::$hook_statistics) {\n $profile = '';\n $profile .= 'Page' . ': ' . wa()->getConfig()->getCurrentUrl() . \"\\r\\n\";\n $profile .= \"----------------\\r\\n\";\n\n foreach (self::$hook_statistics as $hook_name => $hook) {\n $profile .= \"\\r\\n\";\n\n // Общие данные по хуку\n $profile .= $this->addLogCount('Hook', $hook_name, $hook['count'], $hook['time']);\n\n // Список точек наблюдения\n if (!empty($hook['points'])) {\n $profile .= \"Points:\\r\\n\";\n $profile .= $this->addLogPoints($hook) . \"\\r\\n\";\n }\n\n // Данные о вызовах\n if (!empty($hook['caller'])) {\n ksort($hook['caller']);\n $profile .= \"Callers:\\r\\n\";\n foreach ($hook['caller'] as $caller_id => $caller) {\n $profile .= self::TAB;\n $caller_name = $this->getCallerName($caller);\n $profile .= $this->addLogCount($caller_name['title'], $caller_name['name'], $caller['count'], $caller['time']);\n\n // Методы\n if (!empty($caller['calls'])) {\n $profile .= $this->addLogCallerCalls($caller);\n }\n\n // Точки\n if (!empty($hook['points'])) {\n $profile .= $this->addLogPoints($caller, self::TAB);\n }\n }\n }\n }\n\n waLog::log($profile, self::PROFILE_FILE);\n }\n }",
"public function setProfile($profile)\n {\n if (empty($profile)) {\n throw new Exception (\"profile is empty!\");\n } \n $this->profile = $profile;\n }",
"public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}",
"public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"function test29() {\n $profile = 'x';\n return $profile;\n}",
"function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}",
"public function recreateProfile($profile){\n $this->createProfileFiles($profile);\n $this->createProfileScript($profile);\n }",
"public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }",
"public function renderMemberProfile($string) {\r\n\t$ids = explode('-', $string);\r\n\t$kid = $ids[0];\r\n\ttry {\r\n\t $userData = $this->getUserModel()->getUserByKid((int) $kid);\r\n\t $profileData = $this->getUserModel()->getWebProfilesFluent((int) $kid)->execute()->fetch();\r\n\t} catch (Exception $ex) {\r\n\t $this->flashMessage('Omlouváme se, ale požadovaná data nelze získat. Zkuste to prosím znovu nebo později.', 'error');\r\n\t Debugger::log($ex->getMessage(), Debugger::ERROR);\r\n\t $this->redirect('Homepage:default');\r\n\t}\r\n\r\n\tdump(\"PICTURE\");\r\n\r\n\t$this->template->profile_req = $userData->profile_required;\r\n\r\n\r\n\t$this->template->publicData = array('name' => $userData->name,\r\n\t 'surname' => $userData->surname,\r\n\t 'year' => $userData->year,\r\n\t 'nick' => $userData->nick,\r\n\t 'signature' => $userData->signature,\r\n\t 'city' => $userData->city);\r\n\t$profileData->offsetUnset('kid');\r\n\t$profileData->offsetUnset('city');\r\n\t$profileData->offsetUnset('job');\r\n\t$profileData->offsetUnset('last_updated');\r\n\t$profileData->offsetUnset('contact');\r\n\t$this->template->profileData = $profileData;\r\n\r\n\t// TODO rights 0 1 2\r\n\t$this->template->levelOneData = array('job' => $userData->job,\r\n\t 'phone' => $userData->phone);\r\n\r\n\t// TODO rights 3 4\r\n\t$this->template->levelTwoData = array('address' => $userData->address,\r\n\t 'postalCode' => $userData->postal_code,\r\n\t 'contName' => $userData->contperson_name,\r\n\t 'contPhone' => $userData->contperson_phone,\r\n\t 'contEmail' => $userData->contperson_email);\r\n }",
"function __construct($plugin, $profile) {\n $this->plugin = $plugin;\n $this->profile = $profile;\n }",
"function showProfile(){\r\n\t\tif( $profiles = $this->getArrayRow( \"SHOW profiles\" ) ){\r\n\t\t\t$html = '<table cellspacing=\"1\" cellpadding=\"10\" bgcolor=\"#cccccc\" style=\"font:11px Helvetica;\"><tr style=\"font-weight:bold\"><td>Query ID</td><td>exec time</td><td width=\"150\">%</td><td>Query</td></tr>';\r\n\t\t\tfor( $i=0, $execution_time = 0, $n=count($profiles); $i<$n; $i++ )\r\n\t\t\t\t$execution_time += $profiles[$i]['Duration'];\r\n\r\n\t\t\tforeach($profiles as $i => $p ){\r\n\t\t\t\t$perc = round( ( $p['Duration'] / $execution_time ) * 100, 2 );\r\n\t\t\t\t$width = ceil( $perc * 2 );\r\n\t \t\t\t$html .= '<tr bgcolor=\"#eeeeee\"><td>'.$p['Query_ID'].'</td><td>'.$p['Duration'].'</td><td><div style=\"float:left;width:50px;\">'.$perc.'%</div> <div style=\"display:inline; margin-top:3px;float:left;background:#ff0000;width:'.$width.'px;height:10px;\"></td><td>'.$p['Query'].'</td></tr>';\r\n\t\t\t}\r\n\t\t\treturn $html .= '</table>';\t\r\n\t\t}\r\n\t}",
"public function applyProfile(string $profile): void\n {\n ConfigProfiles::getInstance()->checkProfiles($profile, $this);\n }",
"public function makeMiniProfile($input);",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getProf(){\n return $this->prof;\n }",
"protected function _loadProfileRequired()\n {\n $profile = $this->_loadProfile();\n if ($profile === false) {\n require_once 'Zend/Tool/Project/Provider/Exception.php';\n throw new Zend_Tool_Project_Provider_Exception('A project profile was not found in the current working directory.');\n }\n return $profile;\n }",
"public function path()\n {\n return \"profile/{$this->id}\";\n }",
"public function reloadProfile($profile){\n $this->setProfileInfo($profile);\n $this->loadProfileFiles($profile);\n }",
"public function loadProfileInformation() {\n\t\t\t$procedure = \"get\" . $this->mode_ . \"Information\"; \n\t\t\t$this->profileInformation_ = $this->dbHandler_->call($procedure, \"%d\", array($this->id_));\n\t\t}",
"function get_profile_usrid($usrid){\r\n\t\r\n}",
"private function BuildHeadText( $profile ){\n\t\tprint( \"<h5>Solarpower SprayLoader P.O.C</h5>\" );\n\t\tprint( '<div class=\"row\"><div class=\"col s9\">');\n\t\tprint( \"<p> Welcome back, \" . $profile['personaname'] . \". Nullam sit amet lacus vel neque placerat aliquet et ac purus. Donec ac semper mi. Vestibulum imperdiet risus eget justo mollis, consequat consequat nunc ullamcorper. Proin lectus urna, faucibus sit amet egestas ut, fringilla non nisi. Sed ut iaculis neque, ullamcorper tincidunt justo. Donec at tincidunt risus. Duis vel velit porta ante ornare condimentum. Suspendisse fermentum hendrerit rutrum. Phasellus dignissim suscipit magna nec mattis. Aliquam hendrerit nisi turpis, sed pulvinar justo aliquet nec. Aliquam velit odio, congue sit amet ornare eu, auctor vitae dolor. In nisi magna, interdum sed lacus nec, cursus viverra est. Fusce quis bibendum neque. Nam vehicula rhoncus nibh, in facilisis dolor maximus ut. Sed pellentesque, augue ut sodales pulvinar, arcu est sagittis risus, sit amet pharetra sem lorem ac felis.</p>\");\n\t\tprint( '</div><div class=\"col s3\">');\n\t\tprint( '<img src=\"'.$profile['avatarfull'].'\" title=\"\" alt=\"\" />');\n\t\tprint( '</div></div>');\n\t}",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"function apply_add_profile(&$character, $profile)\n {\n $err = array();\n if (is_valid_pname($profile, $err))\n if ($character->GrantAccessTo($profile))\n return true;\n return false;\n }",
"function usage() {\n\n\tprint \"Usage: \" . __FILE__ . \" --appStack string --profile string [ --help | -h ]\\n\" ;\n\n}",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }",
"public static function &profile() {\n\t\t$_profile=self::$global['PROFILE'];\n\t\t// Compute elapsed time\n\t\t$_profile['TIME']['start']=&self::$global['TIME'];\n\t\t$_profile['TIME']['elapsed']=microtime(TRUE)-self::$global['TIME'];\n\t\t// Reset PHP's stat cache\n\t\tforeach (get_included_files() as $_file)\n\t\t\t// Gather includes\n\t\t\t$_profile['FILES']['includes']\n\t\t\t\t[basename($_file)]=filesize($_file);\n\t\t// Compute memory consumption\n\t\t$_profile['MEMORY']['current']=memory_get_usage();\n\t\t$_profile['MEMORY']['peak']=memory_get_peak_usage();\n\t\treturn $_profile;\n\t}",
"public function executeProfile($request)\n {\n $this->_checkAuth();\n $profile = new Profile();\n $this->configTypes = $profile->configTypeDefault();\n $this->platformNames = $profile->platformNameDefault();\n \n $configRep = new ConfigRepository();\n $this->platform_config = $configRep->getProfileByPlatform();\n $this->iOSpasscodeSetting = $configRep->getiOSPasscodeSetting();\n $this->profilePasscodeTooltip = $this->notificationMsg['tooltip'];\n $this->locationWarning = $this->notificationMsg['N9001'];\n $this->confirm = $this->confirmMsg;\n }",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getProfileType()\n {\n return $this->profile_type;\n }",
"protected function _storeProfile()\n {\n $projectProfileFile = $this->_loadedProfile->search('ProjectProfileFile');\n\n $name = $projectProfileFile->getContext()->getPath();\n\n $this->_registry->getResponse()->appendContent('Updating project profile \\'' . $name . '\\'');\n\n $projectProfileFile->getContext()->save();\n }",
"public function setProfileUrl($url)\n {\n if ($url) {\n $this->profileUrl = preg_replace(\"#(\\/+)$#\", \"\", $url) . \"/\";\n }\n }",
"public function stripProfile()\n {\n return $this->addAction(Flag::stripProfile());\n }",
"function drush_dslm_add_profile() {\n // Bootstrap dslm, this grabs the instantiated and configured Dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n $args = drush_get_arguments();\n\n // Get a list of profiles\n $profiles = $dslm->getProfiles();\n\n // Get the profile name via args or interactively\n $profile_name = isset($args[1]) ? $args[1] : FALSE;\n if (!$profile_name) {\n $choices = array();\n foreach ($profiles as $k => $v) {\n $choices[$k] = $k;\n }\n $profile_name = drush_choice($choices);\n if (!$profile_name || !isset($profiles[$profile_name])) {\n return FALSE;\n }\n }\n\n // Get the version via args or interactively\n $profile_Version = isset($args[2]) ? $args[2] : FALSE;\n if (!$profile_version) {\n $choices = array();\n foreach ($profiles[$profile_name]['all'] as $k => $v) {\n $choices[$v] = $v;\n }\n $profile_version = drush_choice($choices);\n if (!$profile_version || !in_array($profile_version, $profiles[$profile_name]['all'])) {\n return FALSE;\n }\n }\n\n // Run the DSLM manageProfile method to add the profile or deal with an error\n if ($dslm->manageProfile($profile_name, $profile_version)) {\n drush_log(\"The profile '$profile_name' version '$profile_version' has been added\", 'ok');\n }\n else {\n drush_log($dslm->lastError(), 'error');\n }\n\n}",
"function charity_head_profile() {\n $content = '<head profile=\"http://gmpg.org/xfn/11\">' . \"\\n\";\n echo apply_filters('charity_head_profile', $content);\n}",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function lockProfile(): string\n {\n return 'flock';\n }",
"public static function conversationProfileName(string $project, string $location, string $conversationProfile): string\n {\n return self::getPathTemplate('conversationProfile')->render([\n 'project' => $project,\n 'location' => $location,\n 'conversation_profile' => $conversationProfile,\n ]);\n }",
"public function setProfile($profile) {\n\t\t$this->profile = $profile;\n\t\treturn $this;\n\t}",
"public function getProfileSalt(): string {\n\t\treturn $this->profileSalt;\n\t}",
"protected function _getProfilePicturePath()\n {\n if ($this->_properties['profile_picture_dir'] && $this->getOriginal('profile_picture')) {\n return '../files/users/profile_picture/' . $this->_properties['profile_picture_dir'] . '/square_' . $this->getOriginal('profile_picture'); \n }\n return 'default-profile_picture.png';\n }",
"protected function _coverPhotoStorageExtension()\n\t{\n\t\treturn 'core_Profile';\n\t}",
"public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}",
"public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}",
"public function getProfileSalt() : string {\n\t\treturn $this->profileSalt;\n\t}",
"public function getProfileBytes()\n {\n return $this->profile_bytes;\n }",
"private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }",
"function MyMod_Setup_Profiles_File()\n {\n return join(\"/\",array(\"..\",\"EventApp\",\"System\",\"Inscriptions\",\"Profiles.php\"));\n }",
"public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }",
"static function getProfile($profile_id)\n\t{\n\t\t$profile = ORM::for_table('PROFILE')->where('profile_id', $profile_id)->find_array();\n\n\t\treturn $profile;\n\t}",
"public function getProfileType() {\n\t\treturn ($this->profileType);\n\t}",
"function _visit_profile() {\n if (!$this->staff && !$this->has_arg('visit')) $this->_error('Access Denied', 403);\n\n $where = '';\n $args = array();\n\n if ($this->has_arg('bl')) {\n $where .= ' AND s.beamlinename LIKE :'. (sizeof($args)+1);\n array_push($args, $this->arg('bl'));\n }\n if ($this->has_arg('run')) {\n $where .= ' AND vr.runid = :' . (sizeof($args)+1);\n array_push($args, $this->arg('run'));\n }\n\n if ($this->has_arg('visit')) {\n $where .= \" AND CONCAT(CONCAT(CONCAT(p.proposalcode,p.proposalnumber), '-'), s.visit_number) LIKE :\".(sizeof($args)+1);\n array_push($args, $this->arg('visit'));\n }\n\n $dp = $this->db->pq(\"SELECT count(case when r.status='CRITICAL' then 1 end) as ccount, count(case when r.status!='SUCCESS' then 1 end) as ecount, count(case when r.status!='SUCCESS' then 1 end)/count(r.status)*100 as epc, count(case when r.status='CRITICAL' then 1 end)/count(r.status)*100 as cpc, count(r.status) as total, r.dewarlocation \n FROM robotaction r \n INNER JOIN blsession s on r.blsessionid=s.sessionid \n INNER JOIN proposal p ON p.proposalid = s.proposalid \n INNER JOIN v_run vr ON s.startdate BETWEEN vr.startdate AND vr.enddate\n WHERE r.actiontype LIKE 'LOAD' AND r.dewarlocation != 99 $where\n GROUP BY r.dewarlocation \n ORDER BY r.dewarlocation\", $args);\n \n \n $profile = array(array(\n array('label' => 'Total Loads', 'data' => array()),\n array('label' => '% Errors', 'data' => array(), 'yaxis' => 2),\n array('label' => '% Critical', 'data' => array(), 'yaxis' => 2),\n ),\n array());\n \n foreach ($dp as $e) {\n array_push($profile[0][0]['data'], array($e['DEWARLOCATION'], $e['TOTAL']));\n array_push($profile[0][2]['data'], array($e['DEWARLOCATION'], $e['CPC']));\n array_push($profile[0][1]['data'], array($e['DEWARLOCATION'], $e['EPC']));\n }\n \n $this->_output($profile);\n }",
"public function getIccProfileStream() {}",
"public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}",
"public function profileAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}",
"function user_get_name($profileid)\n{\n\t$sql=\"SELECT USERNAME from newjs.JPROFILE where activatedKey=1 and PROFILEID='$profileid'\";\n\t$result=mysql_query_decide($sql) or logError(\"Due to a temporary problem your request could not be processed. Please try after a couple of minutes\",$sql,\"ShowErrTemplate\");\n\tif(mysql_num_rows($result)>0)\n\t{\n\t\t$myrow=mysql_fetch_array($result);\n\t\treturn $myrow[\"USERNAME\"];\n\t}\n\telse\n\t\treturn \"\";\n}",
"public function getSource()\n {\n return 'user_profile';\n }",
"public function __construct(ProfileInterface $profile, $label) {\n $this->profile = $profile;\n $this->label = $label;\n }",
"public function getProfileHandle(): string {\n\t\treturn ($this->profileHandle);\n\t}",
"public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}",
"abstract function getUserProfileProperty($user, $property_name);",
"public function getUserProfileHash(): string {\n\t\treturn ($this->userProfileHash);\n\t}"
] | [
"0.6936708",
"0.6620254",
"0.66049176",
"0.6582227",
"0.6400141",
"0.63510674",
"0.63477474",
"0.6312965",
"0.6247962",
"0.6231384",
"0.62196213",
"0.6213184",
"0.6186457",
"0.6171319",
"0.6155258",
"0.6139497",
"0.6131965",
"0.6080451",
"0.6073175",
"0.60528034",
"0.60528034",
"0.60528034",
"0.5986274",
"0.5976513",
"0.59740156",
"0.5945973",
"0.5928778",
"0.5905804",
"0.5859468",
"0.58391887",
"0.5832306",
"0.58231604",
"0.58069277",
"0.5795643",
"0.5789359",
"0.5761974",
"0.5756679",
"0.5750105",
"0.57173556",
"0.57030404",
"0.5702738",
"0.56916255",
"0.5686141",
"0.56820273",
"0.5671124",
"0.56244296",
"0.56229323",
"0.5619749",
"0.5596259",
"0.55933857",
"0.5584977",
"0.55809426",
"0.55778736",
"0.5562234",
"0.5545914",
"0.554343",
"0.5539857",
"0.55295503",
"0.552006",
"0.5514652",
"0.5505672",
"0.54957175",
"0.5479505",
"0.5478593",
"0.5469104",
"0.5463353",
"0.544717",
"0.544698",
"0.5443197",
"0.5439911",
"0.54382783",
"0.54366964",
"0.54111016",
"0.5410544",
"0.5400966",
"0.5399773",
"0.5396823",
"0.5395748",
"0.53906304",
"0.53856885",
"0.5382822",
"0.5378153",
"0.53733367",
"0.53723973",
"0.53718984",
"0.5369116",
"0.5365278",
"0.53621167",
"0.53577834",
"0.5347519",
"0.533565",
"0.5333715",
"0.53334975",
"0.533151",
"0.5329462",
"0.5325655",
"0.5324516",
"0.53158796",
"0.531219",
"0.53104556",
"0.5292589"
] | 0.0 | -1 |
vypocte cenu bez DPH | public function calculate_price_without_vat($price_with_vat, $vat_rate = FALSE)
{
if ($this->loaded()) {
$coeff = $this->coefficient_without_vat;
}
else {
$coeff = round($vat_rate / (100 + $vat_rate), 4);
}
$vat = $price_with_vat * $coeff;
return round($price_with_vat - $vat, 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AggiornaPrezzi(){\n\t}",
"public function valorpasaje();",
"public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}",
"public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }",
"public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }",
"public function getChapeau();",
"abstract public function getPasiekimai();",
"private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}",
"private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}",
"public function cortesia()\n {\n $this->costo = 0;\n }",
"public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }",
"function budynekKoncowy(){\r\n\t\t$this->retriveDataRow();\r\n\t\treturn $this->data['id_budynku_koncowego'];\r\n\t}",
"final function velcom(){\n }",
"function cetakPenjualan($id_penjualan)\n {\n // $result = $this->db->query($_query);\n // return $result;\n $builder = $this->db->table('trx_penjualan');\n $builder->select('*');\n $builder->where('kd_trx_penjualan', $id_penjualan);\n $query = $builder->get();\n return $query;\n }",
"public function traerCualquiera()\n {\n }",
"public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }",
"public function tratarDados(){\r\n\t\r\n\t\r\n }",
"public function contrato()\r\n\t{\r\n\t}",
"public function getOdmitnuteClanky(){\n $sth = $this->db->prepare(\"SELECT * FROM PRISPEVKY\n WHERE stav LIKE 'odmítnuto'\");\n $sth->execute();\n $data = $sth->fetchAll();\n return $data;\n }",
"function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}",
"public function masodik()\n {\n }",
"public function tampilDataGalang(){\n\t\t\n\t}",
"public function accueil()\n {\n }",
"public function valordelospasajesplus();",
"public function boleta()\n\t{\n\t\t//\n\t}",
"public static function Znevalidni_kolize_ucastnika_vsechny($iducast) {\r\n//echo \"<hr><br>*Znevalidnuji vsechny kolize ucastnika , formular=\" . $formular;\r\n \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n //vyberu vsechny ulozene kolize z tabulky uc_kolize_table\r\n $query= \"SELECT * FROM uc_kolize_table \" .\r\n \"WHERE id_ucastnik=\" . $iducast . \" and uc_kolize_table.valid\" ;\r\n\r\n //echo \"<br>*dotaz na kolize v Znevalidni_kolize_ucastnika: \" . $query;\r\n \r\n $sth = $dbh->prepare($query);\r\n $succ = $sth->execute(); \r\n while($zaznam_kolize = $sth->fetch(PDO::FETCH_ASSOC)) {\r\n //echo \"<br>*Znevalidnuji kolizi: \" . $zaznam_kolize[id_uc_kolize_table];\r\n \r\n $query1 = \"UPDATE uc_kolize_table SET \" .\r\n \"valid=0 WHERE uc_kolize_table.id_uc_kolize_table=\" . $zaznam_kolize['id_uc_kolize_table'] ;\r\n $data1= $dbh->prepare($query1)->execute(); \r\n }\r\n \r\n//echo \"<hr>\";\r\n}",
"public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }",
"public function extra_voor_verp()\n\t{\n\t}",
"function verifica_caja_virtual($acceso,$id_pd=''){\n\t$ini_u = 'AA';\n\t$fecha= date(\"Y-m-d\");\n\t$id_caja='BB001';\n\t$id_persona='BB00000001';\n\t$id_est='BB001';\n\t$apertura_caja=date(\"H:i:s\");\n\t$status_caja='ABIRTA';\n\t$acceso->objeto->ejecutarSql(\" select id_caja_cob from caja_cobrador where fecha_caja='$fecha' and id_caja='$id_caja' and id_persona='$id_persona' and id_est='$id_est'\");\n\tif($row=row($acceso)){\n\t\t$id_caja_cob=trim($row[\"id_caja_cob\"]);\n\t}else{\n\t\t$acceso->objeto->ejecutarSql(\"select * from caja_cobrador where (id_caja_cob ILIKE '$ini_u%') ORDER BY id_caja_cob desc\"); \n\t\t$id_caja_cob = $ini_u.verCodLong($acceso,\"id_caja_cob\");\n\n\t\t$acceso->objeto->ejecutarSql(\"insert into caja_cobrador(id_caja_cob,id_caja,id_persona,fecha_caja,apertura_caja,status_caja,id_est,fecha_sugerida) values ('$id_caja_cob','$id_caja','$id_persona','$fecha','$apertura_caja','$status_caja','$id_est','$fecha')\");\n\t\t$acceso->objeto->ejecutarSql(\"Update caja Set status_caja='Abierta' Where id_caja='$id_caja'\");\n\t}\n\treturn $id_caja_cob;\n}",
"public function Zapis_vsechny_kolize_v_zaveru_formulare ($pole, $idcka_skolizi, $iducast, $formular){\r\n //zapise kolize formulare \r\n self::Zapis_kolize_formulare($pole,$idcka_skolizi, $iducast, $formular);\r\n //-----------------------------------------------------------------------------\r\n \r\n \r\n //a zjisti a zapise kolize ucastnika pro vsechny formulare \r\n $vsechny_kolize_ucastnika_pole = self::Najdi_kolize_vsechny($iducast);\r\n //echo \"<br>**Vsechny kolize_pole v Zapis_vsechny_kolize..... **\";\r\n //var_dump($vsechny_kolize_ucastnika_pole);\r\n \r\n //znevalidneni vsech kolizi pro ucastnika \r\n self::Znevalidni_kolize_ucastnika_vsechny($iducast);\r\n foreach($vsechny_kolize_ucastnika_pole as $jedna_kolize){\r\n if ($jedna_kolize->kolize_nastala) {\r\n $jedna_kolize->Zapis_jednu_kolizi();\r\n } \r\n }\r\n \r\n}",
"function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}",
"function moviextranjeros($ejer,$poli){\n\t\t\t$sql=$this->query(\"select m.*,c.manual_code from cont_polizas p,cont_movimientos m,cont_accounts c,cont_config con\n\t\t\twhere m.IdPoliza=p.id and m.Cuenta=c.`account_id` and c.currency_id!=1 and m.Activo=1 and c.main_father!=con.CuentaBancos\n\t\t\t and p.idejercicio=\".$ejer.\" and p.id=\".$poli);\n\t\t\t \n\t\t\treturn $sql;\n\t\t\t\n\t\t}",
"public function danh_sach_chucdanh(){\n\t\t//khai bao bien $db thành biến toàn cục để sử dụng bên trong class\n\t\tglobal $db;\n\t\t//truyền chuỗi sql để thực hiện truy vấn, kết quả trả về một biens object\n\t\t$result= mysqli_query($db,\"select * from chucdanh\");\n\t\t//duyet qua cac phan tu cua result, moi value duyet qua se duoc gan vao array\n\t\t$arr=array();\n\t\twhile($rows=mysqli_fetch_object($result))\n\t\t\t$arr[]=$rows;\n\t\treturn $arr;\n\t}",
"function hitungDenda(){\n\n return 0;\n }",
"public static function Najdi_kolize_pro_formular_dosud_nezavolane ($iducast, $formular, $pole_id_volanych ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ; //to jsou vsechny pro formular\r\n \r\n //ty, co uz volal, z pole vypustit\r\n $kolize_pole_redukovane = array();\r\n \r\n foreach ($kolize_pole as $kprvek) {\r\n if ( in_array( $kprvek->id_s_typ_kolize_FK, $pole_id_volanych) ) {\r\n }\r\n else {\r\n array_push ($kolize_pole_redukovane, $kprvek ); //$kprvek->id_s_typ_kolize_FK);\r\n } \r\n }\r\n \r\n return $kolize_pole_redukovane; \r\n}",
"function cuentabancos(){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,c.description,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=2 \n\t\t\tand c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3 and m.TipoMovto not like '%M.E%'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 group by m.Cuenta\n\t\t\t\");\n\t\t\treturn $sql;\n\t\t}",
"function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\t$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}",
"public function linea_colectivo();",
"public function elso()\n {\n }",
"function Cuerpo($acceso,$desde,$hasta,$id_f)\n\t{\n\t\t\n\t\t$tipo=utf8_decode($tipo);\n\t\t$this->SetFont('Arial','B',9);\n\t\t\n\t\t$acceso1=conexion();\n\t\t\n\t\t\n\t\t//$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t$this->SetDrawColor(0,0,0);\n\t\t$this->SetLineWidth(.2);\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t$w=array(20,20,25);\t\n\t$col=5;\n\t$right=10;\n\t$alto=49;\t\n\t\t$this->SetX($right);\n\t\t\t\n\t\t$this->SetX($right);\n\t\t\t$this->SetFont('Arial','BIU',8);\n\t\t\t$this->Cell($right,6,strtoupper(_('ingresos cobrados por franquicia')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln(12);\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',7);\n\t\t\t\t$this->Cell($w[0],7,\"\",\"LRB\",0,\"L\");\n\t\t\t\t$der=15;\n\t\t\t\t$this->RotatedText($der, $alto, \"FECHA\", 25);\n\t\t\t\t$der=$der+$w[1];\n\t\t\t\t$dato=lectura($acceso,\"SELECT *FROM franquicia order by nombre_franq\");\n\t\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t\t$nombre_franq=trim($dato[$j][\"nombre_franq\"]);\n\t\t\t\t\t$this->RotatedText($der, $alto, $nombre_franq, 25);\n\t\t\t\t\t$der=$der+$w[1];\n\t\t\t\t\t$this->Cell($w[1],7,\"\",\"LRB\",0,\"C\");\n\t\t\t\t}\n\t\t\t\t$der=$der+5;\n\t\t\t\t$this->RotatedText($der, $alto, \"TOTAL\", 25);\n\t\t\t\t$this->Cell($w[2],7,\"\".\" \",\"LRB\",0,\"C\");\n\t\t\n\t\t\t$this->Ln(7);\n\t\t\n\t\t\t$sum_total=array();\n\t\t\t$sum_t=0;\n\twhile(comparaFecha($desde,$hasta)<=0){\n\t\t//ECHO \"SELECT sum(monto_pago) as monto FROM pagos where fecha_pago='$desde' \";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT monto_pago as monto FROM pagos where fecha_pago='$desde' and pagos.id_caja_cob<>'EA00000001' limit 1 \");\n\t\t$row=row($acceso);\n\t\t$monto=trim($row[\"monto\"])+0;\n\t\t$cant=trim($row[\"cant\"])+0;\n\t\t\n\t\t\n\t if($monto>0){\n\t\t$wi=0;\n\t\t$j=0;\n\t\t$suma=0;\n\t\t$suma_m=0;\n\t\t$this->SetX(10);\n\t\t//list($ano,$mes,$dia)=explode(\"-\",$desde);\n\t\t$fecha=$desde;\n\t\t$dia=formatofecha($desde);\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->Cell($w[$wi],$col,$dia,\"LR\",0,\"C\",$fill);\n\t\t$wi++;\n\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$sum_t=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago='$fecha' and status_pago='PAGADO' and id_franq='$id_franq' and pagos.id_caja_cob<>'EA00000001' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago=trim($row[\"monto_pago\"])+0;\n\t\t\t\t$sum_total[$j]+=$monto_pago;\n\t\t\t\t$sum_t+=$monto_pago;\n\t\t\t\t$this->Cell($w[$wi],$col,number_format($monto_pago+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$sum_total[$j]+=$sum_t;\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell($w[2],$col,number_format($sum_t+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t$fill=!$fill;\n\t\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t}//if monto\t\n\t\t$desde=sumadia($desde);\n\t\t\t\n\t}\n\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell($w[0],7,\"TOTAL\",\"1\",0,\"R\",$fill);\n\t\t\t$sum_to=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t//$sum_to+=$sum_total[$j];\n\t\t\t\t$this->Cell($w[1],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->SetFont('Arial','B',10);\n\t\t\t$this->Cell($w[2],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\n\t}",
"public function hapus_toko(){\n\t}",
"public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }",
"public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\n}",
"public function setVendedor($nome,$comissao){\n try{\n $x = 1;\n $Conexao = Conexao::getConnection();\n $query = $Conexao->prepare(\"INSERT INTO vendedor (nome,comissao) VALUES ('$nome',$comissao)\"); \n $query->execute(); \n // $query = $Conexao->query(\"DELETE FROM vendedor WHERE id_vendedor = (SELECT top 1 id_vendedor from vendedor order by id_vendedor desc)\"); \n // $query->execute();\n return 1;\n\n }catch(Exception $e){\n echo $e->getMessage();\n return 2;\n exit;\n } \n }",
"function Hasil_pencarian($cek,$tempprodi) {\n\t\t\n\t\t//D_TIMAJAR2013 (KD_KELAS, KD_DOSEN)\n\t\t\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.NM_DOSEN, B.NM_DOSEN_F FROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C WHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%\".$cek.\"%')) OR B.KD_DOSEN LIKE '%\".$cek.\"%') AND (A.KD_PRODI IN ('\".$tempprodi.\"'))\")->result_array();\n\t\t\n\t\t\n\t\t/* $out_kd_prodi = $this->db->query(\"SELECT DISTINCT D.KD_PRODI FROM SIA.V_KELAS D, SIA.D_TIMAJAR2013 E WHERE D.KD_KELAS = E.KD_KELAS(+) AND E.KD_DOSEN = '\".$cek.\"'\")->result_array();\n\t\tif(!empty($out_kd_prodi)){\n\t\t\tfor($i=0; $i<count($out_kd_prodi); $i++){\n\t\t\t\tif($i==0) $kd_prodi_b[0] = $out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t\t$kd_prodi_b[0] .= \"','\".$out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t}\n\t\t}else{\n\t\t\t$kd_prodi_b[0] = '';\n\t\t}\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.KD_PRODI, B.NM_DOSEN\n\t\t\t\t\t\t\t\t\tFROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C \n\t\t\t\t\t\t\t\t\tWHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%$cek%')) OR B.KD_DOSEN = '\".$cek.\"') AND (A.KD_PRODI IN ('$tempprodi') OR A.KD_PRODI IN ('\".$kd_prodi_b[0].\"'))\")->result_array(); */\n\t\treturn $hp;\n }",
"function aggiungiCatastoUrbano($pratica,$ct){\n $dbh=new PDO(DSN);\n $schema=\"pe\";\n $params = Array(\"foglio\",\"mappale\",\"sub\");\n foreach($params as $key){\n $data[$key]=($ct[$key])?($ct[$key]):(null);\n }\n $data[\"pratica\"]=$pratica;\n utils::debug(utils::debugDir.\"aggiungiTerreni.debug\", $data);\n $result=Array();\n $sql=\"INSERT INTO $schema.curbano(pratica,foglio,mappale,sub) VALUES(:pratica,:foglio,:mappale,:sub);\";\n $stmt=$dbh->prepare($sql);\n \n if (!$stmt->execute($data)){\n $errors=$stmt->errorInfo();\n utils::debug(utils::debugDir.\"error-aggiungiUrbano.debug\", $errors);\n }\n else{\n $idpartic=$dbh->lastInsertId(\"pe.curbano_id_seq\");\n }\n \n if ($errors){\n //$dbh->rollBack();\n $result=Array(\"success\"=>\"-1\",\"message\"=>$errors[2]);\n }\n else{\n $result = Array(\"success\"=>1,\"message\"=>\"OK\",\"idpartic\"=>$idpartic);\n }\n return $result;\n}",
"public function getJadwalDimulai();",
"public function obtenerViajesplus();",
"function aggiungiAllegato($pratica,$documento){\n \n}",
"public function actionPorodicni_vikend()\n\t{\n\t $this->getLang();\n\t\t$this->base('porodicni_vikend');\n $this->naslovStranice = 'Porodicni Vikend';\n\t\t$this->render('clanak');\n \n\t}",
"function divorced() \n { \n $this->marsta_id=\"D\";\n $this->marsta_name=\"Divorced\";\n return($this->marsta_id);\n }",
"function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}",
"public function estVivant(){\n\n }",
"function voirCommandeDomicileenLivraison(){\n\t$conditions = array();\n\tarray_push($conditions, array('nameChamps'=>'modeLivraison','type'=>'=','name'=>'modeLivraison','value'=>'1'));\n\tarray_push($conditions, array('nameChamps'=>'statutCommande','type'=>'=','name'=>'statutCommande','value'=>'2'));\n\t$req = new myQueryClass('commande',$conditions);\n\t$r = $req->myQuerySelect();\n\treturn $r;\n}",
"public function pretragaIdeja(){\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $korisnik= $this->request->getVar(\"pretraga\");\n $ideje=$idejaModel->dohvati_ideje_po_korisnickom_imenu($korisnik);\n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data);\n }",
"public function NuevoCapacidad() {\r\n\t$nuevo = \"SELECT co_capacidad FROM tr012_capacidad\r\n\t\tORDER BY co_capacidad DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }",
"function cargarDatosVotante($idactual){\n $sql=\"SELECT correovotante,nombrevotante,apellidovotante FROM votante WHERE idvotante=$idactual;\";\n\t\t\treturn $sql;\n }",
"public function HienThiBinhLuan0(){\n\t\t$this->db->where('KichHoat', '0');\n\t\treturn $this -> db -> get('b_cmt');\n\t}",
"public function v_pesbaru()\r\n\t\t{\r\n\t\t\t$sql = \"SELECT a.id_permintaan,a.nota_minta,a.tgl_minta,b.nm_bagian,a.ket_minta,a.selesai_minta FROM tbl_permintaan as a join tbl_bagian as b on a.id_bagian=b.id_bagian where a.selesai_minta != 'Y' order by a.tgl_minta asc\";\r\n\t\t\t$data = $this->db->query($sql);\r\n\t\t\treturn $data->result();\r\n\t\t}",
"public static function Najdi_kolize_pro_formular ($iducast, $formular ) {\r\n $query= \"SELECT * FROM s_typ_kolize WHERE formular='\" . $formular . \"' and valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n //echo(\"<br>\" . $formular . \"<br>\");\r\n //var_dump ($kolize_pole);\r\n return $kolize_pole; \r\n}",
"function ambil_proyek_dpp()\n\t{\n\t\t$sql=\"SELECT * FROM irena_view_sbsn_proyek_dpp\";\n\t\treturn $this->db->query($sql);\n\t}",
"function alarma_ezabatu($pId){\n\t\tinclude 'konexioa.inc';\n\t\tmysql_select_db($datuBasea,$link);\n\t\t$query=\"DELETE FROM `Alarma` WHERE `idalarma`=\\\"$pId\\\"\";\n\t\t$emaitza=mysql_query($query,$link);\n\t\tif(mysql_affected_rows()==1){\n\t\t\t$queryErab_alarma=\"DELETE FROM `Erab_alarma` WHERE `idalarma`=\\\"$pId\\\"\";\n\t\t\t$emaErab_alarma=mysql_query($queryErab_alarma,$link);\n\t\t\tif(mysql_affected_rows()>=1){\n\t\t\t\t$querySentsore=\"DELETE FROM `Sentsore` WHERE `jalarma`=\\\"$pId\\\"\";\n\t\t\t\t$emaSentsore=mysql_query($querySentsore,$link);\n\t\t\t\tif(mysql_affected_rows()>=1){\n\t\t\t\t\treturn 1;\n\t\t\t\t\t/*sentsoreren bat ere ezabatua*/\n\t\t\t\t}else{\n\t\t\t\t\treturn 1;\n\t\t\t\t\t/*sentsorerik ez du ezabatu baino alarma bai*/\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t\t/*Erab_Alarma loturak ez dira ezabatu*/\n\t\t\t}\n\t\t}else{\n\t\t\treturn 0;\n\t\t\t/*ez da Alarma ezabatu*/\n\t\t}\n\t}",
"function PropiedadFull($id_prop){\r\n\trequire_once(\"clases/class.propiedadBSN.php\");\r\n\t$prop = new PropiedadBSN();\r\n\t$prop->cargaById($id_prop);\r\n\t$colec=$prop->getObjetoView();\r\n\t$arraycarac=ListarDatosPropiedad($id_prop);\r\n $result = array(\r\n\t\t'id_prop'\t\t=> $colec['id_prop'],\r\n\t\t'id_zona'\t\t=> $colec['id_zona'],\r\n\t\t'id_loca'\t\t=> $colec['id_loca'],\r\n\t\t'calle'\t\t\t=> $colec['calle'],\r\n\t\t'entre1'\t\t=> $colec['entre1'],\r\n\t\t'entre2'\t\t=> $colec['entre2'],\r\n\t\t'nro'\t\t\t=> $colec['nro'],\r\n\t\t'descripcion'\t=> $colec['descripcion'],\r\n\t\t'id_tipo_prop'\t=> $colec['id_tipo_prop'],\r\n\t\t'subtipo_prop'\t=> $colec['subtipo_prop'],\r\n\t\t'intermediacion'=> $colec['intermediacion'],\r\n\t\t'id_inmo'\t\t=> $colec['id_inmo'],\r\n\t\t'operacion'\t\t=> $colec['operacion'],\r\n\t\t'comentario'\t=> $colec['comentario'],\r\n\t\t'video'\t\t\t=> $colec['video'],\r\n\t\t'piso'\t\t\t=> $colec['piso'],\r\n\t\t'dpto'\t\t\t=> $colec['dpto'],\r\n\t\t'id_cliente'\t=> $colec['id_cliente'],\r\n\t\t'goglat'\t\t=> $colec['goglat'],\r\n\t\t'goglong'\t\t=> $colec['goglong'],\r\n\t\t'activa'\t\t=> $colec['activa'],\r\n\t\t'id_sucursal'\t=> $colec['id_sucursal'],\r\n\t\t'id_emp'\t\t=> $colec['id_emp'],\r\n\t\t'nomedif'\t\t=> $colec['nomedif'],\r\n\t\t'caracteristica'=> $arraycarac\r\n );\r\n\treturn $result;\r\n}",
"function ogretmen_odev_getir ()\n {\n // if($odev=$this->vtb->query($sorgu))\n // {\n // $odevlist = $odev->fetchAll();\n\n // foreach ($odevlist as $o)\n // {\n // echo \"<div class='panel_akis_kutusu'>\".\"<p>\" . $o['odevadi'] . \"</p>\" . \"<p>\" . $o['dersadi'] . \"</p><p>\". $o['dtarih'] . \" \". $o['ttarih'] . \"</p></div>\" ;\n // }\n // }\n $sorgu=new sorgubul(\"select * from seviye_odevleri\",\"dersid\",\"=\",$_SESSION['dersler'],\"0,30\",\"or\");\n $sorgu=$sorgu->sorgu;\n\n if ($odev=$this->vtb->query($sorgu))\n {\n $odevlist = $odev->fetchAll();\n\n foreach ($odevlist as $o)\n {\n if ($a=$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid']) and $b =$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid'] . ' and okundumu = 0') )\n {\n $c = $a->fetchColumn();\n $d = $b->fetchColumn();\n $derssev=$this->vtb->prepare(\"select seviyeno,dersid from ders_seviyeler where seviyeid = ?\");\n $derssev->execute(array($o['seviye']));\n $derssev=$derssev->fetch();\n $ders=$this->vtb->prepare(\"select dersadi from dersler where dersid = ?\");\n $ders->execute(array($o['dersid']));\n $ders=$ders->fetchColumn();\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p style='padding: 10px 0px 0px 100px;float:left;'>\". $c . \" kişi teslim etti,\". $d . \" kişiyi okumadınız</p><a style='margin-left:20px;' class='soruonay' href='ogretmen_ders_goruntuleme.php?dersid=\" . $derssev['dersid'] . \"&seviyeno=\" . $derssev['seviyeno'] . \"&dersadi=\" . $ders .\"'>Kontrol et</a></div></div>\" ;\n\n }\n else\n {\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p>Kimse teslim etmedi</p></div></div>\" ;\n }\n }\n }\n\n }",
"function control_suplente($desde,$hasta,$id_desig_suplente){\n //busco todas las licencias de la designacion que ingresa\n //novedades vigentes en el periodo\n $anio=date(\"Y\", strtotime($desde)); \n $pdia = dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($anio);\n $udia = dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($anio);\n $sql=\"SELECT distinct t_n.desde,t_n.hasta \n FROM novedad t_n\n WHERE t_n.id_designacion=$id_desig_suplente\n and t_n.tipo_nov in (2,3,5)\n and t_n.desde<='\".$udia.\"' and t_n.hasta>='\".$pdia.\"'\"\n . \" ORDER BY t_n.desde,t_n.hasta\"; \n $licencias=toba::db('designa')->consultar($sql);\n $i=0;$seguir=true;$long=count($licencias);$primera=true;\n while(($i<$long) and $seguir){\n if($primera){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n $primera=false;\n }else{\n if($desde>=$licencias[$i]['desde']){\n $a=$licencias[$i]['desde'];\n $b=$licencias[$i]['hasta'];\n }\n if($hasta<=$licencias[$i]['hasta']){\n $seguir=false;\n }\n \n if(($licencias[$i]['desde']==date(\"Y-m-d\",strtotime($b.\"+ 1 days\"))) or ($licencias[$i]['desde']==$b)){\n $b=$licencias[$i]['hasta'];\n }\n }\n $i++;\n }\n if($long>0){\n if($desde>=$a and $hasta<=$b){\n return true;\n }else{\n return false;\n }\n }else{//no tiene novedades\n return false;\n }\n\n// $sql=\"select * from designacion t_d\"\n// . \" INNER JOIN novedad t_n ON (t_d.id_designacion=t_n.id_designacion and t_n.tipo_nov in (2,3,5) )\"\n// . \" where t_d.id_designacion=$id_desig_suplente\"\n// . \" and '\".$desde.\"'>=t_n.desde and '\".$hasta.\"'<=t_n.hasta\";\n// $res=toba::db('designa')->consultar($sql);\n// if(count($res)>0){\n// return true;\n// }else{\n// return false;\n// }\n }",
"function ajustecambiario($periodo,$ejer,$moneda){\n\t\t\t// le kite el periodo and p.idperiodo=\".$periodo.\"\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto,c.manual_code,p.idperiodo\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and p.idejercicio=\".$ejer.\" and c.`main_father`!=conf.CuentaBancos\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 and p.relacionExt!=0 and p.idperiodo<=\".$periodo.\"\n\t\t\tgroup by p.relacionExt,m.TipoMovto\n\t\t\t\");\n\t\t\tif($sql->num_rows>0){\n\t\t\t\treturn $sql;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}",
"public function getPlaca(){ return $this->placa;}",
"function get_ua($id_des){\n $sql=\"select uni_acad from designacion where id_designacion=\".$id_des;\n $res= toba::db('designa')->consultar($sql); \n return $res[0]['uni_acad'];\n }",
"public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }",
"function voirDerniereCommande(){\n\t$order = array();\n\tarray_push($order, array('nameChamps'=>'idCommande','sens'=>'desc'));\n\t$req = new myQueryClass('commande','',$order,'','limit 1');\n\t$r = $req->myQuerySelect();\n\treturn $r[0] ;\n\t}",
"function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}",
"function tiene_dao($id_desig){\n $sql=\"select * from designacion where id_designacion=$id_desig and id_departamento is not null and id_area is not null and id_orientacion is not null\";\n $res=toba::db('designa')->consultar($sql);\n if(count($res)>0){\n return 1;\n }else{\n return 0;\n }\n }",
"public static function cogeCajaChica($id){\n if(is_null(self::model()->find(\"hidcaja=:vhidcaja\",array(\":vhidcaja\"=>$id)))){\n $dcaja= Dcajachica::model()->findByPk($id);\n if(!is_null($dcaja)){\n $regcompra=New Registrocompras('ins_compralocal'); \n $regcompra->setAttributes(\n array(\n 'socio'=>$dcaja->cabecera->fondo->socio,\n 'femision'=>$dcaja->fecha,\n 'numerocomprobante'=>$dcaja->referencia,\n 'razpronombre'=>$dcaja->razon,\n 'hidperiodo'=>yii::app()->periodo->getperiodo(),\n 'tipodocid'=>$dcaja->tipodocid,\n 'numerodocid'=>$dcaja->numdocid,\n 'glosa'=>$dcaja->glosa,\n 'codmon'=>$dcaja->monedahaber,\n 'importe'=>$dcaja->haber,\n 'serie'=>$dcaja->serie,\n 'esservicio'=>$dcaja->esservicio,\n 'tipo'=>$dcaja->codocu,\n 'tipgrabado'=>'1',\n 'hidcaja'=>$dcaja->id,\n )\n );\n $grabo=$regcompra->save();\n //if(!$grabo)\n //print_r(yii::app()->mensajes->getErroresItem($regcompra->geterrors()));\n //die();\n return ($grabo)?$regcompra:null;\n }else{\n return null;\n }\n } \n }",
"public function selektujeObjekat($idObjekta)\n {\n $upit = \"select Tpleme.naziv AS plemeNaziv, Toznaka.*, Toznaka.tekstNatpisa AS natpis, TprovincijaNalaska.naziv AS provincijaNalaska , TgradNalaska.naziv AS gradNalaska, Mesto.naziv AS mestoNalaska , TmodernoImeDrzave.naziv AS modernoImeDrzave , vrstaNatpisa.naziv AS vrstaNatpisa , jezik.naziv AS jezik , Ustanova.naziv AS ustanova, TmodernoMesto.naziv AS modernoMesto FROM (select * from Objekat) Toznaka JOIN (select * from Provincija) TprovincijaNalaska ON Toznaka.provincija = TprovincijaNalaska.id JOIN (select * from Grad) TgradNalaska ON Toznaka.grad = TgradNalaska.id JOIN (select * from ModernaDrzava) TmodernoImeDrzave ON Toznaka.modernaDrzava = TmodernoImeDrzave.id JOIN (select * from ModernoMesto) TmodernoMesto ON Toznaka.modernoMesto = TmodernoMesto.id JOIN (select * from Pleme) Tpleme ON Toznaka.pleme = Tpleme.id LEFT JOIN Mesto ON Toznaka.mesto = Mesto.id LEFT JOIN vrstaNatpisa ON Toznaka.vrstaNatpisa = vrstaNatpisa.id LEFT JOIN jezik ON Toznaka.jezik = jezik.id LEFT JOIN ustanova on Toznaka.ustanova = Ustanova.id where Toznaka.id = :idObjekta \";\n\n $stmt=konekcija::getConnectionInstance()->prepare($upit);\n $stmt->bindParam(':idObjekta', $idObjekta , PDO::PARAM_INT);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $d = $stmt->fetch();\n return $this->obradiVrstaId($d);\n }",
"function ocupa_reserva($id_desig){\n $sql=\"select * from reserva_ocupada_por where id_designacion=\".$id_desig;\n $res= toba::db('designa')->consultar($sql);\n if(count($res)>0){\n return true;\n }else{\n return false;\n }\n }",
"public function correu(){\n echo \" correu !\";\n }",
"public function getCodiceFiscale(){ return $this->codiceFiscale;}",
"public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }",
"public function pendebetan_angsuran_koptel()\n\t{\n\t\t$data['container'] = 'transaction/pendebetan_angsuran_koptel';\n\t\t$data['debet'] = $this->model_transaction->get_data_angsuran();\n\t\t$this->load->view('core',$data);\n\t}",
"public function change()\r\n\t{\r\n\t\t$ins = [];\r\n\t\t$plas = $this->fetchAll('SELECT * FROM tx_platby WHERE cislo IS NOT NULL');\r\n\r\n\t\t$ts = (new \\DateTime('2019-08-31 23:59:59'))->getTimestamp();\r\n\r\n\t\tforeach($plas as $p){\r\n\r\n\t\t\t$dt = new \\DateTime($p['vystaven']);\r\n\r\n\t\t\tif($dt->getTimestamp() <= $ts){\r\n\t\t\t\t$dk = 0.1736;\r\n\t\t\t}else{\r\n\t\t\t\t$dk = 0.17355371900826;\r\n\t\t\t}\r\n\r\n\t\t\t$ins[] = [\r\n\t\t\t\t'platba_id' => $p['platba_id'],\r\n\t\t\t\t'created' => $p['vystaven'],\r\n\t\t\t\t'cislo' => $p['cislo'],\r\n\t\t\t\t'platba' => $p['platba'],\r\n\t\t\t\t'dph_coef' => $dk,\r\n\t\t\t\t'den_zdan_pln' => $p['vystaven']\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\t$this->table('doklady')\r\n\t\t\t->insert($ins)\r\n\t\t\t->save();\r\n\t}",
"function obtener_ventanilla($iddoc)\n{\n $nombreVentanilla = '';\n $Documento = new Documento($iddoc);\n $ventanilla = $Documento->ventanilla_radicacion;\n\n $query = Model::getQueryBuilder();\n $cf_ventanilla = $query\n ->select('nombre')\n ->from('cf_ventanilla')\n ->where('estado=1')\n ->andWhere('idcf_ventanilla = :idSede')\n ->setParameter(':idSede', $ventanilla, \\Doctrine\\DBAL\\Types\\Type::INTEGER)\n ->execute()->fetchAll();\n\n $nombreVentanilla = $cf_ventanilla[0]['nombre'];\n\n return $nombreVentanilla;\n}",
"function constitueCommande($idProd,$idCommande,$qteProd){\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `constitue`(`idProduit`, `idCommande`, `qteProduit`) \n VALUES (:idp,:idc,:qteP);\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':idc', $idCommande);\n $statement->bindParam(':idp', $idProd);\n $statement->bindParam(':qteP', $qteProd);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n\n}",
"function showprodetail($iddm){\n $ssp = \"select * from sp_free_hot where idsp = \".$iddm;\n $ssp.= \" order by idsp asc\";\n\n // code show danhmuc cố định\n $conn = getConnection();\n $stmt = $conn->prepare($ssp);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n return $stmt->fetchAll(); // nguyen 1 danh sach ferchAll\n }",
"private function prehledNavstev(){\n $this->tpl = \"historie-navstev\";\n \n \t$prehled = new HlavniPrehled($this->db);\n \n $this->render = array(\n\t\t\t'navstevy' => $prehled->vypis(@$_POST), \n\t\t);\t\n }",
"function editar_pr_factura(){\n\n\t\t $u = new entrada();\n $u->usuario_id = $GLOBALS['usuarioid'];\n $u->empresas_id = $GLOBALS['empresaid'];\n\t$precio=$_POST['costo_unitario'];\n\t$producto_id=$_POST['cproductos_id'];\n $u->fecha = date(\"Y-m-d H:i:s\");\n $related = $u->from_array($_POST);\n if ($u->id == 0)\n unset($u->id);\n if ($u->save($related)) {\n$this->db->query(\"update cproductos set precio_compra='$precio' where id=$producto_id\");\n echo $u->id;\n } else\n echo 0; \n \n\t}",
"function getAllFromProizvod(){\n\t\treturn $this->ime . \" \" . $this->imeProizvođača . \" \" \n\t\t. $this->prezimeProizvođača . \" \" . $this->cijena;\n\t}",
"static function change($d) {\n $entidad = $d[\"entidad\"];\n $column = $d[\"column\"];\n $value = $d[\"value\"];\n $id = $d[\"id\"];\n\n $e = R::findOne($entidad,\"id = ? AND elim = ?\",[$id,0]);\n if(isset($e[$column])) {\n $e[$column] = $value;\n R::store($e);\n return \"CAMBIO EXITOSO {$entidad}.id: {$id}\";\n } else return \"COLUMNA NO ENCONTRADA\";\n }",
"function ToonFormulierAfspraak()\n{\n\n}",
"public function generujKod(){\n\t\t//\n\t}",
"public function TraerCiudadRiesgo(){\n $sentencia = $this->db->prepare(\"SELECT *FROM ciudad WHERE zona_riesgo=1 \" ); \n $sentencia->execute(); // ejecuta -\n $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $query;\n }",
"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 consultarProyectosCoordinador($cod_proyecto=\"\") {\n $datos['identificacion']= $this->identificacion;\n $datos['cod_proyecto']=$cod_proyecto;\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectosCoordinador\",$datos);\n //echo \"<br>sql proy curr \".$cadena_sql ;\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }",
"public function attaqueJoueur($de){\n\n }",
"public function get_id_poblacion(){ \n return (isset($this->_id_poblacion)) ? $this->_id_poblacion: null;\n}",
"public function truycapvao_private_cha(){\n }",
"function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }",
"public static function posodobiKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n $kolicina = filter_input(INPUT_POST, \"num\", FILTER_SANITIZE_SPECIAL_CHARS);\n\n if ($kolicina < 1) {\n if (PodrobnostiNarocilaDB::delete($podrobnost_narocila[\"id_podrobnosti_narocila\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n } else {\n\n if (PodrobnostiNarocilaDB::edit($podrobnost_narocila[\"id_podrobnosti_narocila\"], $id_artikla, $kolicina, $narocilo[\"id\"])) {\n echo ViewHelper::redirect(BASE_URL . \"kosarica\");\n } else {\n echo(\"Napaka\");\n }\n }\n }",
"public function videPanier()\n {\n $this->CollProduit->vider();\n }",
"function brojNeprocitanih($idNovosti){\n\t\t$veza = konekcija();\n\t\t$upit = $veza->prepare(\"SELECT * From KOMENTAR WHERE novost_id = :id AND PROCITAN = 0\");\n\t\t$upit->bindValue(':id', $idNovosti);\n\t\t$upit->execute();\n\t\treturn $upit->rowCount();\n\t}",
"function dodajKorisnika(Korisnik $k);",
"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}"
] | [
"0.67696047",
"0.6603877",
"0.64166373",
"0.63255084",
"0.62057585",
"0.6201147",
"0.61908066",
"0.61804223",
"0.61725456",
"0.61657244",
"0.6164894",
"0.616436",
"0.60838443",
"0.6070053",
"0.60449684",
"0.60445213",
"0.60096365",
"0.59895116",
"0.5977189",
"0.59762317",
"0.5968848",
"0.59503585",
"0.59422475",
"0.59381354",
"0.5925116",
"0.59244895",
"0.59232736",
"0.5913975",
"0.5910768",
"0.5905977",
"0.5900202",
"0.58841336",
"0.5882603",
"0.58710366",
"0.58590806",
"0.5854968",
"0.5841126",
"0.58360964",
"0.5831969",
"0.5831366",
"0.5827632",
"0.5824278",
"0.58175236",
"0.580756",
"0.5803169",
"0.57965",
"0.5786018",
"0.576795",
"0.5762917",
"0.57602406",
"0.5758042",
"0.574939",
"0.57482624",
"0.57434404",
"0.5742857",
"0.5740195",
"0.5728028",
"0.57244563",
"0.57207346",
"0.5715822",
"0.5713351",
"0.57120115",
"0.57054",
"0.570042",
"0.5700414",
"0.5694362",
"0.5693643",
"0.56932104",
"0.5691799",
"0.5690022",
"0.56867176",
"0.5682041",
"0.56787795",
"0.5678144",
"0.5677778",
"0.56757534",
"0.56732106",
"0.56691664",
"0.56645787",
"0.5664193",
"0.5662889",
"0.5661378",
"0.56502956",
"0.5644927",
"0.56432164",
"0.56407887",
"0.5639199",
"0.5639002",
"0.5632645",
"0.562629",
"0.56213343",
"0.5620386",
"0.5618272",
"0.56172365",
"0.5614214",
"0.56137407",
"0.5608818",
"0.5606154",
"0.560059",
"0.5600272",
"0.55929035"
] | 0.0 | -1 |
vypocte cenu s DPH | public function calculate_price_with_vat($price_without_vat, $vat_rate = FALSE)
{
if ($this->loaded()) {
$coeff = $this->coefficient_with_vat;
}
else {
$coeff = round($vat_rate->value / 100, 2);
}
$vat = $price_without_vat * $coeff;
return round($price_without_vat + $vat, 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AggiornaPrezzi(){\n\t}",
"final function velcom(){\n }",
"public function hapus_toko(){\n\t}",
"public function extra_voor_verp()\n\t{\n\t}",
"public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}",
"public function valorpasaje();",
"function ambil_proyek_dpp()\n\t{\n\t\t$sql=\"SELECT * FROM irena_view_sbsn_proyek_dpp\";\n\t\treturn $this->db->query($sql);\n\t}",
"public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }",
"public function elso()\n {\n }",
"public function getChapeau();",
"public function getOdmitnuteClanky(){\n $sth = $this->db->prepare(\"SELECT * FROM PRISPEVKY\n WHERE stav LIKE 'odmítnuto'\");\n $sth->execute();\n $data = $sth->fetchAll();\n return $data;\n }",
"public function traerCualquiera()\n {\n }",
"public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }",
"public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }",
"abstract public function getPasiekimai();",
"public function actionPorodicni_vikend()\n\t{\n\t $this->getLang();\n\t\t$this->base('porodicni_vikend');\n $this->naslovStranice = 'Porodicni Vikend';\n\t\t$this->render('clanak');\n \n\t}",
"public function truycapvao_private_cha(){\n }",
"function hieu($p_tuso, $p_mauso)\n {\n $ps = new PHAN_SO();\n $ps->khoitao_ps($p_tuso, $p_mauso);\n $ps->tuso = ($this->tuso*$ps->mauso) - ($ps->tuso*$this->mauso);\n $ps->mauso = $this->mauso*$ps->mauso;\n // $ps->toigian_ps();\n return $ps;\n }",
"public function elaqe(){\n $this->protect();\n\t$cavab=$this->dtbs->cedvel('elaqe');\n\t$data['melumat']=$cavab;\n\t$this->load->view('back/elaqe/anasehife',$data);\n}",
"public function masodik()\n {\n }",
"public function estVivant(){\n\n }",
"public function boleta()\n\t{\n\t\t//\n\t}",
"public function haqqimizda(){\n $this->protect();\n\t$cavab=$this->dtbs->cedvel('haqqimizda');\n\t$data['melumat']=$cavab;\n$this->load->view('back/haqqimizda/anasehife',$data);\n\n}",
"public function sosial(){\n $this->protect();\n$cavab=$this->dtbs->cedvel('sosial');\n$data['melumat']=$cavab;\n$this->load->view('back/sosial/anasehife',$data);\n}",
"public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }",
"public function HienThiBinhLuan0(){\n\t\t$this->db->where('KichHoat', '0');\n\t\treturn $this -> db -> get('b_cmt');\n\t}",
"function verifica_caja_virtual($acceso,$id_pd=''){\n\t$ini_u = 'AA';\n\t$fecha= date(\"Y-m-d\");\n\t$id_caja='BB001';\n\t$id_persona='BB00000001';\n\t$id_est='BB001';\n\t$apertura_caja=date(\"H:i:s\");\n\t$status_caja='ABIRTA';\n\t$acceso->objeto->ejecutarSql(\" select id_caja_cob from caja_cobrador where fecha_caja='$fecha' and id_caja='$id_caja' and id_persona='$id_persona' and id_est='$id_est'\");\n\tif($row=row($acceso)){\n\t\t$id_caja_cob=trim($row[\"id_caja_cob\"]);\n\t}else{\n\t\t$acceso->objeto->ejecutarSql(\"select * from caja_cobrador where (id_caja_cob ILIKE '$ini_u%') ORDER BY id_caja_cob desc\"); \n\t\t$id_caja_cob = $ini_u.verCodLong($acceso,\"id_caja_cob\");\n\n\t\t$acceso->objeto->ejecutarSql(\"insert into caja_cobrador(id_caja_cob,id_caja,id_persona,fecha_caja,apertura_caja,status_caja,id_est,fecha_sugerida) values ('$id_caja_cob','$id_caja','$id_persona','$fecha','$apertura_caja','$status_caja','$id_est','$fecha')\");\n\t\t$acceso->objeto->ejecutarSql(\"Update caja Set status_caja='Abierta' Where id_caja='$id_caja'\");\n\t}\n\treturn $id_caja_cob;\n}",
"private function gen_provSQL() {\n\t\t\t$this -> Retun_val = true;\n\t\t}",
"public function HienThiDmsp(){\n\n\t\treturn $this -> db -> get('b_dmsp');\n\t}",
"private function prehledNavstev(){\n $this->tpl = \"historie-navstev\";\n \n \t$prehled = new HlavniPrehled($this->db);\n \n $this->render = array(\n\t\t\t'navstevy' => $prehled->vypis(@$_POST), \n\t\t);\t\n }",
"public function contrato()\r\n\t{\r\n\t}",
"function showprodetail($iddm){\n $ssp = \"select * from sp_free_hot where idsp = \".$iddm;\n $ssp.= \" order by idsp asc\";\n\n // code show danhmuc cố định\n $conn = getConnection();\n $stmt = $conn->prepare($ssp);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n return $stmt->fetchAll(); // nguyen 1 danh sach ferchAll\n }",
"function Hasil_pencarian($cek,$tempprodi) {\n\t\t\n\t\t//D_TIMAJAR2013 (KD_KELAS, KD_DOSEN)\n\t\t\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.NM_DOSEN, B.NM_DOSEN_F FROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C WHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%\".$cek.\"%')) OR B.KD_DOSEN LIKE '%\".$cek.\"%') AND (A.KD_PRODI IN ('\".$tempprodi.\"'))\")->result_array();\n\t\t\n\t\t\n\t\t/* $out_kd_prodi = $this->db->query(\"SELECT DISTINCT D.KD_PRODI FROM SIA.V_KELAS D, SIA.D_TIMAJAR2013 E WHERE D.KD_KELAS = E.KD_KELAS(+) AND E.KD_DOSEN = '\".$cek.\"'\")->result_array();\n\t\tif(!empty($out_kd_prodi)){\n\t\t\tfor($i=0; $i<count($out_kd_prodi); $i++){\n\t\t\t\tif($i==0) $kd_prodi_b[0] = $out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t\t$kd_prodi_b[0] .= \"','\".$out_kd_prodi[$i]['KD_PRODI'];\n\t\t\t}\n\t\t}else{\n\t\t\t$kd_prodi_b[0] = '';\n\t\t}\n\t\t$hp = $this->db->query(\"SELECT DISTINCT B.KD_DOSEN, B.KD_PRODI, B.NM_DOSEN\n\t\t\t\t\t\t\t\t\tFROM SIA.V_KELAS A, SIA.V_DOSEN B, SIA.D_TIMAJAR2013 C \n\t\t\t\t\t\t\t\t\tWHERE A.KD_KELAS = C.KD_KELAS AND C.KD_DOSEN = B.KD_DOSEN AND (UPPER(B.NM_DOSEN) LIKE (UPPER ('%$cek%')) OR B.KD_DOSEN = '\".$cek.\"') AND (A.KD_PRODI IN ('$tempprodi') OR A.KD_PRODI IN ('\".$kd_prodi_b[0].\"'))\")->result_array(); */\n\t\treturn $hp;\n }",
"function cuentabancos(){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,c.description,c.manual_code\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=2 \n\t\t\tand c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3 and m.TipoMovto not like '%M.E%'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 group by m.Cuenta\n\t\t\t\");\n\t\t\treturn $sql;\n\t\t}",
"function cl_escolabase() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolabase\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"].\"?ed77_i_escola=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"].\"&ed18_c_nome=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed18_c_nome\"].\"&ed31_c_descr=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed31_c_descr\"].\"&ed77_i_base=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]);\n }",
"public function danh_sach_chucdanh(){\n\t\t//khai bao bien $db thành biến toàn cục để sử dụng bên trong class\n\t\tglobal $db;\n\t\t//truyền chuỗi sql để thực hiện truy vấn, kết quả trả về một biens object\n\t\t$result= mysqli_query($db,\"select * from chucdanh\");\n\t\t//duyet qua cac phan tu cua result, moi value duyet qua se duoc gan vao array\n\t\t$arr=array();\n\t\twhile($rows=mysqli_fetch_object($result))\n\t\t\t$arr[]=$rows;\n\t\treturn $arr;\n\t}",
"public function nadar()\n {\n }",
"public function jalan() {\n echo \"method jalan() berisi : Hewan ini terbang\";\n }",
"function Uzasadnienie($dbh, $un, $ud, $up, $roszczenia, $no)\r\n\t\t\t{\r\n\t\t\t\t$uzasadnienie=\"Powodowie prowadzą działalność gospodarczą pod nazwą NETICO Spółka Cywilna M.Borodziuk, M.Pielorz, K.Rogacki. Powodowie dnia $ud zawarli z Pozwanym(ą) umowę abonencką nr $un o świadczenie usług telekomunikacyjnych.\\n Termin płatności został określony w Umowie do $up dnia danego miesiąca. \\n Za świadczone usługi w ramach prowadzonej przez siebie działalności gospodarczej Powodowie wystawili Pozwanemu(ej) następujące faktury VAT:\\n \";\r\n\t\t\t\t\r\n\t\t\t\t$n=1;\r\n\t\t\t\t$suma=0;\r\n\t\t\t\tforeach ($roszczenia as $n => $v)\r\n\t\t\t\t{\r\n\t\t\t\t\t$oznaczenie=$roszczenia[$n][\"oznaczenie\"];\r\n\t\t\t\t\t$kwota=$roszczenia[$n][\"wartosc\"];\r\n\t\t\t\t\t$pozostalo=$roszczenia[$n][\"pozostalo\"];\r\n\t\t\t\t\t$d=$n;\r\n\t\t\t\t $kwota=number_format(round($kwota,2), 2,',','');\r\n\t\t\t\t\tif ( $pozostalo>0)\r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t$suma+=$pozostalo;\r\n\t\t\t\t\t\t\t$pozostalo=number_format($pozostalo, 2,',','');\r\n\t\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł, pozostało do zapłaty $pozostalo zł. \\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/*\t\r\n\t\t\t\tif (!empty($no))\r\n\t\t\t\t{\r\n\t\t\t\t\t$uzasadnienie.=\"W zwiazku z nie regulowaniem przez Pozwanego(ą) płatności wynikających z warunków Umowy Powodowie rozwiązali Umowę i wystawili Pozwanemu(ej) następujące noty obciążaniowe: \";\r\n\t\t\t\t\t$n=1;\r\n\t\t\t\t\tforeach ($no as $n => $v)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$oznaczenie=$no[$n][\"oznaczenie\"];\r\n\t\t\t\t\t\t$kwota=$no[$n][\"wartosc\"];\r\n\t\t\t\t\t\t$d=$n;\r\n\t\t\t\t\t\t$kwota=number_format($kwota,2), 2,',','');\r\n\t\t\t\t\t\t$uzasadnienie.=\"$oznaczenie na kwotę $kwota zł; \\n\";\r\n\t\t\t\t\t\t$suma+=$kwota;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\t$suma=number_format(round($suma,2), 2,',','');\r\n\t\t\t\t$uzasadnienie.=\"Razem $suma zł.\\n\";\r\n\t\t\t\t$uzasadnienie.=\"Pomimo wezwań do zapłaty Pozwany(a) nie uregulował należności.\";\r\n\t\t\t\treturn($uzasadnienie);\r\n\t\t\t}",
"public function pregledtudjegpredv() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $trenprikaz='prikazprofpredv_admin'; \n $username=$this->request->uri->getSegment(3);\n $korisnikModel=new KorisnikModel();\n $data['user']=$korisnikModel->dohvati_korisnika($username);\n if(($data['user']->Username)==($this->session->get('korisnik')->Username)) {$data['user']=$this->session->get('korisnik'); $trenprikaz='profilkorisnikpredvidjanja'; }\n $predvidjanjeModel=new PredvidjanjeModel();\n $predvidjanja=$predvidjanjeModel->dohvati_predvidjanja_po_korisnickom_imenu($data['user']->Username);\n $data['predvidjanja']=$predvidjanja;\n $this->prikaz($trenprikaz, $data);\n }",
"function moviextranjeros($ejer,$poli){\n\t\t\t$sql=$this->query(\"select m.*,c.manual_code from cont_polizas p,cont_movimientos m,cont_accounts c,cont_config con\n\t\t\twhere m.IdPoliza=p.id and m.Cuenta=c.`account_id` and c.currency_id!=1 and m.Activo=1 and c.main_father!=con.CuentaBancos\n\t\t\t and p.idejercicio=\".$ejer.\" and p.id=\".$poli);\n\t\t\t \n\t\t\treturn $sql;\n\t\t\t\n\t\t}",
"public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }",
"function budynekKoncowy(){\r\n\t\t$this->retriveDataRow();\r\n\t\treturn $this->data['id_budynku_koncowego'];\r\n\t}",
"public function tampilDataGalang(){\n\t\t\n\t}",
"public function ayarlar(){\n $this->protect();\n\t$cavab=$this->dtbs->cedvel('umumi_ayarlar');\n\t$data['melumat']=$cavab;\n\t$this->load->view('back/ayarlar/anasehife',$data);\n}",
"function iptsr_internal_deb($debata_id) {\n\t$rocnik = cpdb_fetch_one_value(\"select rocnik from debata left join soutez using (soutez_ID) where debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id));\n\t\n\t$status = true;\n\tcpdb_transaction();\n\t\n\t// vycistit\n\t$status &= cpdb_exec(\"delete from clovek_debata_ibody where debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id));\n\t\n\t// --- debateri\n\t// (podle poharovych bodu)\n\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) select clovek_debata.clovek_ID, clovek_debata.debata_ID, :rocnik, 'debater', debata_tym.body * 0.1 from clovek_debata left join debata_tym on clovek_debata.debata_ID = debata_tym.debata_ID and substring(clovek_debata.role,1,1) = elt(debata_tym.pozice + 1,'n','a') where clovek_debata.debata_ID = :debata_id and find_in_set(clovek_debata.role,'a1,a2,a3,n1,n2,n3')\", array(\":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik));\n\t\t\n\t// --- rozhodci\n\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) select clovek_ID, debata_ID, :rocnik, 'rozhodci', 1 from clovek_debata where debata_ID = :debata_id and role = 'r'\", array(\":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik));\n\t\n\t// --- treneri\n\t$treneri_dostanou = array();\n\t\n\tif (cpdb_fetch_all(\"select clovek_ID, ibody from clovek_debata_ibody where debata_ID = :debata_id and role = 'debater'\", array(\":debata_id\"=>$debata_id), $debateri)) {\n\t\tforeach ($debateri as $debater) {\n\t\t\t$pocet_treneru = cpdb_fetch_all(\"\n\t\t\t\tselect\n\t\t\t\t\tdk.clovek_ID as clovek_ID\n\t\t\t\tfrom\n\t\t\t\t\tclovek d, clovek_klub dk\n\t\t\t\twhere\n\t\t\t\t\td.clovek_ID = :clovek_ID\n\t\t\t\t\tand d.klub_ID = dk.klub_ID\n\t\t\t\t\tand dk.role = 't'\n\t\t\t\t\tand dk.rocnik = :rocnik\n\t\t\t\t\", array(\":clovek_ID\"=>$debater[\"clovek_ID\"], \":rocnik\"=>$rocnik), $treneri);\n\t\t\t\n\t\t\tforeach ($treneri as $trener) {\n\t\t\t\t$treneri_dostanou[$trener[\"clovek_ID\"]] += 0.1 * $debater[\"ibody\"] / $pocet_treneru;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tforeach ($treneri_dostanou as $trener_cid => $trener_ib) {\n\t\t$status &= cpdb_exec(\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) values (:clovek_id, :debata_id, :rocnik, 'trener', :ibody)\", array(\":clovek_id\"=>$trener_cid, \":debata_id\"=>$debata_id, \":rocnik\"=>$rocnik, \":ibody\"=>$trener_ib));\n\t}\n\t\n\t// --- organizatori\n\t$dostanou = 0.15; // kolik IB je z debaty\n\t$zasluhy_primych = 1; // defaultni zasluhy u primych ogranizatoru\n\t$celkem_zasluhy = 0;\n\t$zasluhy = array();\n\t\n\t// primi\n\tcpdb_fetch_all(\n\t\t\"select clovek_ID from clovek_debata where clovek_debata.role = 'o' and debata_ID = :debata_id\", array(\":debata_id\"=>$debata_id), $res_primi);\n\t\n\tforeach ($res_primi as $org) {\n\t\t$celkem_zasluhy += $zasluhy_primych;\n\t\t$zasluhy[$org[\"clovek_ID\"]] += $zasluhy_primych;\n\t}\n\t\n\t// neprimi\n\tcpdb_fetch_all(\"\n\t\tselect\n\t\t\tclovek_turnaj.clovek_ID,\n\t\t\tclovek_turnaj.mocnost\n\t\tfrom\n\t\t\tdebata, clovek_turnaj\n\t\twhere\n\t\t\tdebata.debata_ID = :debata_id\n\t\t\tand clovek_turnaj.turnaj_ID = debata.turnaj_ID\n\t\t\tand clovek_turnaj.role = 'o'\n\t\", array(\":debata_id\"=>$debata_id), $res_neprimi);\n\t\n\tforeach($res_neprimi as $org) {\n\t\t$celkem_zasluhy += $org[\"mocnost\"];\n\t\t$zasluhy[$org[\"clovek_ID\"]] += $org[\"mocnost\"];\n\t}\n\t\n\tforeach($zasluhy as $org_cid => $org_zasluhy) {\n\t\t$status &= cpdb_exec(\n\t\t\t\"insert into clovek_debata_ibody (clovek_ID, debata_ID, rocnik, role, ibody) values (:clovek_id, :debata_id, :rocnik, 'organizator', :ibody)\",\n\t\t\tarray(\n\t\t\t\t\":clovek_id\" => $org_cid,\n\t\t\t\t\":debata_id\" => $debata_id,\n\t\t\t\t\":rocnik\" => $rocnik,\n\t\t\t\t\":ibody\" => $dostanou * $org_zasluhy / $celkem_zasluhy\n\t\t\t)\n\t\t);\n\t}\n\t\n\t// zaver\n\tif ($status) {\n\t\tcpdb_commit();\n\t} else {\n\t\tcpdb_rollback();\n\t}\n}",
"public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }",
"private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}",
"public static function Najdi_kolize_vsechny ($iducast) {\r\n \r\n $query= \"SELECT * FROM s_typ_kolize WHERE valid\" ;\r\n $kolize_pole = self::Najdi_kolize ($query,$iducast) ;\r\n \r\n return $kolize_pole; \r\n}",
"function ogretmen_odev_getir ()\n {\n // if($odev=$this->vtb->query($sorgu))\n // {\n // $odevlist = $odev->fetchAll();\n\n // foreach ($odevlist as $o)\n // {\n // echo \"<div class='panel_akis_kutusu'>\".\"<p>\" . $o['odevadi'] . \"</p>\" . \"<p>\" . $o['dersadi'] . \"</p><p>\". $o['dtarih'] . \" \". $o['ttarih'] . \"</p></div>\" ;\n // }\n // }\n $sorgu=new sorgubul(\"select * from seviye_odevleri\",\"dersid\",\"=\",$_SESSION['dersler'],\"0,30\",\"or\");\n $sorgu=$sorgu->sorgu;\n\n if ($odev=$this->vtb->query($sorgu))\n {\n $odevlist = $odev->fetchAll();\n\n foreach ($odevlist as $o)\n {\n if ($a=$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid']) and $b =$this->vtb->query(\"select count(*) from seviye_odev_teslimleri where odevid = \" . $o['soid'] . ' and okundumu = 0') )\n {\n $c = $a->fetchColumn();\n $d = $b->fetchColumn();\n $derssev=$this->vtb->prepare(\"select seviyeno,dersid from ders_seviyeler where seviyeid = ?\");\n $derssev->execute(array($o['seviye']));\n $derssev=$derssev->fetch();\n $ders=$this->vtb->prepare(\"select dersadi from dersler where dersid = ?\");\n $ders->execute(array($o['dersid']));\n $ders=$ders->fetchColumn();\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p style='padding: 10px 0px 0px 100px;float:left;'>\". $c . \" kişi teslim etti,\". $d . \" kişiyi okumadınız</p><a style='margin-left:20px;' class='soruonay' href='ogretmen_ders_goruntuleme.php?dersid=\" . $derssev['dersid'] . \"&seviyeno=\" . $derssev['seviyeno'] . \"&dersadi=\" . $ders .\"'>Kontrol et</a></div></div>\" ;\n\n }\n else\n {\n echo \"<div class='isbox' style='height:auto;overflow:hidden;'> \".\" <div class='isboxust'><p class='icerik' style='color: #048CAD; margin:5px 5px 0px 0px;'>\" . $o['odevbaslik'] . \" > \" . $ders . \" > \" . $derssev['seviyeno'] . \". Seviye</p></div>\" . \"<div class='icerik' style='position:relative;'><p >\" . $o['odevmetni'] . \"</p></div><div class='isboxalt'><p>Kimse teslim etmedi</p></div></div>\" ;\n }\n }\n }\n\n }",
"public function accueil()\n {\n }",
"function cetakPenjualan($id_penjualan)\n {\n // $result = $this->db->query($_query);\n // return $result;\n $builder = $this->db->table('trx_penjualan');\n $builder->select('*');\n $builder->where('kd_trx_penjualan', $id_penjualan);\n $query = $builder->get();\n return $query;\n }",
"public function cetak_slip()\n {\n\t\t//ambil semua data simpan di variabel $tabel_gaji\n \t//$tabel_gaji = DB::all();\n \t$tabel_gaji = DB::table('tabel_gaji')->paginate(12);\n\n \n\t\t//gunakan dompdf dengan pdf::loadview() sampai nanti buka view\n\t\t//nama view diisi slipggaji\n\t\t//passing data ke gajikaryawan\n \t$pdf2 = PDF::loadview('slipgajikaryawan',['gajikaryawan'=>$tabel_gaji]);\n \t//return fungsi download dari package dompdf\n\t\t//return $pdf2->download('laporan-karyawan-pdf');\n\t\t//return untuk tampilkan saja\n\t\treturn $pdf2->stream();\n\n }",
"public function awal(){\n // return $data = dosen::where('pengguna_id', 12)->with('pengguna')->get(); \n // //relasi dari pengguna ke dosen\n // return $data = pengguna::where('id', 12)->with('dosen')->get();\n return \"halo\";\n }",
"private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}",
"public function linea_colectivo();",
"public function generujKod(){\n\t\t//\n\t}",
"public function cortesia()\n {\n $this->costo = 0;\n }",
"function ambil_soal() { \n $tampil = $this->db->query(\"SELECT * FROM IKD.IKD_D_SOAL_QUISIONER ORDER BY KD_SOAL ASC\")->result_array();\n\t\treturn $tampil;\n }",
"public function attaquerAdversaire() {\n\n }",
"public function xeberler(){\n $this->protect();\n\t$cavab=$this->dtbs->cedvel('xeberler');\n\t$data['melumat']=$cavab;\n\t$this->load->view('back/xeberler/anasehife',$data);\n}",
"function getLicence_adh(){\r\n return $this->licence_adh;\r\n}",
"function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}",
"public function lihat_penyewa()\r\n\t{\r\n\t\treturn $this->db->order_by('ID_PENYEWA', 'ASC')->get('tb_penyewa')->result();\r\n\t}",
"public function pendebetan_angsuran_koptel()\n\t{\n\t\t$data['container'] = 'transaction/pendebetan_angsuran_koptel';\n\t\t$data['debet'] = $this->model_transaction->get_data_angsuran();\n\t\t$this->load->view('core',$data);\n\t}",
"public function obtenerViajesplus();",
"public function htmlValue() {\n \n //Tableau Entête\n //- objet de la table_entete \n $arra_module = pnModGetInfo(pnModGetIDFromName($_GET['name']));\n //Si module visuclient affichage site ou groupe(si plusieurs site)\n if ($this->bool_title) {\n if ($arra_module['displayname'] == _DISPLAY_MOD_VISUCLIENT) {\n if ($_SESSION['SITE_CLIENT'] != \"TOUS\") {\n $affichage = str_replace(\"_\", \" \", $_SESSION['SITE_CLIENT']);\n } else {\n $affichage = _ALL_SITE . \"\" . str_replace(\"_\", \" \", $_SESSION['GROUPE_CLIENT']);\n } //Afichage sans underscore mais avec espace\n $obj_font_title0 = new font($arra_module['displayname'] . ' ' . $affichage, true);\n $obj_font_title0->setStyle('font-size:27px');\n } else {\n if ($arra_module['displayname']!=\"\"){\n $obj_font_title0 = new font($arra_module['displayname'] . ' V ' . $arra_module['version'], true);\n $obj_font_title0->setStyle('font-size:27px');\n }\n }\n } else {\n $obj_font_title0 = new font($this->stri_title, true);\n $obj_font_title0->setStyle('font-size:27px');\n }\n\n //LOGO SAVOYELINE\n if ($_SERVER['SERVER_ADDR'] == '10.10.100.98') {\n $obj_img_Savoye = new img(\"images/MaJ_graphique/logo_a_sis_test.gif\");\n $obj_img_Savoye->setStyle(\"cursor:pointer;padding:2px;\");\n $obj_img_Savoye->setBorder(\"0\");\n $obj_img_Savoye->setHeight(\"60px\");\n $obj_img_Savoye->setWidth(\"150px\"); \n $obj_img_Savoye->setTitle(\"Savoyeline\");\n $obj_img_Savoye->setAlt(\"Savoyeline\");\n $obj_a_Savoye = new a(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\", $obj_img_Savoye->htmlValue(), true);\n $obj_a_Savoye->setTarget(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\");\n } else {\n $obj_img_Savoye = new img(\"images/MaJ_graphique/logo_a_sis_gf.png\");\n $obj_img_Savoye->setStyle(\"cursor:pointer;padding:2px;\");\n $obj_img_Savoye->setBorder(\"0\");\n $obj_img_Savoye->setHeight(\"60px\");\n $obj_img_Savoye->setWidth(\"150px\");\n $obj_img_Savoye->setTitle(\"Savoyeline\");\n $obj_img_Savoye->setAlt(\"Savoyeline\");\n $obj_a_Savoye = new a(\"/index.php\", $obj_img_Savoye->htmlValue(), true);\n }\n\n //LOGO ENTREPRISE\n $obj_img_logo = new img($this->CreateLogo());\n //$obj_img_logo->setStyle(\"cursor:pointer;padding:2px;padding-right:10px;\");\n $obj_img_logo->setStyle(\"padding:2px;padding-right:10px;\");\n $obj_img_logo->setBorder(\"0\");\n $obj_img_logo->setTitle($this->getRaisonSociale());\n $obj_img_logo->setAlt($this->getRaisonSociale());\n $obj_img_logo->setHeight(\"60px\");\n $obj_img_logo->setWidth(\"165px\");\n //$obj_a_logo = new a(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\", $obj_img_logo->htmlValue(), true);\n //$obj_a_logo->setTarget(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\");\n\n //Création table \n $obj_table_entete = new table();\n $obj_tr = $obj_table_entete->addTr();\n \n //Bascule\n $obj_a_Savoye=($this->bool_logo_savoye)?$obj_a_Savoye:null;\n\n $obj_td = $obj_tr->addTd($obj_a_Savoye);\n $obj_td->setWidth(\"150px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('left');\n\n $obj_td = $obj_tr->addTd($obj_font_title0);\n $obj_td->setAlign('center');\n $obj_td->setStyle('height : 64px;');\n \n //Bascule\n $obj_img_logo=($this->bool_logo_firm)?$obj_img_logo:null;\n\n $obj_td = $obj_tr->addTd($obj_img_logo);\n $obj_td->setWidth(\"150px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('right');\n\n if($this->bool_lang)\n {\n $obj_td = $obj_tr->addTd($this->displayLang());\n $obj_td->setWidth(\"180px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('right');\n }\n else\n {$obj_td = $obj_tr->addTd(\"\");}\n\n \n $obj_table_entete->setClass(\"titre0\");\n $obj_table_entete->setBorder(\"0\");\n $obj_table_entete->setWidth(\"100%\");\n\n return $obj_table_entete->htmlValue();\n }",
"function PropiedadFull($id_prop){\r\n\trequire_once(\"clases/class.propiedadBSN.php\");\r\n\t$prop = new PropiedadBSN();\r\n\t$prop->cargaById($id_prop);\r\n\t$colec=$prop->getObjetoView();\r\n\t$arraycarac=ListarDatosPropiedad($id_prop);\r\n $result = array(\r\n\t\t'id_prop'\t\t=> $colec['id_prop'],\r\n\t\t'id_zona'\t\t=> $colec['id_zona'],\r\n\t\t'id_loca'\t\t=> $colec['id_loca'],\r\n\t\t'calle'\t\t\t=> $colec['calle'],\r\n\t\t'entre1'\t\t=> $colec['entre1'],\r\n\t\t'entre2'\t\t=> $colec['entre2'],\r\n\t\t'nro'\t\t\t=> $colec['nro'],\r\n\t\t'descripcion'\t=> $colec['descripcion'],\r\n\t\t'id_tipo_prop'\t=> $colec['id_tipo_prop'],\r\n\t\t'subtipo_prop'\t=> $colec['subtipo_prop'],\r\n\t\t'intermediacion'=> $colec['intermediacion'],\r\n\t\t'id_inmo'\t\t=> $colec['id_inmo'],\r\n\t\t'operacion'\t\t=> $colec['operacion'],\r\n\t\t'comentario'\t=> $colec['comentario'],\r\n\t\t'video'\t\t\t=> $colec['video'],\r\n\t\t'piso'\t\t\t=> $colec['piso'],\r\n\t\t'dpto'\t\t\t=> $colec['dpto'],\r\n\t\t'id_cliente'\t=> $colec['id_cliente'],\r\n\t\t'goglat'\t\t=> $colec['goglat'],\r\n\t\t'goglong'\t\t=> $colec['goglong'],\r\n\t\t'activa'\t\t=> $colec['activa'],\r\n\t\t'id_sucursal'\t=> $colec['id_sucursal'],\r\n\t\t'id_emp'\t\t=> $colec['id_emp'],\r\n\t\t'nomedif'\t\t=> $colec['nomedif'],\r\n\t\t'caracteristica'=> $arraycarac\r\n );\r\n\treturn $result;\r\n}",
"public function edit_toko(){\n\t}",
"function get_vereventosbajafe($codcia,$nropdc,$nrosere,$nrocor,$tipdoc){\n\t\tinclude(\"application/config/conexdb_db2.php\"); \n\t\t$sql =\"select c.SACODRPT,c.SAMSGRPT FROM LIBPRDDAT.SNT_ANEXO c WHERE c.SACODCIA='\".$codcia.\"' and c.SANROINT='\".$nropdc.\"' and c.SANROSER='\".$nrosere.\"' and c.SANROCOR='\".$nrocor.\"' and c.SATIPDOC='\".$tipdoc.\"' \";\t\t\n\t\t$dato = odbc_exec($dbconect, $sql)or die(\"<p>\" . odbc_errormsg());\n\t\tif (!$dato) {\n\t\t\t$data = FALSE;\n\t\t} else { \n\t\t\t$data = $dato; \n\n\t\t} \n\t\treturn $data; \n\t}",
"function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}",
"function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}",
"public function HM_CategoCuentas()\n {\n }",
"static function change($d) {\n $entidad = $d[\"entidad\"];\n $column = $d[\"column\"];\n $value = $d[\"value\"];\n $id = $d[\"id\"];\n\n $e = R::findOne($entidad,\"id = ? AND elim = ?\",[$id,0]);\n if(isset($e[$column])) {\n $e[$column] = $value;\n R::store($e);\n return \"CAMBIO EXITOSO {$entidad}.id: {$id}\";\n } else return \"COLUMNA NO ENCONTRADA\";\n }",
"function cargarDatosVotante($idactual){\n $sql=\"SELECT correovotante,nombrevotante,apellidovotante FROM votante WHERE idvotante=$idactual;\";\n\t\t\treturn $sql;\n }",
"private function setExercicio(){\n\t\t$this->Enunciado = $this->Data['enunciado'];\n\t\t$this->A = $this->Data['opA'];\n\t\t$this->B = $this->Data['opB'];\n\t\t$this->C = $this->Data['opC'];\n\t\t$this->D = $this->Data['opD'];\n\t\t$this->E = $this->Data['opE'];\n\t\t$this->Correta = $this->Data['correta'];\n\n\t\t$this->Query = ['c_enumexer' => $this->Enunciado,\n\t\t\t\t\t\t'c_altaexer' => $this->A,\n\t\t\t\t\t\t'c_altbexer' => $this->B,\n\t\t\t\t\t\t'c_altcexer' => $this->C,\n\t\t\t\t\t\t'c_altdexer' => $this->D,\n\t\t\t\t\t\t'c_alteexer' => $this->E,\n\t\t\t\t\t\t'c_correxer' => $this->Correta];\n\n\t}",
"public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }",
"function consultarProyectosCoordinador($cod_proyecto=\"\") {\n $datos['identificacion']= $this->identificacion;\n $datos['cod_proyecto']=$cod_proyecto;\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectosCoordinador\",$datos);\n //echo \"<br>sql proy curr \".$cadena_sql ;\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }",
"function balise_SEO_GA($p){\n\t$p->code = \"calculer_balise_SEO_GA()\";\n\treturn $p;\n}",
"public function getBanyakSoal();",
"public function NuevoCapacidad() {\r\n\t$nuevo = \"SELECT co_capacidad FROM tr012_capacidad\r\n\t\tORDER BY co_capacidad DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }",
"public function videPanier()\n {\n $this->CollProduit->vider();\n }",
"public function Dame()\n {\n $sql = 'CALL tsp_dame_vaca( :id )';\n \n $query = Yii::$app->db->createCommand($sql);\n \n $query->bindValues([\n ':id' => $this->IdVaca\n ]);\n \n $this->attributes = $query->queryOne();\n }",
"public function vwAnaliseConteudo($where = array())\n {\n $slct = $this->select();\n\n $slct->setIntegrityCheck(false);\n\n $slct->from(\n array('p' => $this->_name),\n array('p.IdPRONAC',\n '(p.AnoProjeto + p.Sequencial) AS PRONAC',\n 'p.NomeProjeto',\n 'dbo.fnFormataProcesso(p.idPronac) as Processo')\n );\n\n $slct->joinInner(\n array('i' => 'Interessado'),\n \"p.CgcCpf = i.CgcCpf\",\n array('i.Nome AS Proponente')\n );\n\n $slct->joinInner(\n array('a' => 'tbAnaliseDeConteudo'),\n \"p.IdPRONAC = a.idPronac\",\n array(\"a.idProduto\",\n \"Lei8313\" => new Zend_Db_Expr(\"CASE WHEN Lei8313 = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"Artigo3\" => new Zend_Db_Expr(\"CASE WHEN Artigo3 = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"IncisoArtigo3\" => new Zend_Db_Expr(\"CASE WHEN IncisoArtigo3 = 1 THEN 'I' WHEN IncisoArtigo3 = 2 THEN 'II' WHEN IncisoArtigo3 = 3 THEN 'III' WHEN IncisoArtigo3 = 4 THEN 'IV' WHEN IncisoArtigo3 = 5 THEN 'V' END\"),\n \"a.AlineaArtigo3\",\n \"Artigo18\" => new Zend_Db_Expr(\"CASE WHEN Artigo18 = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"a.AlineaArtigo18\",\n \"Artigo26\" => new Zend_Db_Expr(\"CASE WHEN Artigo26 = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"Lei5761\" => new Zend_Db_Expr(\"CASE WHEN Lei5761 = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"Artigo27\" => new Zend_Db_Expr(\"CASE WHEN Artigo27 = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"IncisoArtigo27_I\" => new Zend_Db_Expr(\"CASE WHEN IncisoArtigo27_I = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"IncisoArtigo27_II\" => new Zend_Db_Expr(\"CASE WHEN IncisoArtigo27_II = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"IncisoArtigo27_III\" => new Zend_Db_Expr(\"CASE WHEN IncisoArtigo27_III = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"IncisoArtigo27_IV\" => new Zend_Db_Expr(\"CASE WHEN IncisoArtigo27_IV = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"TipoParecer\" => new Zend_Db_Expr(\"CASE WHEN TipoParecer = 1 THEN 'Aprova��o' WHEN TipoParecer = 2 THEN 'Complementa��o' WHEN TipoParecer = 4 THEN 'Redu��o' END\"),\n \"ParecerFavoravel\" => new Zend_Db_Expr(\"CASE WHEN ParecerFavoravel = 1 THEN 'Sim' ELSE 'N�o' END\"),\n \"a.ParecerDeConteudo\",\n new Zend_Db_Expr(\"sac.dbo.fnNomeParecerista(a.idUsuario) AS Parecerista\"),\n )\n );\n\n\n $slct->joinInner(\n array('pr' => 'Produto'),\n \"a.idProduto = pr.Codigo\",\n array('pr.Descricao AS Produto')\n );\n\n\n // adicionando clausulas where\n foreach ($where as $coluna => $valor) {\n $slct->where($coluna, $valor);\n }\n\n\n return $this->fetchAll($slct);\n }",
"public function calcula13o()\n {\n }",
"public function calcula13o()\n {\n }",
"public function serch()\n {\n }",
"public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}",
"public function publicaciones() //Lleva ID del proveedor para hacer carga de BD\r\n\t{\r\n\t\t//Paso a ser totalmente otro modulo para generar mejor el proceso de visualizacion y carga de datos en la vistas\r\n\r\n\t}",
"public function getDW() {}",
"public function setVendedor($nome,$comissao){\n try{\n $x = 1;\n $Conexao = Conexao::getConnection();\n $query = $Conexao->prepare(\"INSERT INTO vendedor (nome,comissao) VALUES ('$nome',$comissao)\"); \n $query->execute(); \n // $query = $Conexao->query(\"DELETE FROM vendedor WHERE id_vendedor = (SELECT top 1 id_vendedor from vendedor order by id_vendedor desc)\"); \n // $query->execute();\n return 1;\n\n }catch(Exception $e){\n echo $e->getMessage();\n return 2;\n exit;\n } \n }",
"function pnh_gen_statement()\r\n\t{\r\n\t\t$this->auth(PNH_EXECUTIVE_ROLE|FINANCE_ROLE);\r\n\t\t$data['page']=\"pnh_gen_statement\";\r\n\t\t$this->load->view(\"admin\",$data);\r\n\t}",
"protected function dsHoiVien(){\n $arrHoiviens = array(''=>'----- Chọn hội viên -----');\n $hoiviens = csdl_lylichhoivienTable::dsHoivienForThe();\n if(count($hoiviens)>0){\n foreach($hoiviens as $value){\n $arrHoiviens[$value['hoivien_id']] = $value['hodem'];\n }\n }\n return $arrHoiviens;\n }",
"public function getPlaca(){ return $this->placa;}",
"function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }",
"function balise_SEO_GWT($p){\n\t$p->code = \"calculer_balise_SEO_GWT()\";\n\treturn $p;\n}",
"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 }",
"public function getD() {}",
"public function valordelospasajesplus();",
"public function jalan() {\n return \"Hewan ini berjalan<br/>\";\n }",
"function hitungDenda(){\n\n return 0;\n }"
] | [
"0.6281511",
"0.6240328",
"0.622835",
"0.620833",
"0.6160221",
"0.604297",
"0.59489053",
"0.58636576",
"0.58580315",
"0.58020836",
"0.57684654",
"0.57603705",
"0.57461154",
"0.5734437",
"0.5728496",
"0.5725108",
"0.5671108",
"0.56310016",
"0.5624734",
"0.5615135",
"0.559837",
"0.55898607",
"0.55854136",
"0.5580003",
"0.5579386",
"0.5566926",
"0.5566584",
"0.5554376",
"0.55524236",
"0.552876",
"0.5527456",
"0.55244267",
"0.55190486",
"0.5517723",
"0.5512641",
"0.55120164",
"0.55070144",
"0.5494344",
"0.5471927",
"0.5471121",
"0.54608697",
"0.5458766",
"0.54583794",
"0.5453691",
"0.54491746",
"0.54442495",
"0.5443656",
"0.54376036",
"0.5437283",
"0.54347825",
"0.5431022",
"0.54296064",
"0.54268336",
"0.5421852",
"0.54147476",
"0.5408578",
"0.54070747",
"0.540243",
"0.5393222",
"0.53906304",
"0.5387809",
"0.5378005",
"0.5377548",
"0.5372969",
"0.5370176",
"0.53685874",
"0.5367069",
"0.5358755",
"0.53567517",
"0.53552145",
"0.5340859",
"0.5339908",
"0.5328378",
"0.53269076",
"0.53233624",
"0.5320219",
"0.53199756",
"0.53185385",
"0.5314618",
"0.53135556",
"0.53049505",
"0.5302568",
"0.52980644",
"0.5297622",
"0.5296603",
"0.5296603",
"0.5295368",
"0.5294977",
"0.52921414",
"0.5290211",
"0.5289802",
"0.52885854",
"0.52883095",
"0.52839756",
"0.528364",
"0.52811056",
"0.52773243",
"0.52773064",
"0.5273072",
"0.5269688",
"0.5269673"
] | 0.0 | -1 |
recursive function for getting field info and related tables TODO: verify we can't get in an infinte loop TODO: need to but the query in a try/catch | public function inspectDB($table,$depth){
//check the session
//if(!isset($_SESSION[$table]))
$fields = array();
$related = array();
$sql = "DESCRIBE $table";
$stmt = $this->_pdo->prepare($sql);
$stmt->execute();
while($qobj = $stmt->fetch()){
$fields[$qobj->Field] = array("type" => $qobj->Type,
"allow_null" => $qobj->Null,
"key" => $qobj->Key);
}
//recursively build related data
if($depth > 0){
$related = $this->findRelations($table);
foreach($related as $key => $r){
$dbData = $this->inspectDB($r["table"],$depth-1);
$related[$key]["fields"] = $dbData["fields"];
$related[$key]["related"] = $dbData["related"];
}
}
$sTable[$table] = array("fields" => $fields, "related" => $related);
return array("fields" => $fields, "related" => $related);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getReferencedTableData($entity)\n{\n $tables = array();\n foreach($entity['fields'] as $f){\n $fk = getFK($entity['tablename'], $f['name']);\n \n $referenced_table = \"\";\n $title_field = \"\";\n $likely_page = \"\";\n // Get the referenced table and the title field to show\n // Now, what can we show? Is there a more useful field for\n // the valuelist than an id or the like? Maybe the title_field\n // of a page? Let's see if we can get one\n if ($fk['page'] == $entity[\"pagename\"]) {\n $page_info = getPageInfo($fk['ref_page']);\n $referenced_table = $page_info['tablename'];\n if (isMultipage($fk['ref_page'])) {\n $title_field = $page_info['title_field'];\n } else {\n $title_field = 'heading';\n }\n $likely_page = $fk['ref_page'];\n } else if ($fk['table'] == $entity['tablename']) {\n $referenced_table = $fk['ref_table'];\n //in principle, _sys_sections could be referenced - that's easy\n if ($referenced_table == '_sys_sections') {\n $title_field = 'heading';\n $likely_page = $fk['ref_page'];\n } else {\n // more likely are multipages\n $pk_field = getPKName($referenced_table);\n $pq = \"SELECT name,title_field FROM _sys_multipages WHERE tablename = '\".$referenced_table.\"'\";\n $result = pp_run_query($pq);\n $row = $result[0];\n if (count($result)>1) {\n $title_field = $pk_field;\n }\n //no chance of a good choice :-(\n else {\n // we have the one page for this table!\n $title_field = $row['title_field'];\n if ($title_field==\"\") {\n $title_field = $pk_field;\n }\n }\n $likely_page = $row['name'];\n }\n }\n if ($referenced_table != \"\") {\n $tables[] = array('fk'=>$fk,'table_name'=>$referenced_table, 'likely_page' => $likely_page , 'title_field' => $title_field);\n }\n }\n return $tables;\n}",
"function yield_fields(){\n //\n //Visit each column of the root entity, resolve it.\n foreach($this->entity->columns as $column){\n //\n //Resolve the current column\n //\n //Primary keys and attributes to not need resolving\n if($column instanceof \\column_primary){\n yield new primary($this->entity, $column->name); \n }\n \n else if ($column instanceof \\column_attribute){\n yield new column($column, $column->name);\n }\n //\n //A forein key needs resolving from e.g., client=4 to\n //client = [4,\"deekos-Deeoks Bakery lt\"]. We need to cocaat 5 pieces\n //of data, $ob, $primary, $comma, $dq, $friendly, $dq, $cb\n else{\n //Start with an empty array \n $args=[];\n //\n //Opening bracket\n $ob= new literal('[');\n array_push($args, $ob);\n //\n //Primary \n $primary = new column($column);\n array_push($args, $primary);\n //\n //Comma\n $comma= new literal(',');\n array_push($args, $comma);\n //\n //Double quote\n $dq= new literal('\"');\n array_push($args, $dq);\n //\n //Yied the fiedly comumn name\n $e2 = $this->entity->dbase->entities[$column->ref_table_name];\n //\n //Take care of the join \n $en= array_search($e2->name, $this->join_entites);\n if ($en == false){\n //\n array_push($this->join_entites, $e2->name);\n array_push($this->editor_joins, new join($e2, [$column]));\n }\n //\n //To obtain the indexed attributes get the identifier\n $db=$e2->get_parent();\n $identify = new identifier($e2->name,$db->name);\n //\n //The friendly are the fields of the identifier\n $friendly= $identify->fields;\n //\n //Retrieve any joins also\n $joins_edit= $identify->joins->get_array();\n foreach ($joins_edit as $join){\n $e= $join->entity->name;\n $en= array_search($e, $this->join_entites);\n if ($en === false){\n //\n array_push($this->join_entites, $e);\n array_push($this->editor_joins, $join);\n }\n }\n //\n //Return an array of the fields \n $fri_fields= $friendly->get_array();\n \n //Loop through the array and pushing every component \n foreach ($fri_fields as $field){\n array_push($args, $field);\n $d= new literal(\"/\");\n array_push($args, $d);\n }\n array_pop($args);\n //\n //Double quote\n array_push($args, $dq);\n //\n $cb= new literal(']');\n array_push($args, $cb);\n //\n yield new concat(new fields($args),$column->name);\n \n }\n }\n }",
"function getReferencingTableData($entity)\n{\n $fks = getForeignKeys();\n $tables = array();\n \n foreach($fks as $fk){\n $referencing_table = \"\";\n $title_field = \"\";\n $likely_page = \"\";\n if ($fk['ref_page'] == $entity[\"pagename\"]) {\n $page_info = getPageInfo($fk['page']);\n $referencing_table = $page_info['tablename'];\n if (isMultipage($fk['page'])) {\n $title_field = $page_info['title_field'];\n } else {\n $title_field = 'heading';\n }\n $likely_page = $fk['page'];\n } else if ($fk['ref_table'] == $entity['tablename']) {\n $referencing_table = $fk['table'];\n //in principle, _sys_sections could be referenced - that's easy\n if ($referencing_table == '_sys_sections') {\n $title_field = 'heading';\n $likely_page = $fk['page'];\n } else {\n // more likely are multipages\n $pk_field = getPKName($referencing_table);\n $pq = \"SELECT name, title_field FROM _sys_multipages WHERE tablename = '\".$referencing_table.\"'\";\n $result = pp_run_query($pq);\n $row = $result[0];\n if (count($result)>1) {\n $title_field = $pk_field;\n }\n //no chance of a good choice :-(\n else {\n // we have the one page for this table!\n $title_field = $row['title_field'];\n if ($title_field==\"\") {\n $title_field = $pk_field;\n }\n }\n $likely_page = $row['name'];\n }\n }\n if ($referencing_table != \"\") {\n $tables[] = array('fk'=>$fk,'table_name'=>$referencing_table, 'likely_page' => $likely_page, 'title_field' => $title_field);\n }\n }\n return $tables;\n}",
"function get_fields(){\n //\n //Start with an empty array that stores the resolved column attributes \n $fields=[];\n // \n //Get the indexed column names\n $index_names = $this->entity->indices;\n //\n //Test if the entity is properly constructed with idices for identification\n $x = \\count($index_names);\n //\n //If the entity does not have an index through an exception since we cannot \n //create an identifier\n if( $x === 0){\n throw new \\Exception(\"Table: {$this->entity->name} does not have indexes check its construction\");\n }\n //\n //Get the first index since I are only using the first index to retrieve \n //the indexed column names\n $index = array_values($index_names)[0];\n //\n //loop through the indexes and push to the fields if it is an attribute \n //else resolve it to its constituent column attributes \n foreach ($index as $cname){\n //\n //Get the root column that if by the indexed name \n $col= $this->entity->columns[$cname];\n //\n //Test if the column is an attribute \n //The column is an attribute it does not need to be resolved \n if($col instanceof \\column_attribute){\n //\n //Push the column it is already resolved \n array_push($fields, new column($col));\n }\n //\n //The column is a foreign it needs to resolved by first principle\n //steps\n //1. get the referenced table name \n //2. get the referenced entity\n //3. get resolved indexes of the referenced entity\n else{\n //\n //1. Get the referenced table name \n $ref= $col->ref_table_name;\n //\n //Test if this entity exists in the join entities list\n //1 if it does not exist push \n $en= array_search($ref, $this->join_entities);\n if ($en === false){\n //\n array_push($this->join_entities, $ref);\n }\n //\n //2. Get the referenced entity \n $entity1= $this->entity->dbase->entities[$ref];\n //\n //Repeat this process for the referenced entity \n $cols2= $this->resolve_ref($entity1);\n //\n //loop through the fields of the new identify pushing them to the \n //fields \n foreach ( $cols2 as $coll) {\n //\n //push the column attribute\n array_push($fields, $coll);\n }\n }\n \n }\n //\n //Update and include any name, title, description , or id fields\n $fields1=$this->update_fields($fields);\n //\n //return the collection of the resolved columns \n return $fields1;\n }",
"function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);",
"function getRecursiveFields()\n{\n $subFields = array();\n $subFields[$this->name] = $this;\n return $subFields;\n}",
"function ScriptOutRelatedData($strDatabase, $strTable, $pk, $strOurID, $depth, $tableprefix=\"\", $tablepostfix=\"\", $bwlNoDBMention=false, $bwlnullpks=false, $forceID=\"\")\n//inside a particular database, find all the tables that have a foreign key relationship with the given item and //and script out all the items in those tables connected to our item recursively\n//under some circumstances ($bwlnullpks), the PKs and FKs will have to be changed on insert, but there \n//is code for that too.\n//Judas Gutenberg February 21, 2008\n{\n\t$outscript=\"\";\n\t$numout=0;\n\t$thisset=0;\n\tif($strOurID!=\"\")\n\t{\n\t\t$sql=conDB();\n\t\t//the following query makes everything easy because I have a relation table!!!\n\t\t$strSQL=\"SELECT * FROM \" . $strDatabase . \".\" . tfpre . \"relation WHERE f_table_name='\" . $strTable . \"' AND relation_type_id=0 ORDER BY table_name ASC\";\n\t\t$fkrecords = $sql->query($strSQL);\n\t\t$intUnnameditemcount=1;\n\t\t$oldTable=\"\";\n\t\t$depth++;\n\t\t$intThisSpecialID=-2000;\n\t\t$intParallelPKCount=0;\n\n\t\tforeach ($fkrecords as $fkrecord)\n\t\t{\n\t\t\t$intSpecialIDCount=0;\n\t\t\t//i have to include depth in the names of the MySQL variables to avoid reuse\n\t\t\t$strThisSpecialID=\"@associatedpk\" . $intParallelPKCount . \"_\" . $depth ;\n\t\t\t\n\t\t\t$strTheirTable=$fkrecord[\"table_name\"];\n\t\t //now we have a tablename, let's look to see if there are foreign keys pointing back to our table\n\t\t\t$thistableinfo=\"\";\n\t\t\t$strTheirIDColumnName=PKLookup($strDatabase, $strTheirTable);\n\t\t\t$bwlThisIsAutoIncPK=hasautocount($strDatabase, $strTable);\n\t\t\tif($bwlnullpks && !contains($strTheirIDColumnName, \" \") && $bwlThisIsAutoIncPK)\n\t\t\t{\n\t\t\t\t//it isn't easy to generate fresh new AND compatible autoincrement IDs when inserting related\n\t\t\t\t//data. I do it by setting a MySQL variable to the next available PK during the insert and\n\t\t\t\t//rolling the numbers up from there, keeping track of them so I can be sure to have the\n\t\t\t\t//related data properly linked.\n\t\t\t\t$outscript.=\"\\nSET \" . $strThisSpecialID .\"=(SELECT MAX( \" . $strTheirIDColumnName . \" ) +1 FROM \" . IfAThenB(!$bwlNoDBMention, $strDatabase . \".\") . $strTheirTable . \");\";\n\t\t\t}\n\t\t\t$strSQL=\"SELECT * FROM \" . $strDatabase . \".\" . $strTheirTable . \" WHERE \" . $fkrecord[\"column_name\"] . \" = \" . $strOurID;\n\t\t\t$records = $sql->query($strSQL);\n\t\t\t$bwlColListCreated=false;\n\t\t\t$colList=\"\";\n\t\t \n\t\t\tforeach ($records as $record )\n\t\t\t{\n\t\t\t\t$idToUse=$record[$fkrecord[\"column_name\"]];\n\t\t\t\tif($bwlNoDBMention)\n\t\t\t\t{\n\t\t\t\t\t$outscript.=\"\\nINSERT INTO \" . $tableprefix . $strTheirTable . $tablepostfix . \"(\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$outscript.=\"\\nINSERT INTO \" . $strDatabase . \".\" . $tableprefix . $strTheirTable . $tablepostfix . \"(\";\n\t\t\t\t}\n\t\t\t\t$insertdata=\"\";\n\t\t\t\t$bwlFieldIsPK=false;\n\t\t\t\tforeach($record as $k=>$field)\n\t\t\t\t{\n\t\t\t\t\t$bwlFieldIsPK=false;\n\t\t\t\t\tif($k==$strTheirIDColumnName)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bwlFieldIsPK=true;\n\t\t\t\t\t\t$id=$field;\n\t\t\t\t\t\tif(!$bwlColListCreated)//i keep from doing the expensive lookup of hasautocount for every export row\n\t\t\t\t\t\t{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//if(!$bwlColListCreated && !(($bwlFieldIsPK && $bwlThisIsAutoIncPK) && $bwlnullpks))\n\t\t\t\t\t//trouble with single quotes::\n\t\t\t\t\t$field=str_replace( \"'\", \"\\\\'\", $field);\n\t\t\t\t\tif(!$bwlColListCreated && ((!($bwlFieldIsPK && $bwlThisIsAutoIncPK) || $forceID!=\"\") || !$bwlnullpks))\n\t\t\t\t\t{\n\t\t\t\t\t\t$colList.=\"`\" . $k . \"`,\";\n\t\t\t\t\t}\n\t\t\t\t\tif(($bwlFieldIsPK && $bwlThisIsAutoIncPK) && $bwlnullpks )\n\t\t\t\t\t{\n\t\t\t\t\t\t//$insertdata.= \"'\" . $intThisSpecialID . \"',\";\n\t\t\t\t\t\t$insertdata.= $strThisSpecialID . \" + \" . $intSpecialIDCount . \",\";\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if($forceID!=\"\" && $k==$pk && $bwlnullpks)\n\t\t\t\t\t{\n\t\t\t\t\t\t$insertdata.= $forceID . \",\";\n\t\t\t\t\t}\n\t\t\t\t\telse if(($bwlThisIsAutoIncPK && $bwlFieldIsPK) && $bwlnullpks)\n\t\t\t\t\t{\n\t\t\t\t\t}\n\t\t\t\t\telse if($bwlHTMLEsc)\n\t\t\t\t\t{\n\t\t\t\t\t\t$insertdata.= \"'\" . str_replace(\"'\", \"'\", $field). \"',\";\n\t\t\t\t\t}\n\t\t\t\t\telse if($bwlAddSlashes)\n\t\t\t\t\t{\n\t\t\t\t\t\t$insertdata.= \"'\" . addslashes($field). \"',\";\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$insertdata.= \"'\" . $field. \"',\";\n\t\t\t\t\t}\n\t\t\t\t\t$rowcount++;\n\t\t\t\t}\n\t\t\t\tif(!$bwlColListCreated)\n\t\t\t\t{\n\t\t\t\t\t$colList=RemoveEndCharactersIfMatch($colList, \",\");\n\t\t\t\t}\n\t\t\t\t$bwlColListCreated=true;\n\t\t\t\t$insertdata=RemoveEndCharactersIfMatch($insertdata, \",\");\n\t\t\t\t$outscript.=$colList . \") VALUES(\" . $insertdata . \");\";\n\t\t\t\t//$outscript.=$insertdata . \");\\n\";\n\t\t\t\tif($depth<5)\n\t\t\t\t{\n\t\t\t\t\tif($id!=\"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$strThisSpecialIDToPass=$strThisSpecialID . \" + \" . $intSpecialIDCount;\n\t\t\t\t\t\tif(!$bwlnullpks)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$strThisSpecialIDToPass=\"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$outscript.=ScriptOutRelatedData($strDatabase, $strTheirTable, $strTheirIDColumnName, $id, $depth, $tableprefix , $tablepostfix, $bwlNoDBMention, $bwlnullpks, $strThisSpecialIDToPass);\n\t\t\t\t\t\t$intSpecialIDCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$intParallelPKCount++;\n\t\t}\n\t}\n\treturn $outscript;\n}",
"public function fetchFields();",
"function get_fields($item, $depth, $args = array(), $id = 0)\n {\n }",
"public function fetch_fields() {}",
"protected function traverseFields(): void\n {\n $columns = $this->definition->tca['columns'] ?? [];\n foreach ($this->definition->data as $fieldName => $value) {\n if (! is_array($columns[$fieldName])) {\n continue;\n }\n \n $this->registerHandlerDefinitions($fieldName, $columns[$fieldName], [$fieldName]);\n \n // Handle flex form fields\n if (isset($columns[$fieldName]['config']['type']) && $columns[$fieldName]['config']['type'] === 'flex') {\n $this->flexFormTraverser->initialize($this->definition, [$fieldName])->traverse();\n }\n }\n }",
"function addSqlFields($currentNode, $branchDepth = 0, $isFirstField = true, $sqlAndSelectedObjects = [\"sql\" => \"SELECT \", \"selectedObjects\" => []])\n {\n $selections = $currentNode[\"selectionSet\"][\"selections\"];\n $rootFieldName = $currentNode[\"name\"][\"value\"];\n\n $sql = $sqlAndSelectedObjects[\"sql\"];\n $selectedObjects = $sqlAndSelectedObjects[\"selectedObjects\"];\n\n //$selectedObjects = [];\n //$sql .= \"SELECT \";\n //return $selections;\n // Add fields to SQL query\n\n $sql .= $isFirstField ?\n $rootFieldName . \".\" . \"id\" :\n \", \" . $rootFieldName . \".\" . \"id\";\n\n $sql .= \" AS \" . \"'\" . $rootFieldName . \".\" . \"id\" . \"'\";\n $isFirstField = false;\n\n for ($i = 0; $i < count($selections); $i++) {\n $field = $selections[$i];\n $fieldName = $field[\"name\"][\"value\"];\n\n if ($fieldName == \"id\") {\n continue;\n }\n\n if (self::isSpread($field)) {\n // Requested fieldname exists as column in table\n if (self::columnExistsInTable($fieldName . \"_id\", $rootFieldName)) {\n //if (!in_array([\"type\" => \"one-to-one\", \"from\" => $rootFieldName, \"to\" => $fieldName], $this->selectedObjects))\n // array_push($this->selectedObjects, [\"type\" => \"one-to-one\", \"from\" => $rootFieldName, \"to\" => $fieldName]);\n\n if (!in_array([\"type\" => \"one-to-one\", \"from\" => $rootFieldName, \"to\" => $fieldName], $selectedObjects))\n array_push($selectedObjects, [\"type\" => \"one-to-one\", \"from\" => $rootFieldName, \"to\" => $fieldName]);\n\n //$sql .= $this->addSqlFields($field, $branchDepth + 1, \"\", $isFirstField, $selectedObjects)[\"sql\"];\n $new = $this->addSqlFields($field, $branchDepth, $isFirstField, [\"sql\" => $sql, \"selectedObjects\" => $selectedObjects]);\n\n $sql = $new[\"sql\"];\n $selectedObjects = $new[\"selectedObjects\"];\n\n } else {\n // Many to many (for now) TODO\n //if (!in_array([\"type\" => \"many-to-many\", \"from\" => $rootFieldName, \"to\" => $fieldName], $this->selectedObjects))\n // array_push($this->selectedObjects, [\"type\" => \"many-to-many\", \"from\" => $rootFieldName, \"to\" => $fieldName]);\n if (!in_array([\"type\" => \"many-to-many\", \"from\" => $rootFieldName, \"to\" => $fieldName], $selectedObjects))\n array_push($selectedObjects, [\"type\" => \"many-to-many\", \"from\" => $rootFieldName, \"to\" => $fieldName]);\n }\n } else {\n // Current node is not object but scalar type field\n $sql .= $isFirstField ?\n $rootFieldName . \".\" . $fieldName :\n \", \" . $rootFieldName . \".\" . $fieldName;\n\n $sql .= \" AS \" . \"'\" . $rootFieldName . \".\" . $fieldName . \"'\";\n $isFirstField = false;\n }\n }\n\n //return $sql;\n return [\"sql\" => $sql, \"selectedObjects\" => $selectedObjects];\n }",
"protected function _getField() {\n //We can access to a field of the current Entity or a linked Entity (foreign key)\n //If the field name contain a \".\" it's the second case\n $fields = [];\n $fieldsData = $this->_entity->fields();\n\n //We have to analyze a classic field without linked Entity\n if (!preg_match('#\\.#isU', $this->_field)) {\n if (isset($fieldsData[$this->_field])) {\n $fields = [$fieldsData[$this->_field]->value];\n }\n else {\n throw new MissingEntityException('The field \"' . $this->_field . '\" in the Entity \"' . $this->_entity->name() . '\" does\\'nt exist');\n }\n }\n else {\n //Here it's sure that we have a linked Entity. But we don't compute \"One to One and One to Many\" in the same way than the 2 other\n //because in the two first the field value is an Entity object and in the two other, the field value is a Collection\n //To know which type of linked Entity it's, we just split the name on the \".\" and we take the index 0 of the generated array\n\n $entityName = explode('.', $this->_field);\n\n if (array_key_exists($entityName[0], $fieldsData) && $fieldsData[$entityName[0]]->foreign != null) {\n /** @var int $foreignType : the type of the foreign key */\n $foreignType = $fieldsData[$entityName[0]]->foreign->type();\n /** @var mixed $fieldValue : the value of the sub-field from the Entity (post.article.content->value) */\n $fieldValue = $fieldsData[$entityName[0]]->value->fields()[$entityName[1]];\n\n if ($foreignType == ForeignKey::ONE_TO_MANY || $foreignType == ForeignKey::MANY_TO_ONE) {\n $fields = $this->_getForeignKeyFieldValue($fieldValue);\n }\n else { //We must get all the sub entities as an array an then loop through this array to get the field values\n foreach ($fieldValue->data() as $fieldValueCollection) {\n $fields = array_merge($fields, $this->_getForeignKeyFieldValue($fieldValueCollection));\n }\n }\n }\n else {\n throw new MissingEntityException('The field \"' . $this->_field . '\" in the Entity \"' . $this->_entity->name() . '\" does\\'nt exist');\n }\n }\n\n return $fields;\n }",
"function getGlueFieldsDescription($callBack, $relations, $srcDBTable='') {\n $dstFieldList='';\n $srcFieldList='';\n\n $srcInfo=array();\n\n $relLineNum=0;\n foreach($relations as $rel) {\n $relLineNum++;\n $rel=str_replace(\"\\n\",' ',$rel);\n $dstField = getNextValue($rel,':');\n if ($srcFieldList>'') {\n $srcFieldList.=', ';\n $dstFieldList.=', ';\n }\n $dstFieldList.=$dstField;\n $srcFieldName = getNextValue($rel);\n\n $srcNdx=count($srcInfo);\n $srcInfo[$srcNdx]=array();\n $srcInfo[$srcNdx]['name']=$dstField;\n $srcInfo[$srcNdx]['type']='';\n\n if (strpos($srcFieldName,'(')!==FALSE) {\n $srcFieldName=unparentesis($srcFieldName);\n $p=new xParser($srcFieldName);\n $p->get($srcFieldName, $tokenType);\n if (!$p->eof()) {\n $p->get($token, $tokenType);\n if ($token==':') {\n $p->get($token, $tokenType);\n $token=strtolower($token);\n\n $srcInfo[$srcNdx]['type']=$token;\n $srcInfo[$srcNdx]['query']=array();\n\n if ($token=='query') {\n if ($p->getExpectingType($token, 4)) {\n if ($token=='(') {\n $querySeq=0;\n while ((!$p->eof()) && ($token!=')')) {\n $p->get($returnValue, $tokenType);\n if (($p->getExpectingType($token, 4)) && ($token==':')) {\n $p->get($keyValue, $tokenType);\n $srcInfo[$srcNdx]['query'][unquote($returnValue)]=$keyValue;\n // ',' ou ')'\n $p->get($token, $tokenType);\n } else if (($querySeq==0) && ($tokenType==5)) {\n $sql=unquote($returnValue);\n $queryArray=db_queryAndFillArray($sql);\n foreach($queryArray as $k=>$v) {\n $ak=array_keys($v);\n $srcInfo[$srcNdx]['query'][$v[$ak[0]]]=$v[$ak[1]];\n }\n } else\n $callBack(2, \"ERROR: Was expeted a ':' after '$returnValue' value on query definition in .rel file at line $relLineNum\");\n $querySeq++;\n }\n } else\n $callBack(2, \"ERROR: Was expected a '(' after ':' on query definition in .rel file line $relLineNum\");\n } else\n $callBack(2, \"ERROR: Was expected a '(' after 'query' in .rel file line $relLineNum\");\n } else if ($token=='split') {\n if ($p->getExpectingType($token, 4)) {\n if ($token=='(') {\n $p->get($funcName, $tokenType);\n $funcName=unquote($funcName);\n if (($p->getExpectingType($token, 4)) && ($token==',')) {\n $p->get($splitNdx, $tokenType);\n } else\n $splitNdx=0;\n $srcInfo[$srcNdx]['splitter']['funcName']=$funcName;\n $srcInfo[$srcNdx]['splitter']['splitNdx']=$splitNdx;\n $srcInfo[$srcNdx]['type']='char';\n } else\n $callBack(2, \"ERROR: Was expected a '(' after ':' on query definition in .rel file line $relLineNum\");\n }\n } else if ($token=='substr') {\n if ($p->getExpectingType($token, 4)) {\n if ($token=='(') {\n $p->get($strStart, $tokenType);\n $p->get($token, $tokenType);\n if ($token==',') {\n $p->get($strLength, $tokenType);\n } else\n $strLength=0;\n $srcInfo[$srcNdx]['limits']['strLength']=$strLength;\n $srcInfo[$srcNdx]['limits']['strStart']=$strStart;\n $srcInfo[$srcNdx]['type']='char';\n } else\n $callBack(2, \"ERROR: Was expected a '(' after ':' on query definition in .rel file line $relLineNum\");\n }\n } else if ($token=='constant') {\n $srcFieldName=\"\\\"$srcFieldName\\\" as K$srcNdx\";\n } else {\n $srcInfo[$srcNdx]['type']='query';\n $srcInfo[$srcNdx]['query']['function']=$token;\n }\n } else\n $callBack(2, \"ERROR: Was expected a ':' after field name in .rel file line $relLineNum\");\n }\n\n }\n\n\n if ($srcDBTable>'') {\n if (strpos($srcFieldName,' as ')===FALSE)\n if (!db_fieldExists($srcDBTable, $srcFieldName))\n $srcFieldName='null';\n }\n\n $srcFieldList.=$srcFieldName;\n $srcInfo[$srcNdx]['source']=$srcFieldName;\n }\n $ret=array('srcInfo' => $srcInfo,\n 'srcFieldList' => $srcFieldList,\n 'dstFieldList' => $dstFieldList);\n return $ret;\n }",
"function objFldHeiarchRoot($dbh, $idfld, $parentfld, $tbl, $curid)\r\n{\r\n\t$ret = $curid;\r\n\r\n\tif ($curid)\r\n\t{\r\n\t\t$result = $dbh->Query(\"select $parentfld from $tbl where $idfld='$curid'\");\r\n\t\tif ($dbh->GetNumberRows($result))\r\n\t\t{\r\n\t\t\t$val = $dbh->GetValue($result, 0, $parentfld);\r\n\t\t\tif ($val)\r\n\t\t\t{\r\n\t\t\t\t$ret = objFldHeiarchRoot($dbh, $idfld, $parentfld, $tbl, $val);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $ret;\r\n}",
"abstract public function getFields($entity);",
"function fieldsforobject ($problem, $objecttype, $objectname,\n $prefix, $key, $level, &$fields,\n $doublyreport, $justfullobjects,\n $restrictfields, $topleveltype,\n &$cachedformats) {\n $restrict = $restrictfields[$topleveltype];\n $result2 = mysql_db_query (\"vishnu_prob_\" . $problem,\n \"select * from obj_\" . $objecttype . \" where obj_\" .\n $key . \" = \\\"\" . $objectname . \"\\\";\");\n if (!$result2) \n return;\n $value2 = mysql_fetch_array ($result2);\n mysql_free_result ($result2);\n\n $format = $cachedformats [$objecttype];\n if (! $format) {\n $format = array();\n $result = mysql_db_query (\"vishnu_prob_\" . $problem,\n \"select * from object_fields where object_name = \\\"\" .\n $objecttype . \"\\\";\");\n while ($value = mysql_fetch_array ($result))\n $format[] = $value;\n $cachedformats [$objecttype] = $format;\n mysql_free_result ($result);\n }\n\n for ($i = 0; $i < sizeof ($format); $i++) {\n $value = $format[$i];\n $field_name = $value[\"field_name\"];\n if ($field_name == \"internal_key\")\n continue;\n $field_value = $value2[\"obj_\" . $field_name];\n $field_name = $prefix . $field_name;\n $doreport = (! $restrictfields) || $restrict[$field_name] ||\n ($field_name == $key) || $doublyreport[$topleveltype];\n if ($value[\"is_list\"] == \"true\") {\n if (! $doreport)\n continue;\n $list = $field_value ? explode (\"*%*\", $field_value) : array();\n $fields[] = array (\"field_name\"=>$field_name,\n \"list\"=>$list,\n \"islist\"=>1,\n \"subobjects\"=>($value[\"is_subobject\"] == \"true\"),\n \"datatype\"=>$value[\"datatype\"],\n \"iskey\"=>($field_name == $key),\n \"level\"=>$level);\n } else if ($value[\"is_subobject\"] == \"false\") {\n if ($doreport)\n $fields[] = array (\"field_name\"=>$field_name,\n \"value\"=>$field_value,\n \"datatype\"=>$value[\"datatype\"],\n \"iskey\"=>($field_name == $key),\n \"isglobalptr\"=>($value[\"is_globalptr\"] == \"true\"),\n \"level\"=>$level);\n } else if ($field_value) {\n if ($doreport && ($doublyreport[$value[\"datatype\"]] ||\n $justfullobjects[$value[\"datatype\"]]))\n $fields[] = array (\"field_name\"=>$field_name,\n \"objvalue\"=>$field_value,\n \"datatype\"=>$value[\"datatype\"],\n \"iskey\"=>($field_name == $key),\n \"level\"=>$level);\n if (! $justfullobjects[$value[\"datatype\"]])\n fieldsforobject ($problem, $value[\"datatype\"], $field_value,\n $field_name . \".\", \"internal_key\", $level + 1,\n $fields, $doublyreport, $justfullobjects,\n $restrictfields, $topleveltype, $cachedformats);\n }\n }\n }",
"function &sql_fetch_children( $inQueryString, $rootNode, $idField = \"id\", $parentField = \"parent\") {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->fetch_children($inQueryString,$rootNode,$idField,$parentField);\n\treturn $return;\n}",
"protected function fetch_fields()\n {\n if(empty($this->table_fields))\n {\n $fields = $this->_database->list_fields($this->table);\n foreach ($fields as $field) {\n $this->table_fields[] = $field;\n }\n }\n }",
"abstract public function getFields();",
"abstract public function getFields();",
"abstract protected function getFields();",
"function getRecordData($record, $fields, $relatedSets)\n{\n\t// GET FIELD VALUES FROM DATABASE\n\t$thisRecordData = array();\n\tif($fields != NULL)\n\t{\n\t\t$thisRecordFields = array();\n\t\tforeach($fields as $field)\n\t\t{\n\t\t\t$fieldsN += 1;\n\t\t\t$varName \t\t= $field[0];\n\t\t\t$databaseField \t= $field[1];\n\t\t\t$$varName \t\t= $record->getField($databaseField);\n\t\t\t$thisRecordFields[$fieldsN] = array($varName, $databaseField, $$varName);\n\t\t} // end foreach $fields\n\t} // end if $fields != NULL\n\t\n\t// GET RELATED RECORDS AND THEIR FIELD VALUES FROM DATABASE\n\tif($relatedSets != NULL)\n\t{\n\t\t$thisRecordRelatedSets = array();\n\t\t$relatedSetsN = -1;\n\t\tforeach($relatedSets as $relatedSet)\n\t\t{\n\t\t\t$relatedSetsN += 1;\n\t\t\t$table \t\t\t= $relatedSet[0];\n\t\t\t$relatedFields \t= $relatedSet[1];\n\t\t\t$relatedRecords = $record->getRelatedSet($table);\n\t\t\t$relatedRecordsArray = array();\n\t\t\t$relatedRecordsN\t= -1;\n\t\t\tforeach($relatedRecords as $relatedRecord)\n\t\t\t{\n\t\t\t\t$relatedRecordsN += 1;\n\t\t\t\t$relatedFieldsN = -1;\n\t\t\t\tforeach($relatedFields as $relatedField)\n\t\t\t\t{\n\t\t\t\t\t$relatedFieldsN += 1;\n\t\t\t\t\t$varName \t\t= $relatedField[0];\n\t\t\t\t\t$databaseField \t= $table.'::'.$relatedField[1];\n\t\t\t\t\t$$varName \t\t= $relatedRecord->getField($databaseField);\n\t\t\t\t\t$thisRelatedRecord[$relatedFieldsN] = array($varName, $databaseField, $$varName);\n\t\t\t\t}\n\t\t\t\t$relatedRecordsArray[$relatedRecordsN] = $thisRelatedRecord;\n\t\t\t} // end foreach $relatedRecord\n\t\t\t$thisRecordRelatedSets[$relatedSetsN] = array($table, $relatedRecordsArray);\n\t\t} // end foreach $relatedSet\n\t} // end if $relatedSets != NULL\n\t$thisRecordData = array($thisRecordFields, $thisRecordRelatedSets);\n\treturn $thisRecordData;\n}",
"public function getFields($table);",
"function acf_get_fields($parent)\n{\n}",
"private function getAllTableFields()\n {\n $connection = $this->node->getConnection();\n $mainTable = $this->node->getMainTable();\n $fields = $connection->describeTable($mainTable);\n $metadataTable = $this->node->getTable('magento_versionscms_hierarchy_metadata');\n $fields += $connection->describeTable($metadataTable);\n\n return $fields;\n }",
"function getRecordRelatedSets($recordRelatedSets)\n{\n\tforeach($recordRelatedSets as $recordRelatedSet)\n\t{\n\t\t$tableName \t\t= $recordRelatedSet[0];\n\t\t$relatedRecords = $recordRelatedSet[1];\n\t\t$relatedRecordsVarName = $tableName.'RelatedRecords';\n\t\t$$relatedRecordsVarName = $relatedRecords;\n\t\t$numRelatedRecords = count($relatedRecords);\n\t\tif($relatedRecords != NULL)\n\t\t{\n\t\t\t$relatedRecordsN = 0; \n\t\t\tforeach($relatedRecords as $relatedRecord)\n\t\t\t{\n\t\t\t\t$relatedRecordsN += 1;\n\t\t\t\tgetRecordData($relatedRecord);\n\t\t\t} // end foreach $relatedRecord\n\t\t} // end if($relatedRecords != NULL)\n\t} // end foreach $recordRelatedSet\n\t// what to return?\n}",
"function rst_load_parents($appGlobals,$keyType, $keyValue) {\n // includes kidProgram data when not using kidId (maybe need flag for this)\n $fields = array();\n $fields = dbRecord_parentFamilyCombo::stdRec_addFieldList($fields);\n $fields = stdData_kidProgram_exRecord::stdRec_addFieldList($fields);\n $fieldList = \"`\".implode(\"`,`\",$fields).\"`\";\n $sql = array();\n //???????? need kid program so can load all parents for program\n $sql[] = \"SELECT \".$fieldList;\n switch ($keyType) {\n case ROSTERKEY_KIDID:\n $sql[] = \"FROM `ro:kid`\";\n $sql[] = \"JOIN `ro:family` ON `rFa:FamilyId` = `rKd:@FamilyId`\";\n $sql[] = \"JOIN `ro:parentalunit` ON `rPU:@FamilyId` = `rFa:FamilyId`\";\n $sql[] = \"WHERE `rKd:KidId` ='{$keyValue}'\";\n break;\n case ROSTERKEY_KIDPERIODID:\n $sql[] = \"FROM `ro:kid_period`\";\n $sql[] = \"JOIN `ro:kid` ON `rKd:KidId` = `rKPe:@KidId`\";\n $sql[] = \"JOIN `ro:family` ON `rFa:FamilyId` = `rKd:@FamilyId`\";\n $sql[] = \"JOIN `ro:parentalunit` ON `rPU:@FamilyId` = `rFa:FamilyId`\";\n $sql[] = \"JOIN `ro:kid_program` ON `rKPr:KidProgramId` = `rKPe:@KidProgramId`\";\n $sql[] = \"WHERE `rKPe:KidPeriodId` ='{$keyValue}'\";\n $sql[] = \"GROUP BY `rPU:ParentId`\"; // each row is a unique parent\n break;\n case ROSTERKEY_KIDPROGRAMID:\n $sql[] = \"FROM `ro:kid_program`\";\n $sql[] = \"JOIN `ro:kid` ON `rKd:KidId` = `rKPr:@KidId`\";\n $sql[] = \"JOIN `ro:family` ON `rFa:FamilyId` = `rKd:@FamilyId`\";\n $sql[] = \"JOIN `ro:parentalunit` ON `rPU:@FamilyId` = `rFa:FamilyId`\";\n $sql[] = \"JOIN `ro:kid_program` ON `rKPr:KidProgramId` = `rKPe:@KidProgramId`\";\n $sql[] = \"WHERE `rKPr:KidProgramId` ='{$keyValue}'\";\n $sql[] = \"GROUP BY `rPU:ParentIdt`\"; // each row is a unique parent\n break;\n }\n $sql[] = \"ORDER BY `rPU:ContactPriority`\";\n $query = implode( $sql, ' ');\n $result = $appGlobals->gb_db->rc_query( $query );\n if ($result === FALSE) {\n $appGlobals->gb_sql->sql_fatalError( __FILE__,__LINE__, $query);\n }\n while ($row=$result->fetch_array()) {\n $kidId = $row['rKd:KidId'];\n $kidProgramId = $row['rKPr:KidProgramId'];\n $kid = $this->rst_get_kid($kidId);\n if ( $kid->rstKid_parent == NULL) {\n $kid->rstKid_parent = new dbRecord_parentFamilyCombo;\n if ( !isset($this->rst_map_kidProgram[$kidProgramId]) ) {\n $kidProgram = new stdData_kidProgram_exRecord;\n $kidProgram->stdRec_loadRow($row);\n $this->rst_map_kidProgram[$kidProgramId] = $kidProgram;\n }\n }\n $kid->rstKid_parent->stdRec_loadRow($row);\n }\n}",
"abstract protected function fetchFields($listId);",
"function get_field_parents($field_name, $id)\n{\n global $post;\n\n for($i=1; ; $i++) {\n $field_value = get_field($field_name, $id);\n\n if($field_value) {\n // Field data was found, return it!\n return $field_value;\n break;\n\n } else {\n\n // No field data was found\n if($id == $post->post_parent){\n // Current page is top parent\n break;\n } else {\n // Current page doesnt have a value, check parent page\n $id = $post->post_parent;\n $field_value = get_field($field_name, $id);\n return $field_value;\n break;\n }\n\n }\n\n }\n\n}",
"function getInlineDBfields($table, $fConf) {\n\t\t// field type set to 'text' to fit csv values\n\t\tif ($fConf['conf_ff'] == 0) {\n\t\t\t$DBfields[] = $fConf['fieldname'] . ' text NOT NULL,';\n\t\t} elseif ($fConf['MM']) {\n\t\t\t$DBfields[] = $fConf['fieldname'] . ' int(10) DEFAULT \\'0\\' NOT NULL,';\n\t\t} else {\n\t\t\t$DBfields[] = $fConf['fieldname'] . ' tinytext NOT NULL,';\n\t\t}\n\n\t\t// FIXME: put the following case statments into separate function\n\t\tif ($fConf['foreign_field']) {\n\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t$count = '';\n\t\t\t\tif (preg_match(\n\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['foreign_table']\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\tif (preg_match('/' . $fConf['foreign_field'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\tarray('fieldname' => $fConf['foreign_field'], 'type' => 'passthrough');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($fConf['foreign_table_field']) {\n\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t$count = '';\n\n\t\t\t\tif (preg_match(\n\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['foreign_table']\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\tif (preg_match('/' . $fConf['foreign_table_field'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\tarray('fieldname' => $fConf['foreign_table_field'], 'type' => 'passthrough');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($fConf['foreign_sortby']) {\n\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t$count = '';\n\n\t\t\t\tif (preg_match(\n\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['foreign_table']\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\tif (preg_match('/' . $fConf['foreign_sortby'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\tarray('fieldname' => $fConf['foreign_sortby'], 'type' => 'passthrough');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($fConf['foreign_selector']) {\n\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t$count = '';\n\n\t\t\t\tif (preg_match(\n\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['foreign_selector']\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\tif (preg_match('/' . $fConf['foreign_selector'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\tarray('fieldname' => $fConf['foreign_selector'], 'type' => 'select');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($fConf['foreign_unique']) {\n\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t$count = '';\n\n\t\t\t\tif (preg_match(\n\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['foreign_unique']\n\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\tif (preg_match('/' . $fConf['foreign_unique'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\tarray('fieldname' => $fConf['foreign_unique'], 'type' => 'select');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($fConf['MM']) {\n\t\t\t$intermediateTable = $this->sPS(\n\t\t\t\t\"\n\t\t\t\t#\n\t\t\t\t# Table structure for intermediate table '\" . $table . \"_\" . $fConf['MM'] . \"_mm'\n\t\t\t\t#\n\t\t\t\tCREATE TABLE \" . $table . \"_\" . $fConf['MM'] . \"_mm (\n\t\t\t\t\tuid_local int(11) NOT NULL,\n\t\t\t\t\tuid_foreign int(11) NOT NULL,\n\t\t\t\t\tsorting int(10) NOT NULL,\n\t\t\t\t);\n\t\t\t\"\n\t\t\t);\n\t\t\t$this->wizard->ext_tables_sql[] = chr(10) . $intermediateTable . chr(10);\n\t\t}\n\n\t\tif ($fConf['conf_symmetric']) {\n\t\t\tif ($fConf['conf_symmetric_field']) {\n\t\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t\t$count = '';\n\n\t\t\t\t\tif (preg_match(\n\t\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['conf_symmetric_field']\n\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\t\tif (preg_match('/' . $fConf['conf_symmetric_field'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\t\tarray('fieldname' => $fConf['conf_symmetric_field'], 'type' => 'select');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($fConf['conf_symmetric_sortby']) {\n\t\t\t\tforeach ($this->wizard->wizArray['tables'] as $k => $v) {\n\t\t\t\t\t$count = '';\n\n\t\t\t\t\tif (preg_match(\n\t\t\t\t\t\t'/' . $this->wizard->wizArray['tables'][$k]['tablename'] . '/', $fConf['conf_symmetric_sortby']\n\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tforeach ($this->wizard->wizArray['tables'][$k]['fields'] as $n => $field) {\n\t\t\t\t\t\t\tif (preg_match('/' . $fConf['conf_symmetric_sortby'] . '/', $field['fieldname'], $match)) {\n\t\t\t\t\t\t\t\tprint_r('Error: Field name already exists!');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!count($match)) {\n\t\t\t\t\t\t\t$this->wizard->wizArray['tables'][$k]['fields'][$count + 1] =\n\t\t\t\t\t\t\t\tarray('fieldname' => $fConf['conf_symmetric_sortby'], 'type' => 'passthrough');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $DBfields;\n\t}",
"function ext_tree($parent_id, $con, $lev, $info) {\n\n // rows selection from TBSM tables\n $sel = \"SELECT SERVICEINSTANCEID, SERVICEINSTANCENAME, DISPLAYNAME, SERVICESLANAME, TIMEWINDOWNAME\n\t\t\t\tFROM TBSMBASE.SERVICEINSTANCE, TBSMBASE.SERVICEINSTANCERELATIONSHIP\n\t\t\t\tWHERE PARENTINSTANCEKEY = '$parent_id' AND SERVICEINSTANCEID = CHILDINSTANCEKEY\";\n $stmt = db2_prepare($con, $sel);\n $result = db2_execute($stmt);\n\n $values = 0;\n while ($row = db2_fetch_assoc($stmt)) {\n $values++;\n $info[$lev] = array (\n 'level' => $lev,\n 'endpoint' => false,\n 'id' => $row['SERVICEINSTANCEID'],\n 'service' => $row['SERVICEINSTANCENAME'],\n 'display' => $row['DISPLAYNAME'],\n 'template' => $row['SERVICESLANAME'],\n 'maintenance' => $row['TIMEWINDOWNAME'],\n );\n // unique value\n if (!in_array($row['SERVICEINSTANCEID'], array_column($GLOBALS['results'], 'id')))\n $GLOBALS['results'][] = $info[count($info)-1];\n\n // recursive function call\n ext_tree($row['SERVICEINSTANCEID'], $con, $lev+1, $info);\n }\n\n return ($values > 0);\n}",
"function searchByXML_deep($xml, $table, $recurLevel=0) {\n // if($this->checkIds($xml, $recurLevel)) {\n\n // return 0;\n\n\n // } else {\n foreach ($xml->childNodes as $link) {\n\n //TODO: empty text nodes should be removed \n if($link->nodeType == 3 )\n continue;\n\n foreach($link->childNodes as $child) {\n \n // skip text nodes\n if($child->nodeType == 3)\n continue;\n\n Debug::printMsg('<li><b> '.$this->className.'->'.$link->tagName.'->'.$child->tagName.' </b></li>');\n $node = DataNode::factory($child);\n\n // if node has id, then do not dive any deeper\n if($this->checkIds($child, $recurLevel+1)) {\n\n $level = $recurLevel + 1;\n IdaDb::allJoinsClass_new($this, $link->tagName, $node, $table, \"root_\".$level);\n\n } else if(get_class($node) == \"IdaTable\") {\n\n $node->searchByXml_new($child, $table, $this, $link->tagName, \"root_\".$recurLevel);\n\n } else {\n Debug::printMsg('<b>Diving in </b>');\n\n/*\n if($node->searchByXml_new($child, $table, $recurLevel+1, $this, $link->tagName, \"root_0\")) {\n Debug::printMsg(\"nodes found<br>\");\n IdaDb::allJoinsClass_new($this, $link->tagName, $node, $table, \"root_1\");\n } else {\n\n Debug::printMsg(\"nodes NOT found<br>\");\n IdaDb::allJoinsClass_new($this, $link->tagName, $node, $table);\n\n \n }\n */\n }\n }\n }\n // }\n }",
"function GetFieldsData()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::GetFieldsData();\" . \"<HR>\";\n $this->GetLangFieldsData(\"main\", $data);\n for ($j = 0; $j < sizeof($this->Kernel->Languages); $j ++) {\n $this->GetLangFieldsData($this->Kernel->Languages[$j], $data);\n } // for lang\n\n\n if (count($this->field_group_names)) {\n for ($j = 0; $j < sizeof($this->field_group_names); $j ++)\n $this->GetLangFieldsData($this->field_group_names[$j], $data);\n } //--for additional groups\n\n\n if ($this->multilevel) {\n $data[$this->parent_field] = $this->parent_id;\n }\n if (strlen($this->custom_val) && strlen($this->custom_var)) {\n $data[$this->custom_var] = $this->custom_val;\n }\n return $data;\n }",
"function addFields($entity, $name, $not_for_field_list = \"\")\n{\n $fields = array();\n $page_info = getPageInfo($entity['pagename']);\n global $db;\n \n $link = getDBLink();\n \n //do we know where to look at all?\n if ($name == \"\") {\n $entity['fields'] = array();\n return $entity;\n }\n \n // -- first, we see what we find in the database's metadata\n \n //test for Information_schema.columns (SQL-92 standard)\n $client_api = explode('.', mysqli_get_server_info(getDBLink()));\n if ($client_api[0] >= 5) {\n //test for existence of/access to INFORMATION_SCHEMA database\n $info_schema_accessible = false;\n $db_list = pp_run_query('Show databases;');\n foreach($db_list as $row){\n if ($row[\"Database\"] == \"information_schema\") {\n $info_schema_accessible = true;\n }\n }\n if ($info_schema_accessible) {\n // information_schema exists\n //we align the columns that we'd also find in the \"SHOW COLUMNS\"-\n //Query (see below) to the standard query with \" AS \"\n $query = \" SELECT\nCOLUMN_NAME AS `Field`,\nCOLUMN_KEY AS `Key`,\nCOLUMN_TYPE AS `Type`,\nCHARACTER_MAXIMUM_LENGTH,\nNUMERIC_PRECISION,\nCOLUMN_DEFAULT AS `Default`,\nEXTRA AS `Extra`,\nCOLUMN_COMMENT\nFROM information_schema.COLUMNS WHERE TABLE_NAME = '\".$entity[\"tablename\"].\"' AND TABLE_SCHEMA = '\".$db.\"'\";\n }\n }\n //if we can't use it, do it the old way, with less information, sadly\n if ($query == \"\") {\n $query = \"SHOW COLUMNS FROM `\".$entity[\"tablename\"].\"`\";\n }\n \n $res = pp_run_query($query);\n $i = 0;\n foreach($res as $row){\n \n //primary key\n if ($row['Key']=='PRI') {\n if ($entity['pk']!=\"\") {\n // seems to be a 2-field PK - not supported!\n $entity['pk_multiple'] = true;\n }\n $entity[\"pk\"] = $row['Field'];\n //overwriting the first!\n $entity[\"pk_type\"] = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n }\n \n \n if (!eregi($row['Field'], $not_for_field_list)) {\n //determine length - use only \"Type\" due to http://polypager.nicolashoening.de/?bugs&nr=318\n //$len = $row['CHARACTER_MAXIMUM_LENGTH'];\n //if ($len == \"\" or $len == \"NULL\") {\n // $len = $row['NUMERIC_PRECISION'];\n //}\n //those fields are not there when we said SHOW COLUMNS, so...\n //if ($len == \"\" or $len == \"NULL\") {\n $hits = array();\n eregi('[0-9]+',$row['Type'],$hits);\n $len = $hits[0];\n //}\n //support sets or enums,\n //but we save the valuelist - PolyPager can handle those\n if (eregi('^set\\(', $row['Type']) or eregi('^enum\\(', $row['Type'])) {\n $type = preg_replace('@\\((\\'.+\\'\\,?)+(\\'.+\\')\\)$@', '', $row['Type']);\n eregi('\\((\\'.*\\')\\)', $row['Type'], $hits);\n $hlist = explode(',', $hits[1]);\n $valuelist = array();\n //remove '' on outsets\n foreach($hlist as $l) $valuelist[] = trim($l,\"'\");\n $valuelist = implode(',', $valuelist);\n $valuelist = str_replace(\",,\", \",\", $valuelist);\n } else {\n $type = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n $valuelist = \"\";\n }\n $field = array(\"name\"=>$row['Field'],\n \"data_type\"=>$type,\n \"size\"=>$len,\n \"order_index\"=>''.$i,\n \"help\"=>$row['COLUMN_COMMENT'],\n \"default\"=>$row['Default'],\n \"valuelist\"=>$valuelist);\n \n //if default is CURRENT_TIMESTAMP, then retrieve it\n if ($type=\"timestamp\" and $row['Default']==\"CURRENT_TIMESTAMP\") {\n $field['default'] = date(\"Y-m-d H:i:s\");\n }\n \n if ($row['Extra'] == 'auto_increment') {\n $entity['hidden_form_fields'].=','.$row['Field'];\n $field['auto'] = 1;\n } else {\n $field['auto'] = 0;\n }\n \n //IMPORTANT: In MySQL we code a boolean as int(1) !!!\n if (($row['Type'] == \"int(1)\" or $row['Type'] == \"tinyint(1)\")) {\n $field[\"data_type\"] = \"bool\";\n }\n \n //set some defaults\n $field['formgroup'] = \"\";\n \n $fields[count($fields)] = $field;\n \n $i++;\n }\n \n }\n \n // -- now we enrich with data from the _sys_fields table\n if ($page_info != \"\") {\n $query = \"SELECT * FROM _sys_fields WHERE pagename = '\".$page_info[\"name\"].\"'\";\n $res = pp_run_query($query);\n foreach($res as $row){\n for ($i=0; $i<count($fields); $i++) {\n \n if ($fields[$i][\"name\"] == $row[\"name\"]) {\n $fields[$i][\"label\"] = $row[\"label\"];\n $fields[$i][\"validation\"] = $row[\"validation\"];\n if ($fields[$i][\"valuelist\"] == \"\") {\n //if from db (set/enum-type), it shouldn't be overwritten\n $fields[$i][\"valuelist\"] = stripCSVList($row[\"valuelist\"]);\n }\n $fields[$i][\"not_brief\"] = $row[\"not_brief\"];\n $fields[$i][\"order_index\"] = $row[\"order_index\"];\n $fields[$i][\"embed_in\"] = $row[\"embed_in\"];\n }\n if (eregi('int',$fields[$i][\"data_type\"]) and $fields[$i][\"size\"] != 1) {\n $fields[$i][\"validation\"] = 'number';\n }\n }\n }\n }\n \n // group field : valuelist stuff\n for ($i=0; $i<count($fields); $i++) {\n // remember from where the values come\n if ($fields[$i][\"valuelist\"] != \"\") {\n $fields[$i]['valuelist_from_db'] = true;\n } else {\n $fields[$i]['valuelist_from_db'] = false;\n }\n }\n \n uasort($fields,\"cmpByOrderIndexAsc\");\n $entity[\"fields\"] = $fields;\n \n return $entity;\n}",
"public function getChildObjects(){\n\t\tset_time_limit(0);\n\t\tif(!isset($_REQUEST['column'])) $_REQUEST['column'] = null;\n\t\t$Column = isset($_REQUEST['column']) ? explode(\",\",$_REQUEST['column']) : null;\n\t\tif(!isset($_REQUEST['value'])) $_REQUEST['value'] = null;\n\t\t$Value = isset($_REQUEST['value']) ? explode(\",\",$_REQUEST['value']) : null;\n\t\t$Object = $this->urlParams['ID'];\n\t\tif(!isset($_REQUEST['orderBy'])) $_REQUEST['orderBy'] = null;\n\t\tif(!isset($_REQUEST['orderByDirection'])) $_REQUEST['orderByDirection'] = 'DESC';\n\t\t$orderByString = \"\";\n\t\t// order by stuff...\n\t\t$dbFields = Object::create($Object)->db();\n\t\tif ($_REQUEST['orderBy']){\n\t\t\tforeach (explode(',',$_REQUEST['orderBy']) as $oc){\n\t\t\t\t$OrderByTemp = \"\";\n\t\t\t\tif(count(explode('.',$oc))>1){\n\t\t\t\t\t$OrderByTmpArr = explode('.',$oc);\n\t\t\t\t\t$tmpObj = Object::create($Object);\n\t\t\t\t\t$has_one = $tmpObj->has_one();\n\t\t\t\t\t$subObj = '';\n\t\t\t\t\tforeach($has_one as $key=>$value) {\n\t\t\t\t\t\tif($key == $OrderByTmpArr[0]) {\n\t\t\t\t\t\t\t$subObj = ($value == \"Image\") ? \"File\" : $value;\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$OrderByTmp = $subObj ? \"{$subObj}.{$OrderByTmpArr[1]}\" : \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$OrderByTmp = (in_array($oc, $dbFields)) ? \"{$Object}.{$oc}\" : \"\";\n\t\t\t\t}\t\n\t\t\t\t$orderByString .= $OrderByTemp ? \"{$OrderByTmp} {$_REQUEST['orderByDirection']}, \" : \"\";\n\t\t\t}\n\t\t\t$orderByString = $orderByString ? substr($orderByString, 0, -2) : \"\";\n\t\t}\n\t\t$OrderBy = $_REQUEST['orderBy'] ? \"{$orderByString}\" : \"{$Object}.ID DESC\";\n\t\t$Query = '';\n\t\tif($Column != null && $Value != null) {\n\t\t\t$i = 0;\n\t\t\tforeach ($Column as $col) {\n\t\t\t\t$Query .= \"{$col}='{$Value[$i]}' AND \";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$Query = substr($Query, 0, -5);\n\t\t}\n\t\tif($results = DataObject::get($Object, $Query, $OrderBy)) {\n\t\t\t$f = new JSONDataFormatter(); \n\t\t\t$json = $f->convertDataObjectSet($results);\n\t\t\treturn $json;\n\t\t} else {\n\t\t\treturn '{\"results\": 0, \"rows\":[], \"query\":\"'.$Query.'\"}';\n\t\t}\n\t}",
"function getParentName($parent_type,$parent_id)\n{\n\t$mysqli = makeSqlConnection();\n\t$sql = '';\n\t\n\tif($parent_type == 'Accounts')\n\t{\n\t\t$sql = \"SELECT name FROM accounts WHERE id = '$parent_id'\";\n\t\t$res = $mysqli->query($sql);\n\t\twhile($r = mysqli_fetch_assoc($res))\n\t\t{\n\t\t\t$obj = (object) $r;\t\n\t\t\treturn $obj->name;\n\t\t}\n\t}\n else if($parent_type == 'Contacts')\n\t{\n\t\t$sql = \"SELECT first_name FROM contacts WHERE id = '$parent_id'\";\n\t\t$res = $mysqli->query($sql);\n\t\twhile($r = mysqli_fetch_assoc($res))\n\t\t{\n\t\t\t$obj = (object) $r;\t\n\t\t\treturn $obj->first_name;\n\t\t}\n\t}\n\telse if($parent_type == 'Leads')\n\t{\n\t\t$sql = \"SELECT first_name,last_name FROM leads WHERE id = '$parent_id'\";\n\t\t$res = $mysqli->query($sql);\n\t\twhile($r = mysqli_fetch_assoc($res))\n\t\t{\n\t\t\t$obj = (object) $r;\t\n\t\t\t$temp = $obj->first_name.' '.$obj->last_name;\n\t\t\treturn $temp;\n\t\t}\n\t}\n\telse if($parent_type == 'Opportunities')\n\t{\n\t\t$sql = \"SELECT name FROM opportunities WHERE id = '$parent_id'\";\n\t\t$res = $mysqli->query($sql);\n\t\twhile($r = mysqli_fetch_assoc($res))\n\t\t{\n\t\t\t$obj = (object) $r;\t\n\t\t\treturn $obj->name;\n\t\t}\n\t}\n\telse \n\t{\n\t\treturn '';\t\n\t}\n\t\n\n}",
"public function getRelatedFields($field, $leftOriginField = true) {}",
"private function createFields(){\n //Human::log(\"------------- Create fields model \".$this->modelName);\n self::$yetInit[get_class($this)]=true;\n //let's init database.\n $modelName=get_class($this);\n $modelNameManager=$modelName.\"Manager\";\n if(!class_exists($modelNameManager)){\n $modelNameManager=\"DbManager\";\n }\n $rc=new ReflectionClass($modelName);\n $rc->setStaticPropertyValue(\"manager\", new $modelNameManager( $modelName ));\n \n //browse the class properties to find db fields and then store it in a good order (keys first, associations later)\n\t $fields=array();\n foreach ($rc->getProperties() as $field){\n if($field->isPublic()){\n\n\n //get the type from the @var type $field name comment...yes, I'm sure.\n $comments=$field->getDocComment();\n $details=CodeComments::getVariable($comments);\n\n $type=$details[\"type\"];\n $isVector=$details[\"isVector\"];\n $description=$details[\"description\"];\n $fieldName=$field->name;\n\n $fieldObject=$this->getDbField($fieldName,$type,$isVector);\n\n if($fieldObject){\n $fieldObject[\"comments\"]=$description;\n switch($fieldObject[\"type\"]){\n\n case \"OneToOneAssoc\":\n case \"NToNAssoc\":\n //associations at the end\n array_push($fields, $fieldObject);\n break;\n\n default :\n //classic fields at the beginning\n array_unshift($fields, $fieldObject);\n\n }\n\n }\n }\n }\n\t //create the fields\n\t foreach ($fields as $f){\n\t\t$f[\"options\"][Field::COMMENTS]=$f[\"comments\"];\n Field::create($modelName.\".\".$f[\"name\"],$f[\"type\"],$f[\"options\"]);\n //Human::log($this->modelName.\" Create field \".$f[\"name\"]);\n \n\t }\n \n\t //whooho!\n $this->db()->init(); \n }",
"function getDef()\n{\n $subModule = GetModule($this->moduleID);\n $subModuleAlias = $this->moduleID . '_sub';\n\n trace($subModule->conditions, \"Submodule Conditions for {$this->moduleID}\");\n trace(\"parentKey {$subModule->parentKey}\");\n trace(\"localKey {$subModule->localKey}\");\n\n\n $parentSelects = array();\n $parentJoins = array();\n $subSelects = array();\n $subJoins = array();\n\n if(!empty($subModule->localKey)){\n// $localModuleField = $subModule->ModuleFields[$subModule->localKey];\n// $parentModuleField = GetModuleField($this->parentModuleID, $subModule->parentKey);\n\n $parentSelects[$subModule->localKey] = GetQualifiedName($subModule->parentKey, $this->parentModuleID); //indexing $parentSelects by sub field, intentionally\n $parentJoins = array_merge($parentJoins, GetJoinDef($subModule->parentKey, $this->parentModuleID));\n\n $subSelects[$subModule->localKey] = GetQualifiedName($subModule->localKey, $this->moduleID);\n $subJoins = array_merge($subJoins, GetJoinDef($subModule->localKey, $this->moduleID));\n }\n\n //loop through submodule conditions and add to the above.\n foreach($subModule->conditions as $conditionName => $conditionValue){\n //handle all the conditions in a clever way just like SummaryField::makeJoinDef()\n }\n //might need to set $SQLBaseModuleID?\n $subJoins = SortJoins($subJoins);\n\ntrace($this->satisfactions, \"SubModuleTarget satisfactions\");\n\n //$snippet = '0 < ( SELECT COUNT(*) FROM `'.$this->moduleID.'` WHERE _Deleted = 0 )';\n $subModuleJoin = \"LEFT OUTER JOIN ( SELECT\\n\";\n $satisfactionSelects = array();\n foreach($this->satisfactions as $satisfaction){\n //more than one 'type' in the same target is probably not a good idea.\n switch($satisfaction['type']){\n case 'matching-rows':\n $subModuleJoin .= \"COUNT(*) AS matchingRows\";\n switch($satisfaction['mode']){\n case 'min':\n $satisfactionSelects[] = $satisfaction['value'] . \" <= `$subModuleAlias`.matchingRows\";\n break;\n case 'max':\n $satisfactionSelects[] = $satisfaction['value'] . \" >= `$subModuleAlias`.matchingRows\";\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n }\n $select = join(' AND ', $satisfactionSelects);\n\n $subModuleJoinDefs = array();\n $groupBys = array();\n foreach($subSelects as $subFieldName => $subSelect){\n $subModuleJoin .= \",\\n$subSelect AS $subFieldName\";\n $subModuleJoinDefs[] = \"{$parentSelects[$subFieldName]} = `{$subModuleAlias}`.$subFieldName\";\n $groupBys[] = $subSelect;\n }\n $subModuleJoin .= \"\\nFROM `{$this->moduleID}`\";\n foreach($subJoins as $subJoin){\n $subModuleJoin .= \"\\n$subJoin\";\n }\n\n $subModuleJoin .= \"\\nWHERE _Deleted = 0\";\n $subModuleJoin .= \"\\nGROUP BY \".join(', ', $groupBys);\n $subModuleJoin .= \") AS `$subModuleAlias` ON (\\n\";\n $subModuleJoin .= join(\"\\n \", $subModuleJoinDefs);\n $subModuleJoin .= \"\\n) \";\n\n global $gTableAliasParents;\n global $SQLBaseModuleID;\n $gTableAliasParents[$SQLBaseModuleID][$subModuleAlias] = $this->parentModuleID;\n\n $joins = array(\n $subModuleAlias => $subModuleJoin\n );\n $joins = array_merge($parentJoins, $joins);\n $joins = SortJoins($joins);\n\ntrace($joins, \"SubModuleTarget joins\");\n\n return array('snippet' => $select, 'joins' => $joins);\n}",
"function _data_recurse($id, &$children,$list=array(), $maxlevel=9999, $level=0,$indent='',$data=array())\n {\n // pr($children);\n $id_parent=$id;\n if (@$children[$id] && $level <= $maxlevel)\n {\n $field_parent_id =$this->field_parent_id ; $fieldtitle=$this->field_parent_name; $fieldkey = $this->key;\n foreach ($children[$id] as $t)\n {\n //echo \"<br>Ifieldkey=\".$fieldkey;\n $id = $t->$fieldkey;\n $tmp = $t;\n //$tmp['children'] = count(@$children[$id]);\n\n //== Su ly parent\n /* $tmp->{'_parent'} =array();\n if($data && $id_parent > 0) {\n foreach($data as $p)\n if($p->$fieldkey == $id_parent)\n $tmp->{'_parent'} = $p;\n }*/\n //== Su ly sub\n $tmp->{'_subs'} = @$children[$id]?(@$children[$id]):array();\n $tmp->{'_sub_ids'} = array();\n if($tmp->{'_subs'}){\n //$sub_ids=array();\n foreach($tmp->{'_subs'} as $it)\n {\n $tmp->{'_sub_ids'}[]= $it->$fieldkey;\n }\n }\n $pre \t= '|-- '; $spacer = ' ';\n //$pre \t= ''; $spacer = '';\n //== Su ly hien thi moi lien he cha con\n if ($t->$field_parent_id == 0) {\n $txt \t= $t->$fieldtitle;\n } else {\n /*foreach($children as $key => $vs){\n foreach($vs as $v){\n if($t->$field_parent_id == $v->$fieldkey){\n $pre = $v->$fieldtitle.' >> ';\n break;\n }\n }\n if($pre) break;\n\n }*/\n $txt \t= $pre . $t->$fieldtitle;\n }\n $tmp->{'_'.$this->field_name} = \"$indent$txt\";// add more field service for display tree\n $list[$id] = $tmp ;\n $list = $this->_data_recurse($id, $children,$list, $maxlevel, $level+1, $indent . $spacer,$data);\n\n }\n }\n return $list;\n }",
"public function fetchFieldDefinitions()\n\t\t{\n\t\t\tif( $this->fieldDefinitions )\n\t\t\t{\n\t\t\t\treturn $this->fieldDefinitions;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * remember, the model classes return a mysql resource. in this case, it is the datasources\n\t\t\t * responsibility to act upon the resultset\n\t\t\t */\n\t\t\t$fieldDefinitions = $this->getIDatasourceModel()\n\t\t\t\t->getFieldDefinitions(); \n\n\t\t\t$count = 0;\n\n\t\t\t$fieldDefs = null;\n\t\t\twhile( $fd = mysql_fetch_object($fieldDefinitions) )\n\t\t\t{ \n\t\t\t\t$fieldDefs->{$fd->name} = $fd;\n\t\t\t\t//$count++;\n\t\t\t\t//$this->cout( DRED.\" --Now doing field Def number \" . $count .NC.CLEAR.CR );\n\t\t\t} \n\n\t\t\t//echo \"\\n\\n\";\n\t\t\t$this->setFieldDefinitions( $fieldDefs );\n\t\t\treturn $this->fieldDefinitions;\n\t\t}",
"public function getTable ($fields=FALSE,$filters=FALSE, $table = FALSE){\n $query = \"SELECT id, name \";\n $query .= \" FROM permissions_entity\";\n $query .=\" WHERE type = 0;\";\n $groups = $this->db->select($query,MYSQLI_ASSOC, FALSE, \"name\");\n $query = \"SELECT * FROM permissions WHERE type = 0 AND (\";\n if ($fields){\n $first = TRUE;\n foreach($fields as $field){\n if (!$first) $query .= \" OR \";\n $query .= '(permission LIKE \\''.$field[2].'\\' AND value != \"\")';\n $first = FALSE;\n }\n }\n $query .= \")\";\n if ($filters){\n $first = TRUE;\n foreach ($filters as $filter){\n $query .= \" AND `\".$filter[\"0\"].\"`\".$filter[\"1\"].\"'\".$filter[\"2\"].\"'\";\n $first = FALSE;\n }\n if ($search){\n $query .= \" AND \";\n }\n $query .= \" )\";\n }\n if ($searches){\n $first = TRUE;\n foreach ($searches as $search){\n if (!$first) $query .= \" AND \";\n $query .= \"`\".$search[\"name\"].\"`\".$search[\"operand\"].\"'\".$search[\"value\"];\n $first = FALSE;\n }\n }\n $order = FALSE;\n $direction = FALSE;\n $NOORDER = TRUE;\n if (!$_REQUEST[\"order\"][\"field\"] && !$NOORDER) $order = \"order_id\"; else $order = $_REQUEST[\"order\"][\"field\"];\n if (!$_REQUEST[\"order\"][\"direction\"] && !$NOORDER) $direction = \"ASC\"; else $direction = $_REQUEST[\"order\"][\"direction\"];\n \n if ($order){\n $query .= ' ORDER BY '.$order;\n }\n if ($direction){\n $query .= ' '.$direction;\n }\n $query .= ';';\n $options = $this->db->select($query);\n foreach ($options as $value){\n $groups[$value[\"name\"]][$value[\"permission\"]] = $value[\"value\"];\n }\n \n $query = \"SELECT * FROM permissions_inheritance WHERE type = 0\";\n $groups_parent = $this->db->select($query,MYSQLI_ASSOC, FALSE, \"child\");\n foreach ($groups_parent as $key => $value){\n $groups[$key][\"parent\"] = $value[\"parent\"];\n }\n return $groups;\n }",
"function build_context_rel() {\n \n global $db;\n $savedb = $db->debug;\n \n // total number of records\n $total = count_records('context');\n // processed records\n $done = 0;\n print_progress($done, $total, 10, 0, 'Processing context relations');\n $db->debug = false;\n if ($contexts = get_records('context')) {\n foreach ($contexts as $context) {\n // no need to delete because it's all empty\n insert_context_rel($context, false, false);\n $db->debug = true;\n print_progress(++$done, $total, 10, 0, 'Processing context relations');\n $db->debug = false;\n }\n }\n \n $db->debug = $savedb;\n}",
"public static function getResolveForeignIdFields();",
"abstract protected function getIndexTableFields();",
"function get_foreigners($entity, $joins){\n //\n //let $foreigns be the array of foreigners to be returned \n $foreigns=[];\n //\n //Get the already existing join entities and store them in an array \n //$join_entities\n $join_entities=[];\n //\n //Test if there are joins already formulated if none push this entity \n if(empty($joins)){\n array_push($join_entities, $this->entity);\n }\n //\n //There are joins already existing \n foreach ($joins as $join){\n //\n //Push all the entities to the join entities\n array_push($join_entities, $this->entity);\n array_push($join_entities, $join->entity);\n }\n //\n //Get the columns that reference the given entity\n foreach ($join_entities as $entity1){\n //\n //Get the first index\n $index1= array_values($entity1->indices)[0];\n //\n //loop through indices to retrieve the column foreigns\n foreach ($index1 as $cname){\n $column= $entity1->columns[$cname];\n //\n //Test if is an instance of column foreign\n if($column instanceof \\column_foreign){\n //\n //Get the referenced entity \n $entity2=$this->entity->dbase->entities[$column->ref_table_name];\n //\n //Test if entity2 is similar to the given entity\n if ($entity2===$entity){\n //\n //push the column to the foreigns\n array_push($foreigns, $column);\n }\n }\n } \n //\n //Get the entities being refereced by the given entity\n $index= array_values($entity->indices)[0];\n //\n //loop through indices to retrieve the column foreigns\n foreach ($index as $cname){\n $column= $entity->columns[$cname];\n //\n //Test if is an instance of column foreign\n if($column instanceof column_foreign){\n //\n //Get the referenced entity \n $entity2=$this->dbase->entities[$column->ref_table_name];\n //\n //Test if entity2 is similar any entity referenced\n if ($entity2===$entity1){\n //\n //push the column to the foreigns\n array_push($foreigns, $column);\n }\n }\n }\n }\n return $foreigns;\n }",
"public abstract function queryModelFields($fields, \\MPF\\Db\\Page $page = null);",
"function getRecs($typo3rec, $orderField='',$L=0,$linkwrap='',$infinity=false){\n\t\t\n\t\t//\n\t\tglobal $FE_USER,$EXEC_TIME,$TCA,$TYPO3_DB;\n\t\t\n\t\t//Infinity is preventing infinite loops of linked records...crazy people might\n\n\t\t/*\n\t\tCheck user access\n\t\t*/\n\t\tif($FE_USER->user['uid']>0){\n\t\t\t//logged in\n\t\t\tif($FE_USER->user['usergroup']){\n\t\t\t//should be in usergroup but if not to prevent sql error\n\t\t\t\t$ug = $FE_USER->user['usergroup'] .',';\n\t\t\t}else{\n\t\t\t\t$ug='';\n\t\t\t}\n\t\t\t$fe_access = ' AND fe_group IN ('.$ug.'0,-2) AND fe_group !=-1';\n\t\t}else{\n\t\t\t//-1 hide at login, -2 show at login\n\t\t\t$fe_access =' AND fe_group IN (0,-1)';\n\t\t}\t\n\t\n\t\t$records = array();\n\t\t$fRecs = explode(',',$typo3rec);\n\t\tif($TCA==null){\n\t\t\t//added 04/06/2006\n\t\t\t$this->getCompressedTCarray();\n\t\t}\n\t\tforeach($fRecs as $k=>$v){\n\t\t\t\t\n\t\t//get table name and check against TCA...\n\t\t\t\t$tn = $this->getTableName($v);\n\t\t\t\t$rid = $this->getRecordId($v);\n\t\t\t\tif($TCA[$tn] && t3lib_div::testInt($rid)){\n\t\t\t\t\tif($TCA[$tn]['columns'][$orderField]){\n\t\t\t\t\t\t$orderBy = $orderField;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$orderBy ='';\n\t\t\t\t\t}\n\n\t\t\t\t\tif($tn=='tt_content'){\n\t\t\t\t\t\t$fields = 'uid,CType,bodytext,fe_group,header,subheader,image,list_type,media,header_link,multimedia,pid,records,sys_language_uid,pi_flexform,l18n_parent';\n\t\t\t\t\t\t$where = ' AND NOT deleted AND NOT hidden AND starttime<='.$EXEC_TIME.' AND (endtime=0 OR endtime>'.$EXEC_TIME.') '.$fe_access;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$fields ='*';\n\t\t\t\t\t\t$where = $this->deleteClause($tn) . $this->enableFields($tn);\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t10/10/2007\n\t\t\t\t\tThis makes linked records return the chosen language even if it is the language root record that is linked.\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\tif($L>0){\n\t\t\t\t\t\t$res = $TYPO3_DB->exec_SELECTquery ($fields, $tn, 'l18n_parent = '.$rid .' AND sys_language_uid='.$L. $where , '', $orderBy);\n\t\t\t\t\t\t$num=$TYPO3_DB->sql_num_rows($res);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(!($num>0) || $L==0){\n\t\t\t\t\t\t$res = $TYPO3_DB->exec_SELECTquery ($fields, $tn, 'uid= '.$rid . $where, '', $orderBy);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\twhile ($row = $TYPO3_DB->sql_fetch_assoc($res))\t{\n\t\t\t\t\t\tif($tn=='tt_content'){\n\t\t\t\t\t\t\t$row['path'] = $this->getPath($row['CType'],$row['list_type']);\n\t\t\t\t\t\t\tif(strlen($row['pi_flexform'])>0){\n\t\t\t\t\t\t\t\t$row['pi_flexform'] = t3lib_div::xml2array($row['pi_flexform']);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tunset($row['pi_flexform']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(strlen($row['bodytext'])>0){\n\t\t\t\t\t\t\t\t$row['bodytext'] = $this->parseText($row['bodytext'],$linkwrap);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($row['header_link']){\n\t\t\t\t\t\t\t\t$row['header_link'] = $this->TS_links_rte($row['header_link'], $linkwrap);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($row['CType']=='shortcut' && $row['records'] ){\n\t\t\t\t\t\t\tif(!$infinity){\n\t\t\t\t\t\t\t\t//get linked records also\n\t\t\t\t\t\t\t\t$row['records'] = $this->getRecs($row['records'],$orderField,$L, $linkwrap,true);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$row['records'] = array('errortype'=>'2','errormsg'=>'Infinite linking in record \"'.$row['uid']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$records[] = $row; \n\n\t\t\t\t\t}\n\n\t\t\t\t\t//$records[] = $fields . ' '.$tn .' '.$rid .' '.$where . ' '. $orderBy;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\treturn $records;\n\t}",
"function hierarchize_get_childs($brainstormid, $userid=null, $groupid=0, $excludemyself=false, $fatherid=0){\r\n global $CFG;\r\n\r\n $accessClause = brainstorm_get_accessclauses($userid, $groupid, $excludemyself);\r\n\r\n $fatherClause = ($fatherid != 0) ? \" AND od.itemdest = $fatherid \" : ' AND (od.itemdest IS NULL OR od.itemdest = 0) ';\r\n\r\n $sql = \"\r\n SELECT\r\n r.id,\r\n r.response,\r\n od.itemdest,\r\n od.intvalue,\r\n od.userid,\r\n od.groupid,\r\n od.id as odid\r\n FROM\r\n {$CFG->prefix}brainstorm_responses as r,\r\n {$CFG->prefix}brainstorm_operatordata as od\r\n WHERE\r\n r.id = od.itemsource AND\r\n operatorid = 'hierarchize' AND\r\n r.brainstormid = {$brainstormid}\r\n {$accessClause}\r\n {$fatherClause}\r\n ORDER BY\r\n od.intvalue,\r\n od.userid\r\n \";\r\n // echo $sql;\r\n if (!$records = get_records_sql($sql)){\r\n return array();\r\n }\r\n return $records;\r\n}",
"function fieldsfortype ($problem, $objecttype, $prefix,\n &$fields, $predefined = -1, $level = 0) {\n if ($predefined == -1)\n $predefined = getpredefinedobjects ($problem);\n if ($level > 20)\n return;\n $result = mysql_db_query (\"vishnu_prob_\" . $problem,\n \"select * from object_fields where object_name = \\\"\" .\n $objecttype . \"\\\";\");\n while ($value = mysql_fetch_array ($result)) {\n $field_name = $value[\"field_name\"];\n if ($field_name == \"internal_key\")\n continue;\n $field_name = $prefix . $field_name;\n $islist = $value[\"is_list\"] == \"true\";\n $stop = $islist || ($value[\"is_subobject\"] == \"false\");\n $type = $islist ? (\"list:\" . $value[\"datatype\"]) : $value[\"datatype\"];\n if ($stop || $predefined[$type]) {\n $fields[] = array ($field_name, $type, $value[\"is_globalptr\"]);\n }\n if (! $stop) {\n fieldsfortype ($problem, $type, $field_name . \".\", $fields,\n $predefined, $level + 1);\n }\n }\n mysql_free_result ($result);\n }",
"public function findFieldsForms($par) {\n\n $em = $this->getEntityManager();\n $entity = $em->getRepository('AppBundle:MedicalForms')->findOneBy($par);\n \n $user = null;\n if ($this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n }else{\n return array();\n }\n\n $entities = $em->getRepository('AppBundle:MedicalFormsFieldsets')->findBy(array(\"medicalForm\" => $entity->getId()), array(\"position\" => \"ASC\"));\n $entitiesAll = array();\n $entityset = (object) array(\"fieldset\" => '', \"fields\" => '');\n $classColor = array(\"azulOscuro blancoColor\", \"celeste\", \"rojo\", \"gris\", \"lila\", \"celeste\", \"rojoFuerte\", \"azulNormal\");\n $itc = 0;\n foreach ($entities as $entityFs) :\n $classC = ($entityFs->getType() == \"page\") ? $classColor[$itc] : \"\";\n $entityset = (object) array(\"fieldset\" => '', \"fields\" => '', \"classColor\" => $classC);\n $itc = ($entityFs->getType() == \"page\") ? (($itc === count($classColor) - 1) ? 0 : $itc + 1) : $itc;\n $entityset->fieldset = $entityFs;\n $rsm = new ResultSetMappingBuilder($em);\n $rsm->addRootEntityFromClassMetadata('AppBundle\\Entity\\MedicalFormsFields', 'f');\n if ($user !== NULL):\n $query = $em->createNativeQuery(\"SELECT F3.*,(CASE WHEN oi IS NULL THEN F3.orderid ELSE oi END) as oi ,(CASE F3.id WHEN F2.id THEN 1 ELSE 2 END) AS og, FV.value_data as value_temp, FV.key_enc as key_enc FROM medical_forms_fields F3 LEFT JOIN( SELECT F1.subgroup, F1.orderid as oi, F1.id FROM medical_forms_fields F1 WHERE F1.field='group' order by F1.orderid ) F2 ON F2.subgroup=F3.subgroup LEFT JOIN _mffd_\" . $entity->getFormName() . \" FV ON FV.medical_forms_field_name=F3.name AND FV.fos_user_id=:idu WHERE F3.medical_forms_fieldset_id=:id ORDER BY oi ASC, og ASC, orderid ASC \", $rsm);\n $query->setParameter('idu', $user->getId());\n else:\n $query = $em->createNativeQuery(\"SELECT F3.*,(CASE WHEN oi IS NULL THEN F3.orderid ELSE oi END) as oi ,(CASE F3.id WHEN F2.id THEN 1 ELSE 2 END) AS og FROM medical_forms_fields F3 LEFT JOIN( SELECT F1.subgroup, F1.orderid as oi, F1.id FROM medical_forms_fields F1 WHERE F1.field='group' order by F1.orderid) F2 ON F2.subgroup=F3.subgroup WHERE F3.medical_forms_fieldset_id=:id ORDER BY oi ASC, og ASC, orderid ASC \", $rsm);\n endif;\n $query->setParameter('id', $entityFs->getId());\n $entitiesFl = $query->getResult();\n $entityset->fields = $entitiesFl;\n array_push($entitiesAll, $entityset);\n endforeach;\n return $entitiesAll;\n }",
"abstract public function fields();",
"protected static function _relations() {\n\n\t}",
"function db_get_fields($query)\n{\n\t$args = func_get_args();\n\t//$__result = call_user_func_array('db_query', $args);\n\n//echo 'args:<br>';\n//echo var_dump($args);\t\n\n\tif ($__result = call_user_func_array('db_query', $args)) {\n\n\t\t$_result = array();\n\t\twhile ($arr = driver_db_fetch_array($__result)) {\n\t\t\t$_result[] = $arr;\n\t\t}\n\n\t\tdriver_db_free_result($__result);\n\n\t\tif (is_array($_result)) {\n\t\t\t$result = array();\n\t\t\tforeach ($_result as $k => $v) {\n\t\t\t\tarray_push($result, reset($v));\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn is_array($result) ? $result : array();\n}",
"function query() {\n dpm($this);\n $this->ensure_my_table();\n\n // First, relate our current table to the link table via the field\n $first = array(\n 'left_table' => $this->table_alias,\n 'left_field' => $this->field, // @TODO real_field?\n 'table' => $this->definition['link table'],\n 'field' => $this->definition['link field'],\n );\n\n if (!empty($this->options['required'])) {\n $first['type'] = 'INNER';\n }\n\n if (!empty($this->definition['link_join_extra'])) {\n $first['extra'] = $this->definition['link_join_extra'];\n }\n\n if (!empty($this->definition['join_handler']) && class_exists($this->definition['join_handler'])) {\n $first_join = new $this->definition['join_handler'];\n }\n else {\n $first_join = new views_join();\n }\n $first_join->definition = $first;\n $first_join->construct();\n $first_join->adjusted = TRUE;\n\n $this->first_alias = $this->query->add_table($this->definition['link table'], $this->relationship, $first_join);\n\n // Second, relate the link table to the entity specified using\n // the specified base fields on the base and link tables.\n $second = array(\n 'left_table' => $this->first_alias,\n 'left_field' => $this->definition['base link field'],\n 'table' => $this->definition['base'],\n 'field' => $this->definition['base field'],\n );\n\n if (!empty($this->options['required'])) {\n $second['type'] = 'INNER';\n }\n\n if (!empty($this->definition['base_join_extra'])) {\n $second['extra'] = $this->definition['base_join_extra'];\n }\n\n if (!empty($this->definition['join_handler']) && class_exists($this->definition['join_handler'])) {\n $second_join = new $this->definition['join_handler'];\n }\n else {\n $second_join = new views_join();\n }\n $second_join->definition = $second;\n $second_join->construct();\n $second_join->adjusted = TRUE;\n\n // use a short alias for this:\n // @TODO real_field?\n $alias = $this->field . '_' . $this->definition['base'];\n\n $this->alias = $this->query->add_relationship($alias, $second_join, $this->definition['base'], $this->relationship);\n }",
"public function getQueryFields ($table);",
"function get_related($obj, $exception=array())// retreive related objects\r\n\t{\r\n\t\t$arr = object_2_array($obj);\r\n\t\t$objs = array();\r\n\t\tforeach ($arr as $k=>$v)\r\n\t\t{\r\n\t\t\tif (strstr($k, '_id') && !in_array($k, $exception))// if it's foreign key\r\n\t\t\t{\r\n\t\t\t\t$field = explode('_', $k);\r\n\t\t\t\tarray_pop($field);\r\n\t\t\t\t$f = count($field) ? implode('_', $field) : $field[0];\r\n\t\t\t\t$objs[$f] = $this->Retrieve(ucwords($this->get_db_name($f)), $v, true, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count($objs) ? $objs : false;\r\n\t}",
"private function loadFields(){\n\t\t$this->fields = $this->wpdb->get_results($this->wpdb->prepare(\"\n\t\t\tSELECT\n\t\t\t\t`field`.`id` \t\t\t'field_id',\n\t\t\t\t`type`.`name` \t\t\t'type',\n\t\t\t\t`field`.`name`\t\t\t'name',\n\t\t\t\t`field`.`label`\t\t\t'label',\n\t\t\t\t`field`.`default`\t\t'default',\n\t\t\t\t`field`.`required`\t\t'required',\n\t\t\t\t`field`.`depends_id`\t'depends_id',\n\t\t\t\t`field`.`depends_value`\t'depends_value',\n\t\t\t\t`field`.`placeholder`\t'placeholder'\n\t\t\tFROM `mark_reg_fields` `field`\n\t\t\tLEFT JOIN `mark_reg_field_types` `type` ON `type`.`id` = `field`.`type_id`\n\t\t\tWHERE\n\t\t\t\t`field`.`enabled` = 1\n\t\t\t\tAND `field`.`form_id` = %d\n\t\t\t\tAND `field`.`backend_only` = 0\n\t\t\tORDER BY\n\t\t\t\t`field`.`order`\n\t\t\", $this->form_id));\n\t}",
"function my_get_field_list( $table_name ){\r\n\t\r\n\t$query = \" SHOW fields FROM `\".$table_name.\"` \";\r\n\t$result = my_query( $query );\r\n\t \r\n\twhile($row = my_fetch_array( $result ) ){\r\n\t\t$data = $row['Field'];\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $data;\r\n\t\r\n}",
"public function loadFields()\n\t{\n\t\t// Get only the fields from the class instance, not its descendants\n\t\t$getFields = create_function('$obj', 'return get_object_vars($obj);');\n\t\t$fields = $getFields($this);\n\n\t\t// Field defaults\n\t\t$defaults = array(\n\t\t\t'primary' => false,\n\t\t\t'relation' => false\n\t\t);\n\n\t\t// Go through and set up each field\n\t\tforeach ($fields as $name => $options)\n\t\t{\n\t\t\t// Merge the defaults\n\t\t\t$options = array_merge($defaults, $options);\n\n\t\t\t// Is this the primary field?\n\t\t\tif ($options['primary'] === true)\n\t\t\t{\n\t\t\t\t$this->primaryKeyField = $name;\n\t\t\t}\n\n\t\t\t// Is this a relation?\n\t\t\tif ($options['relation'] !== false)\n\t\t\t{\n\t\t\t\t$this->relations[$name] = $options;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->fields[$name] = array();\n\t\t}\n\t}",
"function pg_field_table($result, int $field_number, bool $oid_only = false)\n{\n error_clear_last();\n $result = \\pg_field_table($result, $field_number, $oid_only);\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n return $result;\n}",
"public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"private function query($lang,$func,$table,$field=\"\",$where=\"\",$data=\"\",$sort=\"\")\n\t{\n\t\t$queryString = \"\";\n\t\t$tableArray = array($table);\n\t\t$fieldArray = array();\n\t\t$filterArray = array();\n\n\t\t$queryTable = \"\";\n\t\t$queryField = \"\";\n\t\t$queryWhere = \"\";\n\n\n/*echoall(\"lang: $lang, func: $func, table: $table, field: $field\");\nechoall($where);\nechoall(\"data: $data, sort: $sort\");*/\n\n//------------------------------------------------------------------------------\n// create relation table list\n\t\tforeach($this->relation->children() as $entry)\n\t\t{\n\t\t\tarray_push($tableArray,(string)$entry->attributes()->table);\n\t\t}\n\n\t\t$queryTable = implode(\",\",$tableArray);\n\n\n//------------------------------------------------------------------------------\n//TODO insert prefix to all table names\n\n\n//------------------------------------------------------------------------------\n// create where relation list\n\t\tif (is_array($where))\n\t\t{\n\n// loop over all where clauses\n\t\t\tforeach($where as $entry)\n\t\t\t{\n\t\t\t\t$whereField = (string)$entry->attributes()->field;\n\t\t\t\t$whereValue = (string)$entry->attributes()->value;\n\t\t\t\t$whereOp = (string)$entry->attributes()->operator;\n\n\n// relation field definition found\n\t\t\t\tif ($this->relation->$whereField)\n\t\t\t\t{\n\t\t\t\t\t$relTableName = (string)$this->relation->$whereField->attributes()->table;\n\t\t\t\t\t$relTableId = (string)$this->relation->$whereField->attributes()->id;\n\t\t\t\t\t$relTableDisplay = (string)$this->relation->$whereField->attributes()->display;\n\n\t\t\t\t\tarray_push($filterArray,\"{$relTableName}.content{$whereOp}'{$whereValue}' and {$table}.{$whereField}={$relTableName}.{$relTableId}\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray_push($filterArray,\"{$table}.{$whereField}{$whereOp}{$whereValue}\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$idFilter = implode(\" and \",$filterArray);\n\t\t}\n\n\n//------------------------------------------------------------------------------\n// create field relation list\n// get field list\n\t\t$fieldList = mysql_list_fields($this->name,$table);\n\n// loop fields\n\t\tif ($fieldList)\n\t\t{\n\t\t\tfor ($x = 0;$x < mysql_num_fields($fieldList);$x++)\n\t\t\t{\n//TODO look if field defined or all fields\n\n\t\t\t\t$fieldName = mysql_field_name($fieldList,$x);\n\n// relation field found\n\t\t\t\tif ($this->relation->$fieldName)\n\t\t\t\t{\n\t\t\t\t\t$relationId = $this->relation->$fieldName->attributes()->id;\n\t\t\t\t\t$relationTable = $this->relation->$fieldName->attributes()->table;\n\n\n// insert alias for relation\n\t\t\t\t\tarray_push($fieldArray,$relationTable . \".content AS \" . $fieldName);\n\t\t\t\t\tarray_push($fieldArray,$relationTable . \".lang AS \" . $fieldName . \"_lang\"); // language referenz\n\n// insert filter parameters for relation\n\t\t\t\t\tarray_push($filterArray,\"{$relationTable}.{$relationId}={$table}.{$fieldName}\");\n\n\n//------------------------------------------------------------------------------\n// check for language\n// filter string for entry filtering\n\t\t\t\t\t$filterString = \"{$relationTable}.{$relationId}={$table}.{$fieldName} and \" . $idFilter;\n\n// create where clause for language check\n\t\t\t\t\tif ($filterString)\n\t\t\t\t\t{\n// get database entry default language\n\t\t\t\t\t\t$langQuery = \"SELECT {$table}.lang FROM {$table},{$relationTable} WHERE $filterString\";// and lang='{$lang}'\";\n\n\t\t\t\t\t\t$langRes = mysql_query($langQuery);\n\t\t\t\t\t\tif ($langRes)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$defaultLang = mysql_fetch_array($langRes);\n\t\t\t\t\t\t\t$defaultLang = $defaultLang['lang'];\n\n\n// check if lang entry is present\n// if not use entry default language\n\t\t\t\t\t\t\t$langQuery = \"SELECT {$table}.lang FROM {$table},{$relationTable} WHERE $filterString and {$relationTable}.lang='{$lang}'\";\n\t\t\t\t\t\t\t$langRes = mysql_query($langQuery);\n\n\n// load current language\n\t\t\t\t\t\t\tif(mysql_num_rows($langRes))\n\t\t\t\t\t\t\t\tarray_push($filterArray,\"{$relationTable}.lang='{$lang}'\");\n\n// load default language\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tarray_push($filterArray,\"{$relationTable}.lang='$defaultLang'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tOLIVError::fire(\"OLIVDatabase::query - no valid resource from query call\");\n\t\t\t\t\t}\n\t\t\t\t}\n// no relation\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray_push($fieldArray,$table . \".\" . $fieldName . \" AS \" . $fieldName);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$queryField = implode(\",\",$fieldArray);\n\t\t}\n\n\n//------------------------------------------------------------------------------\n// recreate where clause for query\n\t\tif ($filterArray);\n\t\t\t$queryWhere = implode(\" and \",$filterArray);\n\n\n//echoall($queryWhere);\n//------------------------------------------------------------------------------\n// parse command\n\t\tif ($queryWhere) $queryWhere = \"WHERE \" . $queryWhere;\n\n\t\tswitch (strtolower($func))\n\t\t{\n\t\t\tcase 'select':\n\t\t\t\t$queryString = \"SELECT $queryField FROM $queryTable $queryWhere $sort\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'insert':\n\t\t\t\t$queryString = \"INSERT INTO $queryTable SET $data\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'update':\n\t\t\t\t$queryString = \"UPDATE $queryTable SET $data WHERE $queryWhere\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\t$queryString = \"DELETE FROM $queryTable WHERE $queryWhere\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ($queryString)\n\t\t{\n\n\n//echoall($queryString);\n//------------------------------------------------------------------------------\n//------------------------------------------------------------------------------\n// mysql query call\n\t\t\t$this->sqlResource = mysql_query($queryString);\n\t\t\t$this->insertId = mysql_insert_id($this->dbResource);\n//------------------------------------------------------------------------------\n//------------------------------------------------------------------------------\n\t\t}\n\t}",
"protected abstract function retrieveNonBaseFields(Row $row);",
"private static function buildQueryComponents($obj, $obj_id, $node, $node_id, $TTS = '') # TTS = Teams Table Suffix\n{\n /*\n Builds query components allowing you to address specific groups of matches in the \"matches\" table.\n For example if wanted matches by team_id = 5 then set $obj = STATS_TEAM and $obj_id = 5, \n if further matches only from a specific node type are wanted, say division_id = 7, then set $node = STATS_DIVISION with $node_id = 7.\n\n \n $TTS (teams table suffix):\n Because this function can be used to compile two query sets via buildCrossRefQueryComponents() and joined we need to be able to \n differentiate between two different \"teams\" tables, for example, which we can do by allowing custom suffixes for all tables.\n The name \"TEAMS table suffix\" is a little misleading - just forget it says \"teams\", it's for all tables, not just \"teams\" tables.\n */\n \n $from = array('matches','tours','divisions'); // We don't need to add the \"leagues\" table, since league IDs can be referenced via the \"f_lid\" key in the divisions table.\n $where = array(\"matches.f_tour_id = tours.tour_id\", \"tours.f_did = divisions.did\");\n if ($node && $node_id) {\n switch ($node)\n {\n case STATS_TOUR: $where[] = \"matches.f_tour_id = $node_id\"; break;\n case STATS_DIVISION: $where[] = \"tours.f_did = $node_id\"; break;\n case STATS_LEAGUE: $where[] = \"divisions.f_lid = $node_id\"; break;\n }\n }\n\n switch ($obj)\n {\n case STATS_PLAYER: \n array_push($from, \"teams AS teams$TTS\", \"players AS players$TTS\"); # Also use $TTS for players table: If not included calling buildCrossRefQueryComponents() will accidentally create two tables with identical names (if comparing two players).\n $tid = \"teams$TTS.team_id\";\n array_push($where, \"players$TTS.player_id = $obj_id\", \"players$TTS.owned_by_team_id = $tid\");\n \n // We must add the below, else above is equivalent to the player's team match stats. Ie. matches this player did not compete in will be counted as played!\n $from[] = \"(SELECT DISTINCT(f_match_id) AS 'p_mid' FROM match_data WHERE f_player_id = $obj_id AND mg IS FALSE) AS pmatches$TTS\"; # Also use $TTL here, same reason as above for players table.\n $where[] = \"match_id = pmatches$TTS.p_mid\";\n break;\n \n case STATS_TEAM:\n// array_push($from, \"\");\n $tid = $obj_id;\n// array_push($where, \"\");\n break;\n \n case STATS_RACE:\n array_push($from, \"teams AS teams$TTS\");\n $tid = \"teams$TTS.team_id\";\n array_push($where, \"teams$TTS.f_race_id = $obj_id\");\n break;\n \n case STATS_COACH: \n array_push($from, \"teams AS teams$TTS\");\n $tid = \"teams$TTS.team_id\";\n array_push($where, \"teams$TTS.owned_by_coach_id = $obj_id\");\n break;\n }\n \n $where[] = \"(team1_id = $tid OR team2_id = $tid)\";\n\n return array($from,$where,$tid);\n}",
"function &fields(){\n\t\t// check the cache first.\n\t\tif ( isset($this->_cache[__FUNCTION__]) ){\n\t\t\treturn $this->_cache[__FUNCTION__];\n\t\t}\n\t\t\n\t\t// it is not in the cache yet, let's calculate it.\n\t\t$out = array();\n\t\t$data = $this->_parseSQL();\n\t\t$this->_expandGlobs($data);\n\t\t$numCols = count($data['columns']);\n\t\tfor ($i=0; $i<$numCols; $i++){\n\t\t\t$column = $data['columns'][$i];\n\t\t\tif ( $column['type'] == 'ident' ){\n\t\t\t\t// This column is just a normal column that is drawn from a table.\n\t\t\t\t// vs. the alternative which is a function.\n\t\t\t\tif ( $column['table'] ){\n\t\t\t\t\t$table =& $this->getTableOrView($column['table']);\n\t\t\t\t} else {\n\t\t\t\t\tif ( $column['alias'] ){\n\t\t\t\t\t\t$key = $column['alias'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$key = $column['value'];\n\t\t\t\t\t}\n\t\t\t\t\t$tablename = $this->guessColumnTableName($key);\n\t\t\t\t\t$table =& $this->getTableOrView($tablename);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$out[$key] =& $table->getField($key);\n\t\t\t\tunset($table);\n\t\t\t} else {\n\t\t\t\t$out[$column['alias']] = Dataface_Table::_newSchema($column['type'],$column['alias'], $this->name);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_cache[__FUNCTION__] =& $out;\n\t\t$this->_fields =& $out;\n\t\treturn $out;\n\t\t\n\t\t\n\t}",
"function generateGetSQL($ScreenName, $section = null, $isGrid = false)\n{\n $sectionModuleID = '';\n if(!empty($section)){\n $sectionModuleID = $section->moduleID;\n }\n $debug_prefix = debug_indent(\"Module-generateGetSQL() {$this->ModuleID} $ScreenName {$sectionModuleID}:\");\n\n $fields = array();\n $isScreen = false;\n\n if(empty($section)){\n if($ScreenName == 'ListFields'){ //yes, we use ListFields to make Labels\n print \"$debug_prefix getting ListFields\\n\";\n $fields = $this->getListFields();\n } else {\n\n if(is_array($ScreenName)){\n $fields = $ScreenName;\n } else {\n\n if($ScreenName == 'View'){\n print \"$debug_prefix getting View Screen Fields\\n\";\n $Screen =& $this->viewScreen;\n } else {\n print \"$debug_prefix getting screen fields\\n\";\n $Screen = $this->getScreen($ScreenName); //&\n }\n $fields = $Screen->Fields;\n $isScreen = true;\n }\n }\n } else {\n\n //$Screen = $section;\n print \"$debug_prefix getting View Screen Section Fields\\n\";\n $fields = $section->Fields;\n\n }\n\n global $SQLBaseModuleID;\n $SQLBaseModuleID = $this->ModuleID;\n\n //handle sub-fields - we \"flatten\" the subfield hierarchy\n $allFields = array();\n foreach($fields as $sfName => $sf){\n $allFields = array_merge($allFields, $sf->getRecursiveFields());\n }\n\n $selectFieldNames = array();\n foreach($allFields as $fieldName => $field){\n $selectFieldNames = array_merge($selectFieldNames, $field->getSelectFields());\n }\n if($isScreen){\n if(!empty($this->recordLabelField)){\n if(!array_key_exists($this->recordLabelField, $selectFieldNames)){\n $selectFieldNames[$this->recordLabelField] = true;\n }\n }\n }\n if(!empty($this->OwnerField)){\n if(!array_key_exists($this->OwnerField, $selectFieldNames)){\n $selectFieldNames[$this->OwnerField] = true;\n }\n }\n\n //ensure that local key is in the conditions\n $conditions = array();\n if(isset($this->conditions)){\n $conditions = $this->conditions;\n }\n if(!empty($this->localKey)){\n if(!empty($this->parentKey)){\n $conditions[$this->localKey] = '[*'.$this->parentKey.'*]';\n } else {\n die(\"Found non-empty submodule local key but no corresponding parent key.\");\n }\n }\n\n //ensures that local condition field is in the SELECT fields\n if(count($conditions) > 0){\n foreach($conditions as $conditionField => $conditionValue){\n if(!array_key_exists($conditionField, $fields)){\n $conditionMF = $this->ModuleFields[$conditionField];\n if('tablefield' != strtolower(get_class($conditionMF))){\n if(!array_key_exists($conditionField, $fields)){\n $selectFieldNames[$conditionField] = false;\n }\n }\n }\n }\n }\n\n\n //array of fields in the SELECT statement (just to be able to use 'implode')\n $SelectDefs = array();\n $Joins=array();\n\n $SQL = \"SELECT \\n \";\n foreach($selectFieldNames as $fieldName => $displayed){\n\n //look up corresponding ModuleField based on screen field name\n $mf = $this->ModuleFields[$fieldName];\n\n print \"$debug_prefix mfname: \" . $mf->name . \"\\n\";\n if(empty($mf)){\n\n indent_print_r($fields, true, 'fields');\n indent_print_r($selectFieldNames, true, 'selectFieldNames');\n die(\"$debug_prefix The screen {$Screenname} contains a field {$fieldName} that is not in the ModuleFields of the {$this->ModuleID} module.\\n\");\n } else {\n if($displayed){\n $SelectDefs[] = GetSelectDef($mf->name);\n }\n $Joins = array_merge($Joins, GetJoinDef($mf->name));\n }\n }\n\n $SQL .= implode(\",\\n \", $SelectDefs);\n $SQL .= \"\\nFROM `{$this->ModuleID}`\\n \";\n\n $Joins = SortJoins($Joins);\n\n\n //special for GET: record ID condition\n $pkField = end($this->PKFields);\n if($isGrid){\n $conditions[$pkField] = '/**RowID**/';\n } else {\n $conditions[$pkField] = '/**RecordID**/';\n }\n\n $prepared_conditions = $this->_prepareConditions($conditions);\n $parentJoinSQL = $prepared_conditions['parentJoinSQL'];\n $whereConditions = $prepared_conditions['whereConditions'];\n\n $SQL .= implode(\"\\n \", $Joins);\n\n if(!empty($parentJoinSQL)){\n $SQL .= $parentJoinSQL;\n }\n \n $SQL .= \"\\nWHERE {$this->ModuleID}._Deleted = 0\\n \";\n foreach($whereConditions as $whereCondition => $whereConditionValue){\n if(false === strpos($whereConditionValue, '|')){\n $SQL .= \"AND $whereCondition = '$whereConditionValue'\\n\";\n } else {\n $whereConditionValues = explode('|', $whereConditionValue);\n $whereConditionString = join('\\',\\'', $whereConditionValues);\n $SQL .= \"AND $whereCondition IN ('$whereConditionString')\\n\";\n }\n }\n print \"$debug_prefix $SQL\\n\";\n\n //verify that the SQL statement will execute without error\n CheckSQL(str_replace(array('/**RecordID**/', '/**RowID**/'), array('1', '1'), $SQL));\n\n debug_unindent();\n return $SQL;\n}",
"function __list_fields_data($dbname,$table_name){\n $DB1=$this->__connect($dbname,$table_name);\n $fields = $DB1->list_fields($table_name);\n $fields_data = $DB1->field_data($table_name);\n\n $sql = \"describe $table_name\";\n $result = mysql_query($sql);\n //$sql=$this->db->query('sql');\n\n //convert to object\n //needs thinking\n while($data = mysql_fetch_array($result))\n {\n //echo_array($data);break;\n $d->name[$data['Field']]=array('name'=>$data['Field'],\n 'type'=>$data['Type'],\n 'null'=>$data['Null'],\n 'key'=>$data['Key'],\n 'default'=>$data['Default'],\n 'extra'=>$data['Extra']\n );\n \n \n \n }\n //echo'TEST';\n //echo_array($d);break;\n // print_r($result);\n\n return($d);\n }",
"function getFields();",
"function requirement_get_related( $req_id ) {\n\n\tglobal $db;\n\t$tbl_req \t\t\t\t= REQ_TBL;\n\t$f_req_id \t\t\t\t= REQ_ID;\n\t$f_req_filename \t\t= REQ_FILENAME;\n\t$f_req_parent\t \t\t= REQ_PARENT;\n\t$f_root_node\t\t\t= REQ_ROOT;\n\n\n\t$children = array();\n\n\t# retrieve all children of $parent\n\t$q = \"\tSELECT $f_req_id, $f_req_filename\n\t\t\tFROM $tbl_req\n\t\t\tWHERE $f_req_parent = $req_id\";\n\n\t$result = db_query($db, $q);\n\n\t# display each child\n\twhile( $row = db_fetch_row( $db, $result) ) {\n\n\t\t# we don't need the child's children in this function\n\t\t# for display on the req detail page, we only need immediate children\n\t\t# not sub-children.\n\t\t$children[] = array(\t\"req_id\"\t=> $row[REQ_ID],\n\t\t\t\t\t\t\t\t\"req_name\"\t=> $row[REQ_FILENAME] );\n\t}\n\n\treturn $children;\n}",
"function acf_get_fields_by_id($parent_id = 0)\n{\n}",
"public function getAllFields();",
"abstract function relations();",
"function explodeFK($input = '', $table = '', $limit = 0) {\n $input = explode(\" \", $input);\n\n if (count($input) > 1) {\n $default = 1;\n \n foreach ($input as $value) {\n if ($default == 1)\n $pk = $value;\n else {\n $pk .= \" OR pk = $value\";\n }\n \n $default++;\n }\n } else {\n $pk = array_shift($input);\n }\n\n connectDatabase();\n \n $result = queryDatabase(\"SELECT name\n FROM $table\n WHERE pk = $pk\n ORDER BY name ASC\");\n\n $default = 1;\n\n while ($row = mysql_fetch_object($result)) {\n if ($default == 1)\n $input = \"$row->name<br />\";\n elseif ($default < 4 && $limit == 1)\n $input .= \"$row->name<br />\";\n elseif ($default == 4 && $limit == 1)\n $input .= \"More...<br />\";\n elseif ($default > 1 && $limit == 0)\n $input .= \"$row->name<br />\";\n\n $default++;\n }\n\n return $input;\n}",
"public function testFieldExistsRecursive(): void\n {\n // setup\n $arr = [\n 'f1' => 1,\n 'f2' => [\n 'f21' => 21,\n 'f22' => 22\n ],\n 'f3' => 3\n ];\n\n // test body and assertions\n $this->assertTrue(Fetcher::fieldExists($arr, 'f2'));\n $this->assertTrue(Fetcher::fieldExists($arr, 'f22'));\n $this->assertFalse(Fetcher::fieldExists($arr, 'f22', false));\n }",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"abstract function fields();",
"private function getFieldsOnTable()\n{\n\n $returnArray=array(); \n foreach ($this->tableStructure as $ind => $fieldArray) { \n $returnArray[$fieldArray['columnName']]=$fieldArray['columnName'];\n }\n \n return $returnArray; \n}",
"public function getFields() {\n\t\t$fields[] = array('name' => 'parent',\n\t\t\t'type' => 'string',\n\t\t\t'size' => 100,\n\t\t\t'notnull' => true);\n\t\t$fields[] = array('name' => 'parentid',\n\t\t\t'type' => 'integer',\n\t\t\t'notnull' => true);\n\t\t$fields[] = array('name' => 'name',\n\t\t\t'type' => 'string',\n\t\t\t'size' => 100,\n\t\t\t'notnull' => true);\n\t\t$fields[] = array('name' => 'value',\n\t\t\t'type' => 'string',\n\t\t\t'size' => 1000000,\n\t\t\t'notnull' => false);\n\n\t\treturn $fields;\n\t}",
"protected function buildRelations()\n {\n if ($this->relations_built) {\n return;\n }\n $this_class = $this->base_class;\n\n foreach ($this_class::$relations as $field => $options) {\n $object = null;\n\n $target_class = $options['rel_class'];\n\n // Segun el lugar de la llave foránea, creamos el objeto\n if ($options['fk_location'] == self::FK_THIS) {\n // Si existe la llave foranea, y tiene un valor\n if (isset($this->fields[$options['foreing_key']])) {\n if ($options['rel_type'] == 'one') {\n $object = $target_class::get(\n $this->fields[$options['foreing_key']]\n );\n } else {\n throw new \\LogicException (\"UNIMPLEMENTED FK_THIS with 'many'\");\n }\n } else {\n // No existe la llave. Creamos objetos vacíos\n if ($options['rel_type'] == 'one') {\n $object = new $target_class;\n } else {\n throw new \\LogicException (\"UNIMPLEMENTED FK_THIS with 'many'\");\n }\n }\n } else {\n // La llave foránea está en el target_class\n if ($options['rel_type'] == 'one') {\n $object = $target_class::get([\n $options['foreing_key'] => $this->fields[$options['primary_key']]\n ]);\n } else {\n $object = new RecordSet($target_class, \n [$options['foreing_key'] => $this->fields[$options['primary_key']]]);\n }\n\n\n }\n //var_dump($object); exit;\n\n\n $this->object_fields[$field] = $object;\n }\n }",
"public function testGetSolidsRecursivelyOneField()\r\n {\r\n $solidId = 1;\r\n $artifactId = 1;\r\n $field = 'name';\r\n $solid = $this->Solids\r\n ->get($solidId);\r\n $oneFieldResult = $this->Solids->getSolidsRecursively($artifactId, $field, [$solid], true);\r\n $this->assertNotEmpty($oneFieldResult);\r\n $this->assertEquals($oneFieldResult[$solidId], $solid[$field]);\r\n }",
"function forum_get_child_posts_fast($parent, $forum_id) {\n global $CFG;\n \n $query = \"\n SELECT \n p.id, \n p.subject, \n p.discussion, \n p.message, \n p.created, \n {$forum_id} AS forum,\n p.userid,\n d.groupid,\n u.firstname, \n u.lastname\n FROM \n {$CFG->prefix}forum_discussions d\n JOIN \n {$CFG->prefix}forum_posts p \n ON \n p.discussion = d.id\n JOIN \n {$CFG->prefix}user u \n ON \n p.userid = u.id\n WHERE \n p.parent = '{$parent}'\n ORDER BY \n p.created ASC\n \";\n return get_records_sql($query);\n}",
"function get_fields()\n\t{\n\t\trequire_code('ocf_members');\n\n\t\t$indexes=collapse_2d_complexity('i_fields','i_name',$GLOBALS['FORUM_DB']->query_select('db_meta_indices',array('i_fields','i_name'),array('i_table'=>'f_member_custom_fields'),'ORDER BY i_name'));\n\n\t\t$fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\trequire_code('fields');\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('field_'.strval($row['id']),$indexes)) continue;\n\n\t\t\t\t$ob=get_fields_hook($row['cf_type']);\n\t\t\t\t$temp=$ob->get_search_inputter($row);\n\t\t\t\tif (is_null($temp))\n\t\t\t\t{\n\t\t\t\t\t$type='_TEXT';\n\t\t\t\t\t$special=make_string_tempcode(get_param('option_'.strval($row['id']),''));\n\t\t\t\t\t$display=$row['trans_name'];\n\t\t\t\t\t$fields[]=array('NAME'=>strval($row['id']),'DISPLAY'=>$display,'TYPE'=>$type,'SPECIAL'=>$special);\n\t\t\t\t} else $fields=array_merge($fields,$temp);\n\t\t\t}\n\n\t\t\t$age_range=get_param('option__age_range',get_param('option__age_range_from','').'-'.get_param('option__age_range_to',''));\n\t\t\t$fields[]=array('NAME'=>'_age_range','DISPLAY'=>do_lang_tempcode('AGE_RANGE'),'TYPE'=>'_TEXT','SPECIAL'=>$age_range);\n\t\t}\n\n\t\t$map=has_specific_permission(get_member(),'see_hidden_groups')?array():array('g_hidden'=>0);\n\t\t$group_count=$GLOBALS['FORUM_DB']->query_value('f_groups','COUNT(*)');\n\t\tif ($group_count>300) $map['g_is_private_club']=0;\n\t\tif ($map==array()) $map=NULL;\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map,'ORDER BY g_order');\n\t\t$groups=form_input_list_entry('',true,'---');\n\t\t$default_group=get_param('option__user_group','');\n\t\t$group_titles=array();\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$row['text_original']=get_translated_text($row['g_name'],$GLOBALS['FORUM_DB']);\n\n\t\t\tif ($row['id']==db_get_first_id()) continue;\n\t\t\t$groups->attach(form_input_list_entry(strval($row['id']),strval($row['id'])==$default_group,$row['text_original']));\n\t\t\t$group_titles[$row['id']]=$row['text_original'];\n\t\t}\n\t\tif (strpos($default_group,',')!==false)\n\t\t{\n\t\t\t$bits=explode(',',$default_group);\n\t\t\t$combination=new ocp_tempcode();\n\t\t\tforeach ($bits as $bit)\n\t\t\t{\n\t\t\t\tif (!$combination->is_empty()) $combination->attach(do_lang_tempcode('LIST_SEP'));\n\t\t\t\t$combination->attach(escape_html(@$group_titles[intval($bit)]));\n\t\t\t}\n\t\t\t$groups->attach(form_input_list_entry(strval($default_group),true,do_lang_tempcode('USERGROUP_SEARCH_COMBO',escape_html($combination))));\n\t\t}\n\t\t$fields[]=array('NAME'=>'_user_group','DISPLAY'=>do_lang_tempcode('GROUP'),'TYPE'=>'_LIST','SPECIAL'=>$groups);\n\t\tif (has_specific_permission(get_member(),'see_hidden_groups'))\n// $fields[]=array('NAME'=>'_photo_thumb_url','DISPLAY'=>do_lang('PHOTO'),'TYPE'=>'','SPECIAL'=>'','CHECKED'=>false);\n\t\t{\n\t\t\t//$fields[]=array('NAME'=>'_emails_only','DISPLAY'=>do_lang_tempcode('EMAILS_ONLY'),'TYPE'=>'_TICK','SPECIAL'=>'');\tCSV export better now\n\t\t}\n\n\t\treturn $fields;\n\t}",
"function msql_field_table($result, $field_offset)\n{\n}",
"function fieldInfo( $table, $field );",
"private function readFields( )\n {\n global $UNDERQL;\n\n $l_fs = @ mysql_list_fields( $UNDERQL['db']['name'], $this->table_name );\n $l_fq = @ mysql_query( 'SHOW COLUMNS FROM `' . $this->table_name . '`' );\n $l_fc = @ mysql_num_rows( $l_fq );\n @ mysql_free_result( $l_fq );\n $i = 0;\n\n $this->table_fields_names[$this->table_name] = array( );\n $this->string_fields = array( );\n\n while ( $i < $l_fc )\n {\n $l_f = mysql_fetch_field( $l_fs );\n if ( $l_f->numeric != 1 )\n $this->string_fields[@ count( $this->string_fields )] = $l_f->name;\n\n $this->table_fields_names[$this->table_name]\n [@count($this->table_fields_names[$this->table_name])] = $l_f->name;\n $i++;\n }\n }",
"function getParagraphsFields(): array {\n $database = \\Drupal::database();\n\n $query = $database->select('paragraphs_item_field_data', 'p');\n $query->addField('p', 'parent_type', 'parent_type');\n $query->addField('p', 'parent_field_name', 'parent_field_name');\n $result = $query->distinct()->execute()->fetchAll();\n\n return $result;\n}",
"public function getFormRelations($id, $table = 'listing_fields')\n {\n $sql = \"SELECT `T2`.`ID`, `T2`.`Key`, `T2`.`Type`, `T2`.`Status` FROM `\" . RL_DBPREFIX . $this->rlBuildTable . \"` AS `T1` \";\n $sql .= \"RIGHT JOIN `\" . RL_DBPREFIX . $table . \"` AS `T2` ON `T1`.`Field_ID` = `T2`.`ID` \";\n $sql .= \"WHERE `T1`.`Category_ID` = '{$id}' \";\n\n $sql .= \"ORDER BY `T1`.`Position`\";\n\n $fields = $this->getAll($sql);\n\n// if ( !$fields && $table == 'listing_fields' )\n // {\n // if ( $parent_id = $this -> getOne('Parent_ID', \"`ID` = '{$id}'\", 'categories') )\n // {\n // return $this -> getFormRelations($parent_id, $table);\n // }\n // else\n // {\n // return false;\n // }\n // }\n // else\n // {\n $fields = $GLOBALS['rlLang']->replaceLangKeys($fields, $table, array('name'));\n\n // fields adaptation\n foreach ($fields as $key => $value) {\n $relations[$key] = array(\n 'ID' => $fields[$key]['ID'],\n 'Category_ID' => $id,\n 'Fields' => $fields[$key],\n );\n }\n// }\n\n return $relations;\n }",
"public function fields()\n {\n return $this->hasManyThrough(Field::class, FieldGroup::class, 'category_id', 'group_id');\n }",
"public function traverse(): void\n {\n // Register data hooks on the table\n $this->registerHandlerDefinitions($this->definition->tableName, $this->definition->tca);\n \n // Register data hooks on the types and fields\n $this->traverseTypes();\n $this->traverseFields();\n \n // Allow externals\n $this->eventBus->dispatch(new CustomDataHookTraverserEvent($this->definition, function () {\n $this->registerHandlerDefinitions(...func_get_args());\n }));\n }",
"function FetchSubItemArray($s_menu,$s_p1)\r\n{\r\n\tmytrace(\"FetchSubItemArray: s_menu=$s_menu and s_p1=$s_p1\");\r\n\t\r\n\t$arrReturn = array();\r\n\t\r\n\t// mfindlay 7/1/10 : because of the inadequate database structure of the drupal database, we need to first fetch all of the \r\n\t// depath=1 items, then for each row, fetch the child items and append to our final returned table\r\n\t\r\n\t//$result = db_query(\"SELECT * FROM menu_links left outer join url_alias on url_alias.src = menu_links.link_path \r\n\t// WHERE hidden=0 and menu_name=\\\"primary-links\\\" and depth=1 order by weight\");\r\n\t$sSQL = \"SELECT * FROM menu_links left outer join url_alias on url_alias.src = menu_links.link_path WHERE module=\\\"menu\\\" AND hidden=0 AND p1=$s_p1 AND depth=2 \";\r\n\t\tif (strlen($s_menu)>0) $sSQL .= \" AND menu_name=\\\"$s_menu\\\" \"; \r\n\t$sSQL .= \"ORDER BY depth, weight\";\r\n\t\r\n\tmytrace($sSQL);\r\n\t\r\n\t// fetch the intermediate WORK results\r\n\t$result = db_query($sSQL);\r\n\t\r\n\t// WORK array loop\r\n\t// First load each returned row into the WORK array\r\n\twhile ($arg = db_fetch_array($result)) \r\n\t{\r\n\t\t// fetch an array of subitems for this top level item\r\n\t\t$arrWork = FetchThirdItemArray($s_menu,$arg['p1'],$arg['p2']);\r\n\t\t\r\n\t\t// write out the DEPTH=2 record\r\n\t\t$arrReturn[] = $arg;\r\n\t\t\r\n\t\t// now fetch and write out each subitem to the final output array\r\n\t\t$nCount = count($arrWork);\r\n\t\tfor ($x=0; $x<$nCount; $x++)\r\n\t\t{\r\n\t\t\t// write out the subitem to the final output array\r\n\t\t\t$arrReturn[] = $arrWork[$x];\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\treturn $arrReturn;\r\n}",
"function getStructure($form_id)\n {\n // 1 for student\n switch($form_id)\n {\n case '1':\n $query = \"SHOW COLUMNS FROM student\";\n $result = $this->db->query($query)->result();\n $arrFields = array();\n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n $query = \"SHOW COLUMNS FROM sys_stud_feeconfig\";\n $result = $this->db->query($query)->result();\n \n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n $query = \"SHOW COLUMNS FROM enroll\";\n $result = $this->db->query($query)->result();\n \n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n break;\n case '2':\n $query = \"SHOW COLUMNS FROM parent\";\n $result = $this->db->query($query)->result();\n $arrFields = array();\n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n $query = \"SHOW COLUMNS FROM guardian;\";\n $result = $this->db->query($query)->result();\n \n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n break;\n case '3':\n $query = \"SHOW COLUMNS FROM enquired_students;\";\n $result = $this->db->query($query)->result();\n $arrFields = array();\n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n $query = \"SHOW COLUMNS FROM guardian;\";\n $result = $this->db->query($query)->result();\n \n foreach($result as $row)\n {\n $arrFields[] = $row->Field;\n }\n \n break;\n } \n \n return $arrFields;\n }",
"function traverse_gallery_items($GalleryID, $Level=0) // find all GalleryItems within Gallery GalleryID\n{\n\t$GalleryTitle\t\t\t= db_sfq(\"SELECT Title FROM tblGalleries WHERE ID='{$GalleryID}'\");\n\t$NumGIChildren\t \t\t= db_sfq(\"SELECT COUNT(ID) FROM tblGalleryItems \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE ParentGalleryID='{$GalleryID}'\");\n//\techo str_repeat(\". \",$Level) . \"G[$GalleryID]<b>{$GalleryTitle}</b> -{$Level}- GI children:$NumGIChildren<br>\";\n\t\n\t\n\t\n\t\n// ----------------------------------------\t GALLERY RECORD ---------------------------------------------\n ?>\n<tr style=\"background-color: yellow; color: blue;\">\n <td style='background-color:pink;'><a href=\"http://jazzhistorymuseum.org/db/admin/tblGalleries_view.php?SelectedID=<?=$GalleryID?>#detail-view\" target=\"_blank\">E</a></td>\n <td style=\"font-weight:bold;font-size:110%;color:white;background-color: brown;\">G</td>\n <td style=\"padding-left:<?=($Level*16) ?>px; text-indent:<?=(-$Level*16) ?>px;\"><b><?=str_repeat(\". \",$Level) . $GalleryTitle?></b></td>\n <td align=\"right\"><!-- need GI ID a href='<?=GalleryBaseURL.\"?gallery={$GalleryID}\"?>' --><?=$GalleryID?><!-- /a --></td> <!------------------------>\n <td></td><td></td><td></td>\n <td><?=db_sfq(\"SELECT COUNT(ID) FROM tblGalleryItems WHERE ParentGalleryID='{$GalleryID}'\")?></td> </tr>\n<?\n// ----------------------------------------\t END GALLERY RECORD ---------------------------------------------\n\n\n \n \n\t$Results = db_sql(\"SELECT * FROM tblGalleryItems WHERE ParentGalleryID='{$GalleryID}' ORDER BY Sort ASC, ID\");\n\tif (mysqli_num_rows($Results)==0) echo \"<tr><td colspan=7> <i>[no GalleryItems found for ParentGalleryID=={$GalleryID}]</i></td></tr>\";\n\t\n\t\n\t\n\twhile ($Row=mysqli_fetch_assoc($Results))\n\t{ // -------------------------------------------- FOR EACH GALLERY ITEM in this gallery $GalleryID -----------------------------------------\n\n\n\t\t$GalleryItemID\t\t\t= $Row['ID'];\n\t\t$GalleryItemURL\t\t\t= $Row['URL'];\n\t\t$SubGalleryID\t\t\t= $Row['SubGalleryID'];\n\t\t$ParentGalleryID\t\t= $Row['ParentGalleryID']; \n\t\t$GIPageTitle\t\t\t= $Row['PageTitle'];\n\t\t$GIContentTypeID\t\t= $Row['GIContentTypeID'];\n\t\t$SubGalleryTypeDisplay\t= $GIContentTypeID;\n\t\t\tif ($GIContentTypeID==GIContentType_RemoteURL OR $GIContentTypeID==GIContentType_JHDBURL) \t\n\t\t\t\t\t\t$SubGalleryTypeDisplay = \"<a href='$GalleryItemURL' target='_blank'>URL</a>\"; // complete URL self-contained\n\t\t\tif ($GIContentTypeID==GIContentType_ContentURL) \t$SubGalleryTypeDisplay = \"<a href='\".GalleryBaseURL.\"?u={$GalleryItemURL}' target='_blank'>URL</a>\";\n\t\t\tif ($GIContentTypeID==GIContentType_SubGallery) \t$SubGalleryTypeDisplay = \"SubGallery\";\n\t\t\tif ($GIContentTypeID==GIContentType_Image) \t\t\t$SubGalleryTypeDisplay = \"Image\";\n\t\t\tif ($GIContentTypeID==GIContentType_Audio) \t\t\t$SubGalleryTypeDisplay = \"Audio\";\n\t\t\tif ($GIContentTypeID==GIContentType_Video) \t\t\t$SubGalleryTypeDisplay = \"Video\";\n\t\tif ($GIContentTypeID==GIContentType_SubGallery AND ($SubGalleryID <= 0 OR $SubGalleryID == $GalleryID)) \n\t\t{\n\t\t\t?><tr><td colspan=8>Warning traverse_gallery_items(<?=$GalleryID?>) GalleryItemsID(<?=$GalleryItemID?>): ParentGalleryID=<?=$GalleryID?> with SubGalleryID=<?=$SubGalleryID?> </td></tr>\n <?\n\t\t} else //no error\n\t\t{\n\t\t\t$NextLevelGalleryInfo \t= \"\";\n\t\t\t//if ($SubGalleryTypeID==MediaType_SubGallery) FIX ME\n\t\t\t\t$NextLevelGalleryExists = db_sfq(\"SELECT COUNT(ID) FROM tblGalleries WHERE ID='{$SubGalleryID}'\");\n\t\t\tif ($GIContentTypeID==GIContentType_SubGallery AND $NextLevelGalleryExists==0) $NextLevelGalleryInfo \t= \"(SubGallery entry does not exist yet) \";\n\t\t\n\t\t\n\t\t\n\t\t\n// ----------------------------------------\t GALLERY ITEM RECORD ---------------------------------------------\n\t\t?>\n<tr <?= ($GIContentTypeID==GIContentType_SubGallery?\"style='background-color:lightblue;'\":\"style='background-color:lightgrey;'\")?>>\n<td style='background-color:cyan;'><a href=\"http://jazzhistorymuseum.org/db/admin/tblGalleryItems_view.php?SelectedID=<?=$GalleryItemID?>#detail-view\" target=\"_blank\">E</a></td>\n<td>GI</td><td style=\"padding-left:<?=($Level*16) ?>px; text-indent:<?=(-$Level*16) ?>px;\"><?=str_repeat(\". \",$Level) . $GIPageTitle?></td>\n<td align=\"left\" style='color:grey;' ><em><a href='<?=GalleryBaseURL.\"?gi={$GalleryItemID}\"?>'><?=$GalleryItemID?></a>\n</em></td><td><?=$ParentGalleryID?></td><td><?=$SubGalleryID?></td>\n<td><?=$SubGalleryTypeDisplay?></td><td><?=$NextLevelGalleryInfo?></td> </tr>\n \t<?\t\n// ----------------------------------------\t END GALLERY ITEM RECORD ---------------------------------------------\n\n\t\t\n\t\t\n\t\t\n\t\t\tif ($GIContentTypeID==GIContentType_SubGallery)\n\t\t\t\ttraverse_gallery_items($SubGalleryID, $Level+1 );\n\t\t} // end else no error \n\t}// end while\n\t\n}",
"function GetExtendedModule($ModuleID, $extendingModuleID)\n{\n $debug_prefix = debug_indent(\"GetExtendedModule() $ModuleID, $extendingModuleID:\");\n\n global $foreignModules;\n\n //parpe, surq\n $extendedModule = GetModule($ModuleID);\n if($extendedModule->isExtendedByModuleID == $extendingModuleID){\n return $extendedModule;\n }\n\n //parse, surr\n $extendingModule = GetModule($extendingModuleID);\n $extendedModule->parentModuleID = $extendingModule->parentModuleID;\n\n $moduleInfo = GetModuleInfo($ModuleID);\n $extendedPK = $moduleInfo->getPKField();\n $extModuleInfo = GetModuleInfo($extendingModuleID);\n $extendingPK = $extModuleInfo->getPKField();\n\n $extendedMFNames = array_keys($extendedModule->ModuleFields);\n $new_elements = array();\n $extendedModuleMap = &$extendedModule->_map;\n foreach($extendedModuleMap->c as $map_element){\n if('ModuleFields' == $map_element->name){\n $extendedModuleFields_element = &$map_element;\n break;\n }\n }\n\n foreach($extendingModule->ModuleFields as $name => $dummy){\n if(!in_array($name, $extendedMFNames)){\n print \"$debug_prefix adding field $name to $ModuleID\\n\";\n $extendingMF = $extendingModule->ModuleFields[$name];\n\n //translate the extending modulefield into a valid foreign field in the extended module\n switch(strtolower(get_class($extendingMF))){\n case 'tablefield':\n $newFieldType = 'ForeignField';\n $listCondition = '';\n if($extendingModule->parentKey){\n //$listCondition = $extendingModule->localKey.\" = '[*{$extendingModule->parentKey}*]'\";\n $listCondition = $extendingModule->localKey.\" = '/**RecordID**/'\";\n }\n\n $attributes = array(\n 'name' => $name,\n 'type' => $extendingMF->dataType,\n 'localTable' => $ModuleID,\n 'key' => $extendedPK,\n 'foreignTable' => $extendingModuleID,\n 'foreignField' => $name,\n 'foreignKey' => $extendingModule->extendsModuleKey, //was $extendingPK (wrong)\n 'joinType' => 'left',\n 'phrase' => $extendingMF->phrase,\n 'defaultValue' => $extendingMF->defaultValue,\n 'listCondition' => $listCondition\n );\n\n break;\n case 'codefield':\n case 'foreignfield':\n $newFieldType = 'ForeignField';\n $attributes = array(\n 'name' => $name,\n 'type' => $extendingMF->dataType,\n 'localTable' => $ModuleID,\n 'key' => $extendingMF->localKey,\n 'foreignTable' => $extendingMF->foreignTable,\n 'foreignField' => $extendingMF->foreignField,\n 'foreignKey' => $extendingMF->foreignKey,\n 'joinType' => 'left',\n 'phrase' => $extendingMF->phrase,\n 'defaultValue' => $extendingMF->defaultValue\n );\n break;\n case 'remotefield':\n $newFieldType = 'RemoteField';\n $attributes = array(\n 'name' => $name,\n 'type' => $extendingMF->dataType,\n 'localTable' => $extendingMF->moduleID,\n 'remoteModuleID' => $extendingMF->remoteModuleID,\n 'remoteModuleIDField' => $extendingMF->remoteModuleIDField,\n 'remoteRecordIDField' => $extendingMF->remoteRecordIDField,\n 'remoteField' => $extendingMF->remoteField,\n 'remoteDescriptorField' => $extendingMF->remoteDescriptorField,\n 'remoteDescriptor' => $extendingMF->remoteDescriptor,\n 'phrase' => $extendingMF->phrase,\n 'defaultValue' => $extendingMF->defaultValue,\n 'conditionModuleID' => $extendingModuleID //parse\n );\n break;\n default:\n //die('class '.get_class($extendingMF).' not handled in function GetExtendedModule');\n print \"$debug_prefix class \".get_class($extendingMF).\" not handled in function GetExtendedModule\\n\";\n break 2; //\n }\n $new_element = new Element($name, $newFieldType, $attributes);\n $extendedModuleFields_element->c[] = $new_element;\n\n //$newModuleField = $new_element->createObject($extendingModuleID);\n $newModuleField = $new_element->createObject($ModuleID); //this parses\n\n indent_print_r($newModuleField, 'new modulefield');\n\n $extendedModule->ModuleFields[$name] = $newModuleField;\n\n }\n }\n\n $extendedModule->isExtendedByModuleID = $extendingModuleID;\n $foreignModules[$ModuleID] = $extendedModule;\n\n debug_unindent();\n return $extendedModule;\n}",
"public abstract function FetchField();",
"public function get_structure_table(){\n\t\t\t//Obtenemos la base de datos que debemos consultar\n\t\t\tif(empty($this->session->userdata['logged_in']['name_db']))\n\t\t\t\treturn false;\n\t\t\telse{\n\t\t\t\t//Accedemos a la base de datos correcta \n\t\t\t\t$this->personal_db = $this->load->database('personal', TRUE);\n\n\t\t\t\t$structure['comments'] = $this->personal_db->list_fields('comments');\n\t\t\t\t$structure['products'] = $this->personal_db->list_fields('products');\n\n\t\t\t\tif(!empty($structure['comments']) && !empty($structure['products'])){\n\t\t\t\t\treturn $structure;\n\t\t\t\t}else\n\t\t\t\t\treturn false;\t\t\t\n\t\t\t}\n\t\t}",
"function __get($k) {\n if (isset($this->data[$k])) {\n return $this->data[$k]->value();\n }\n\n //look through our table fields to see if it's in there\n //bubbling up through our parents\n $ref = $this->table;\n do {\n //find data\n if (isset($this->data[$ref->table.\".\".$k])) {\n return $this->data[$ref->table.\".\".$k]->value();\n }\n //find a link\n if (isset($ref->link[$k])) {\n $link = $ref->link[$k];\n \n $dest_table = $link['table'];\n $order = $link['order'];\n \n $binding = \"\";\n foreach ($link['binding'] as $local => $dest) {\n $binding .= $dest_table->table.\".\".$dest.\" = '\".db::escape($this->data[$ref->table.\".\".$local]->value()).\"' AND \";\n }\n \n if ($link['filter']) {\n $binding .= $link['filter'].\" AND \";\n }\n $binding = substr($binding,0,-5);\n \n //drill back to the root item and initiate that\n while ($dest_table->parent && $dest_table->parent['table']) {\n $dest_table = $dest_table->parent['table'];\n }\n \n return $dest_table->get($binding, $order);\n }\n $ref =& $ref->parent['table'];\n } while ($ref);\n \n $m = '_get_'.$k; //use this method name to overload that var\n if (method_exists($this, $m)) {\n if (!isset(self::$get_data[get_class($this)][$this->id][$k])) {\n self::$get_data[get_class($this)][$this->id][$k] = $this->$m(); //save the data so we don't have to call again\n }\n return self::$get_data[get_class($this)][$this->id][$k];\n }\n $trace = debug_backtrace(); //error\n trigger_error('Undefined property via __get(): '.get_class($this).'::'.$k.' in '.$trace[0]['file'].' on line '.$trace[0]['line'], E_USER_NOTICE);\n return null;\n //to do _get_$k()\n }"
] | [
"0.635392",
"0.6318603",
"0.6258989",
"0.61585826",
"0.60921466",
"0.6032159",
"0.5966981",
"0.5910059",
"0.5909886",
"0.58679664",
"0.58073854",
"0.5769454",
"0.57187",
"0.5684303",
"0.5678846",
"0.5625253",
"0.56190884",
"0.5594342",
"0.5546417",
"0.5542956",
"0.5542956",
"0.5536613",
"0.55358183",
"0.54860055",
"0.54426414",
"0.54401934",
"0.54361176",
"0.54245925",
"0.539813",
"0.53531605",
"0.53470546",
"0.53379446",
"0.5322819",
"0.5305081",
"0.53042",
"0.52952814",
"0.52589095",
"0.52378166",
"0.5213949",
"0.5209351",
"0.52058667",
"0.5205646",
"0.52054393",
"0.51991",
"0.519889",
"0.519778",
"0.5196534",
"0.5188767",
"0.51856977",
"0.5185603",
"0.51802504",
"0.5178881",
"0.51757926",
"0.5174641",
"0.5166628",
"0.51621395",
"0.5154207",
"0.51490927",
"0.51484877",
"0.5143547",
"0.5120445",
"0.5118126",
"0.51121515",
"0.51118755",
"0.5111187",
"0.510503",
"0.5103232",
"0.51014304",
"0.50999284",
"0.5098612",
"0.5091903",
"0.50875515",
"0.5074104",
"0.50684816",
"0.50679505",
"0.50679064",
"0.5055479",
"0.5055479",
"0.5055479",
"0.5054784",
"0.5051391",
"0.50476956",
"0.50422835",
"0.50411654",
"0.50387716",
"0.5033098",
"0.5032277",
"0.50315267",
"0.50227314",
"0.5015903",
"0.5006712",
"0.50029683",
"0.4998064",
"0.4993225",
"0.49903476",
"0.4987369",
"0.49827844",
"0.49792457",
"0.4962325",
"0.49614912"
] | 0.6012319 | 6 |
table is the db table qData is query data including field and value obj is the class instance from api.php | public function get_request($obj,$qData){
$response = array();
//in the event that an empty obj gets passed in
if(empty($obj)) return $response;
//build the sql query
$sql = "SELECT * FROM $obj->table";
$first = true;
foreach($qData as $key => $val){
if($first){
$sql .= " WHERE $key = :$key";
$first = false;
}else{
$sql .= " AND $key = :$key";
}
}
//prepare in pdo
$stmt = $this->_pdo->prepare($sql);
$stmt->execute($qData);
while($qobj = $stmt->fetch()){
$row = array();
foreach($qobj as $key => $val){
if($val == NULL && (empty($obj->display_null) || !$obj->display_null)) continue;
$row[$key] = $val;
}
//rather than building nested array, maybe should build join?
//hard to do when returning one-to-many and many-to-many
if(is_array($obj->_related)){
foreach($obj->_related as $key => $rel){
$rObj = $rel["obj"];
$column = $rel["column"];
$host_column = $rel["host_column"];
if(isset($row[$host_column])){
$rData = array($column => $row[$host_column]);
$row[$key] = $this->get_request($rObj,$rData);
}
}
}
$response[] = $row;
}
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getData($objData) {\n \t\t$start \t= 'SELECT ';\n \t\t$joinPart = $wherePart = $groupBy= $orderBy ='';\n \t\t// field validation\n \t\tif($objData->fields) \t\t$fieldPart \t= $objData->fields;\n \t\telse \t\t\t\t\t\t$fieldPart \t= ' * ';\n \t\t\n \t\t// table specification\n \t\tif($objData->table)\t\t\t$tablepart \t= ' FROM '.$this->tablePrefix . $objData->table;\n \t\telse\t\t\t\t\t\treturn false;\n \t\t\n \t\t// join section\n \t\tif(property_exists($objData, 'join') && $objData->join)\t\t\t$joinPart\t= ' '.$objData->join;\n \t\t\n \t\t// where condition\n \t\tif(property_exists($objData, 'where') && $objData->where)\t\t\t$wherePart\t= ' WHERE '.$objData->where;\n \t\t\n \t\t// group by section\n \t\tif(property_exists($objData, 'groupbyfield') && $objData->groupbyfield)\t$groupBy\t=' GROUP BY '.$objData->groupbyfield;\n \t\t\n \t\t// sort by section\n \t\tif(property_exists($objData, 'orderby') && $objData->orderby)\t\t$orderBy \t=' ORDER BY '.$objData->orderfield.' '.$objData->orderby.' ';\n \t\t\n \t\t\n \t\t// section to get the count of records\n \t\tif($objData->key)\t\t\t$countOf\t= ' COUNT('.$objData->key.')';\n \t\t$sqlGetCount = $start.$countOf.$tablepart.$joinPart.$wherePart.$groupBy.$orderBy;\n \t\t\n \t\t//$totRecords = $this->fetchOne($this->execute($sqlGetCount));\n \t\t// $totRecords = mysql_num_rows($this->execute($sqlGetCount));\n \t\t$objRes = new StdClass;\n \t\t\n \t\t\n \t\t$resCount \t\t= $this->execute($sqlGetCount);\n\t\tif(mysql_num_rows($resCount) > 1)\n\t\t\t$totRecords = mysql_num_rows($resCount);\n\t\telse\n\t\t\t$totRecords = $this->fetchOne($resCount);\t\t\t\n\t\t $objRes->totalrecords = $totRecords;\n \t\t\n \t\t\n \t\t\n \t\tif($objData->itemperpage) \t$itemPerPage \t= $objData->itemperpage;\n \t\telse \t\t\t\t\t\t$itemPerPage \t= PAGE_LIST_COUNT;\n \t\t\n \t\tif($objData->page) \t\t\t$currentPage \t= $objData->page;\n \t\telse \t\t\t\t\t\t$currentPage \t= '1';\n \t\t$totPages \t\t\t\t\t= ceil($totRecords/$itemPerPage);\n \t\t$objRes->totpages \t\t\t= $totPages;\n \t\t$objRes->currentpage \t\t= $currentPage;\n\n \t\t// get the limit of the query\n \t\t$limitStart = ($currentPage * $itemPerPage) - $itemPerPage;\n \t\t$limitEnd \t= $itemPerPage;\n \t\t$limitVal \t= ' LIMIT '.$limitStart.','.$limitEnd;\n\n \t\t// get the records\n \t\t$selectQuery = $start.$fieldPart.$tablepart.$joinPart.$wherePart.$groupBy.$orderBy.$limitVal;\n \t\t\t//echo $selectQuery;echo '<br/>';\n \t\t// debug the query\n \t\tif($objData->debug)\t$objRes->query = $selectQuery;\n\n \t\t$res \t\t\t=\t$this->execute($selectQuery);\n $objRes->records \t= $this->fetchAll($res);\n \t\treturn $objRes;\t\n \t}",
"private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=array();\n\t\tforeach($this->filters as $filter){\n\t\t\t$arrayFilters[$this->fields[$filter[0]]]=array(\"type\"=>$this->types[$filter[0]],\"value\"=>$filter[1]);\n\t\t}\n\t\t\n\t\tif(db::getFields($this->table,$arrayFieldQuery,$arrayFilters,$this->orderQuery,$this->limit,true)){\n\t\t\t$this->pages=ceil(((int)db::getCalculatedRows())/((int)$this->maxRowsPerPage));\n\t\t\t$this->maxRows=(int)db::getCalculatedRows();\n\t\t\twhile($row=db::fetch(db::$FETCH_TYPE_ASSOC)){\n\t\t\t\t$this->addRow($row);\n\t\t\t}\n\t\t}\n\t}",
"function getDataRowWhere($table,$fields = null,$where = null,$order = null) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadObject();\r\n\t}",
"function field_data()\r\n\t{\r\n\t\t$retval = array();\r\n /*\r\n echo \"<pre>\";\r\n var_dump($this->result_id);\r\n var_dump($this->pdo_results);\r\n echo \"</pre>\";\r\n */\r\n $table_info = $this->pdo_results;\r\n assert(is_array($table_info));\r\n foreach ($table_info as $row_info) {\r\n $F = new stdClass();\r\n $F->name = $row_info['name'];\r\n $F->type = $row_info['type'];\r\n $F->default = $row_info['dflt_value'];\r\n $F->max_length = 0;\r\n $F->primary_key = $row_info['pk'];\r\n \r\n $retval[] = $F;\r\n }\r\n\r\n return $retval;\r\n }",
"public function getTableData()\n\t{\n\t}",
"public function __construct($data=null){\r\n\t\t// Load Table\r\n\t\t$class = get_class($this);\r\n\t\t$this->definition = DBObjectDefinition::getByClassName($class,$this);\r\n\t\t\r\n\t\t// Process Input\r\n\t\t$dataLoaded = false;\r\n\t\tif (!is_null($data)){\r\n\t\t\tif ($data instanceof SQLQueryResultRow){\r\n\t\t\t\tif (!$this->loadFromSqlResult($data)){\r\n\t\t\t\t\tthrow new DBObjectException(get_class(),'Unable to load '.get_class($this).' object from SQL result row');\r\n\t\t\t\t}\r\n\t\t\t\t$dataLoaded = true;\r\n\t\t\t} elseif (is_array($data) || $data instanceof ArrayAccess) {\r\n\t\t\t\t$dataLoaded = $this->loadFromQuery($data);\r\n\t\t\t} elseif (is_numeric($data)) {\r\n\t\t\t\t$data = (int)$data;\r\n\t\t\t\t$pk = $this->getTable()->getPrimaryKey();\r\n\t\t\t\tif ($pk->size()==1){\r\n\t\t\t\t\t$id = $data;\r\n\t\t\t\t\t$data = array(ArrayUtils::getFirst($pk->getColumns())=>$id);\r\n\t\t\t\t\t$dataLoaded = $this->loadFromQuery($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new DBObjectException(get_class(),'Attempted to create '.get_class($this).' object from ID, but primary key contains multiple fields: '.$data);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new DBObjectException(get_class(),'Attempted to create '.get_class($this).' object from unexpected data: '.var_export($data,true).']');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Load Data\r\n\t\tif ($dataLoaded){\r\n\t\t\t$this->new = false;\r\n\t\t\t$this->hasChanged = false;\r\n\t\t\t$this->values = SQLQueryResultRow::wrap($this->values);\r\n\t\t} else {\r\n\t\t\t$this->values = array();\r\n\t\t\tforeach ($this->definition->getColumns() as $name=>$column){\r\n\t\t\t\t$this->values[$name] = new SQLValue($column,$column->getDefaultValue());\r\n\t\t\t}\r\n\t\t\t$this->values = SQLQueryResultRow::wrap($this->values);\r\n\t\t\t\r\n\t\t\t// If a query was specified, but data has not been loaded from it because the record doesn't exist, load that information\r\n\t\t\tif (is_array($data)){\r\n\t\t\t\tforeach ($data as $field=>$value){\r\n\t\t\t\t\t$this->values[$field]->setValue($value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public function tableDataQuery()\n {\n $con = $this->getConnection();\n $query = \"SELECT * FROM Cart;\";\n\n if ($result = $con->query($query))\n {\n $object = $result->fetch_objetct();\n return $object;\n } else\n {\n return false;\n }\n }",
"function __list_fields_data($dbname,$table_name){\n $DB1=$this->__connect($dbname,$table_name);\n $fields = $DB1->list_fields($table_name);\n $fields_data = $DB1->field_data($table_name);\n\n $sql = \"describe $table_name\";\n $result = mysql_query($sql);\n //$sql=$this->db->query('sql');\n\n //convert to object\n //needs thinking\n while($data = mysql_fetch_array($result))\n {\n //echo_array($data);break;\n $d->name[$data['Field']]=array('name'=>$data['Field'],\n 'type'=>$data['Type'],\n 'null'=>$data['Null'],\n 'key'=>$data['Key'],\n 'default'=>$data['Default'],\n 'extra'=>$data['Extra']\n );\n \n \n \n }\n //echo'TEST';\n //echo_array($d);break;\n // print_r($result);\n\n return($d);\n }",
"function db_dispense($table,$data){\n\t$db=R::dispense($table);\n\tforeach ($data as $key => $value) {\n\t\t$db->$key=$value;\n\t}\n\tR::store( $db );\n}",
"function objectToSQL($object,$table,$field=\"\",$update=\"add\") {\n if (is_array($object)) {\n while(list($k,$v) = each($object)) {\n if (!is_numeric($k)) {\n $array[$k] = $v;\n }\n }\n } else {\n $array = get_object_vars($object);\n }\n while(list($key,$val) = @each($array)) {\n if (substr($key,0,1)!=\"_\") {\n if ($k1) { $k1 .= \",\"; }\n if ($v1) { $v1 .= \",\"; }\n if ($k2) { $k2 .= \",\"; }\n $q = \"'\";\n if (is_numeric($val)) {\n $q=\"\";\n }\n if (is_array($val) || is_object($val)) {\n $val = @serialize($val);\n } else { \n\t\t\t$val = addslashes(stripslashes($val));\n\t\t}\n $k1 .= $key;\n $v1 .= \"$q$val$q\";\n $k2 .= \"$key=$q$val$q\";\n if ($key==$field) {\n $fieldval=\"$q$val$q\";\n }\n }\n }\n if ($update==\"add\") {\n $sql = \"insert into $table ($k1) values ($v1)\";\n }\n if ($update==\"update\") {\n $sql = \"update $table set $k2 where $field=$fieldval\";\n }\n return $sql;\n}",
"function Query($query)\n {\n $databasename = $this->databasename;\n static $tblcache = array();\n\n $qitems = array();\n $qitems['fields'] = false;\n $qitems['tablename'] = false;\n $qitems['option'] = false;\n $qitems['orderby'] = false;\n $qitems['min'] = false;\n $qitems['length'] = false;\n $qitems['where'] = false;\n $fieldstoget = false;\n //SELECT\n if ( preg_match(\"/^SELECT/is\",$query) )\n {\n if ( preg_match(\"/^SELECT( DISTINCT | )([a-zA-Z0-9, \\(\\)\\*]+|\\*|COUNT\\(\\*\\)) FROM (\\w+)(.+)/i\",\"$query \",$t1) )\n {\n //campi\n $qitems['fields'] = trim(ltrim($t1[2]));\n $qitems['tablename'] = trim(ltrim($t1[3]));\n $qitems['option'] = trim(ltrim($t1[1]));\n //dprint_r($t1);\n //dprint_r($qitems);\n $tmpwhere = $t1[4];\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $tbl = &$tblcache[$cid];\n //$tbl = new XMLTable($databasename, $qitems['tablename'], $this->path);\n\n\n if ( $qitems['tablename'] == \"\" )\n return \"xmldb: syntax error\";\n\n if ( !file_exists($this->path . \"/$databasename/{$qitems['tablename']}.php\") )\n return \"xmldb: unknow table {$qitems['tablename']}\";\n\n //dprint_r($tbl);\n //native mysql table ----------------------->\n /*\n if (isset($tbl->driverclass->connection))\n {\n $ret = $tbl->driverclass->dbQuery($query, $databasename);\n //dprint_r($ret);\n return $ret;\n }\n */\n //native mysql table -----------------------<\n\n\n //dprint_r($t1);\n if ( preg_match(\"/WHERE (.+)/i\",$tmpwhere,$t1) )\n {\n $tmpwhere = $t1[1];\n $qitems['where'] = $tmpwhere;\n }\n else\n $qitems['where'] = \"\";\n\n if ( preg_match(\"/(.+)LIMIT ([0-9]+),([0-9]+)/i\",$tmpwhere,$dt3) )\n {\n //dprint_r($dt3);\n $qitems['min'] = $dt3[2];\n $qitems['length'] = $dt3[3];\n $tmpwhere = $dt3[1];\n $qitems['where'] = $tmpwhere;\n }\n if ( preg_match(\"/(.+)ORDER BY (.*)(i:limit|)/i\",$tmpwhere,$dt2) )\n {\n //dprint_r($dt2);\n $tmpwhere = $dt2[1];\n $qitems['orderby'] = trim(ltrim($dt2[2]));\n $qitems['where'] = $tmpwhere;\n }\n\n //dprint_r($qitems);\n\n\n }\n\n //dprint_r($qitems);\n //----CONDIZIONE---------------------->\n $where2 = preg_replace(\"/(\\\\w+)( = )/\",'\\$item[\\'${1}\\'] == ',trim(ltrim($qitems['where'])));\n $where2 = preg_replace(\"/(\\\\w+)( > )/\",'\\$item[\\'${1}\\'] > ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( < )/\",'\\$item[\\'${1}\\'] < ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( >= )/\",'\\$item[\\'${1}\\'] >= ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( <= )/\",'\\$item[\\'${1}\\'] <= ',$where2);\n $where2 = preg_replace(\"/(\\\\w+)( <> )/\",'\\$item[\\'${1}\\'] != ',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"%(.*?)%\"/i','preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"%(.*?)\"/i','preg_match(\"/${3}$/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)%\"/i','preg_match(\"/^${3}/i\",\\$item[\\'${1}\\'])',$where2);\n\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)\"/i','\"${3}\" == \\$item[\\'${1}\\']',$where2);\n //$where2 = preg_replace ( '/(\\w+)[\\040]+(LIKE)[\\040]+\"(.*?)\"/i', 'preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])', $where2 );\n\n\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'%(.*?)%\\'/i','preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'%(.*?)\\'/i','preg_match(\"/${3}$/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)%\\'/i','preg_match(\"/^${3}/i\",\\$item[\\'${1}\\'])',$where2);\n $where2 = preg_replace('/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)\\'/i','\"${3}\" == \\$item[\\'${1}\\']',$where2);\n //$where2 = preg_replace ( '/(\\w+)[\\040]+(LIKE)[\\040]+\\'(.*?)\\'/i', 'preg_match(\"/${3}/i\",\\$item[\\'${1}\\'])', $where2 );\n //dprint_r($where2);\n //----CONDIZIONE----------------------<\n //per ottimizzare prendo solo i fields che mi interessano--->\n if ( $qitems['fields'] == \"*\" || preg_match('/COUNT\\(\\*\\)/is',$qitems['fields']) )\n {\n\n $fieldstoget = false;\n }\n else\n {\n //per performance coinvolgo solamente i fields interessati dalla query\n if ( $qitems['orderby'] != \"\" )\n {\n $t = explode(\",\",$qitems['orderby']);\n foreach ( $t as $tf )\n {\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n }\n $t = explode(\",\",$qitems['fields']);\n foreach ( $t as $tf )\n {\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n $t = xmldb_iExplode(\" OR \",$qitems['where']);\n //dprint_r($t);\n foreach ( $t as $tf )\n {\n $tf = trim(ltrim($tf));\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n $t = xmldb_iExplode(\" AND \",$qitems['where']);\n foreach ( $t as $tf )\n {\n $tf = trim(ltrim($tf));\n if ( preg_match(\"/([a-zA-Z0-9_]+)/\",$tf,$pm) )\n $fieldstoget[] = trim(ltrim($pm[0]));\n }\n if ( !is_array($fieldstoget) )\n return \"xmldb: syntax error\";\n\n $fieldstoget = array_unique($fieldstoget);\n }\n //dprint_r($fieldstoget);\n //per ottimizzare prendo solo i fields che mi interessano--->\n\n\n $allrecords = $tbl->GetRecords(false,false,false,false,false,$fieldstoget);\n\n //ordinamento -------->\n if ( $qitems['orderby'] != \"\" )\n {\n $orders = explode(\",\",$qitems['orderby']);\n foreach ( $orders as $order )\n {\n\n if ( preg_match(\"/([a-zA-Z0-9]+)(.*)/s\",$order,$orderfields) );\n {\n //dprint_r($orderfields);\n if ( preg_match(\"/DESC/is\",trim(ltrim($orderfields[2]))) )\n {\n $isdesc = true;\n }\n else\n $isdesc = false;\n\n $allrecords = array_sort_by_key($allrecords,trim(ltrim($orderfields[1])),$isdesc);\n }\n }\n }\n //ordinamento --------<\n\n\n $i = 0;\n $ret = null;\n\n //filtro search condition -------------------->\n if ( !is_array($allrecords) )\n return null;\n foreach ( $allrecords as $item )\n {\n $ok = false;\n\n //eval($where2);\n //dprint_r (\"if ($where2){\". '$ok=true;'.\"}\");\n if ( $where2 == \"\" )\n $ok = true;\n else\n eval(\"if ($where2){\" . '$ok=true;' . \"}\");\n if ( $ok == false )\n continue;\n //dprint_r($qitems);\n if ( $qitems['fields'] == \"*\" )\n {\n $tmp = $item;\n }\n else\n {\n\n $fields = explode(\",\",$qitems['fields']);\n $tmp = null;\n //dprint_r($fields);\n //alias ------->\n foreach ( $fields as $field )\n {\n if ( preg_match(\"/ AS /is\",$field) )\n {\n\n $as = xmldb_iExplode(\" AS \",$field);\n $k2 = trim(ltrim($as[1]));\n $k1 = trim(ltrim($as[0]));\n }\n else\n $k1 = $k2 = trim(ltrim($field));\n\n if ( !isset($item[$k1]) && strtoupper($k1) != \"COUNT(*)\" )\n return \"xmldb: unknow row '$k1' in table {$qitems['tablename']}\";\n\n if ( strtoupper($k1) != \"COUNT(*)\" )\n {\n //echo \"field = $k1 \";\n $tmp[$k2] = $item[$k1];\n }\n else\n $tmp[$k2] = $item;\n\n }\n //alias -------<\n }\n //----distinct------------->\n if ( strtoupper($qitems['option']) == \"DISTINCT\" )\n if ( array_in_array($tmp,$ret) )\n continue;\n //----distinct-------------<\n $i++ ;\n //----min length----------->\n if ( ($qitems['min']) && $i < $qitems['min'] )\n continue;\n if ( ($qitems['min'] && $qitems['length']) && ($i) >= ($qitems['min'] + $qitems['length']) )\n break;\n //----min length----------->\n $ret[] = $tmp;\n }\n //filtro search condition --------------------<\n //dprint_r($qitems);\n $count = false;\n if ( stristr($qitems['fields'],\"COUNT(*)\") )\n {\n // ADDED BY DANIELE FRANZA 2/02/2009: start\n if ( preg_match(\"/ AS /is\",$qitems['fields']) )\n {\n $as = xmldb_iExplode(\" AS \",$qitems['fields']);\n $k2 = trim(ltrim($as[1]));\n $k1 = trim(ltrim($as[0]));\n }\n else\n {\n //if (!isset($field))\n //\t$field=\"COUNT(*)\";\n $k1 = $k2 = trim(ltrim($field));\n }\n // ADDED BY DANIELE FRANZA 2/02/2009: end\n\n\n $count = true;\n //$fields = false;\n }\n\n if ( $count )\n return array(0=>array(\"$k2\"=>count($ret)));\n else\n return $ret;\n }\n\n //DESCRIBE TODO\n if ( preg_match(\"/^DESCRIBE/is\",$query) )\n {\n if ( preg_match(\"/^DESCRIBE ([a-zA-Z0-9_]+)/is\",\"$query \",$t1) )\n {\n $qitems['tablename'] = trim(ltrim($t1[1]));\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $t = &$tblcache[$cid];\n //\t\t\t\t$t = new XMLTable($databasename, $qitems['tablename'], $this->path);\n //native mysql table ----------------------->\n /*\n if ($t->driverclass->connection)\n {\n return $t->driverclass->dbQuery($query);\n }\n //native mysql table -----------------------<\n else*/\n {\n $ret = array();\n foreach ( $t->fields as $field )\n {\n $ret[] = array(\"Field\"=>$field->name,\"Type\"=>$field->type,\"Null\"=>\"NO\",\"Key\"=>$field->primarykey,\"Extra\"=>$field->extra);\n }\n return $ret;\n }\n }\n }\n //SHOW TABLES\n if ( preg_match(\"/^SHOW TABLES/is\",trim(ltrim($query))) )\n {\n $path = ($this->path . \"/\" . $this->databasename . \"/*\");\n $files = glob($path);\n $ret = array();\n foreach ( $files as $file )\n {\n if ( !is_dir($file) )\n $ret[] = array(\"Tables_in_\" . $this->databasename=>preg_replace('/.php$/s','',basename($file)));\n }\n return $ret;\n }\n //INSERT\n if ( preg_match(\"/^INSERT/is\",$query) )\n {\n if ( preg_match(\"/^INSERT[ ]+INTO([a-zA-Z0-9\\\\`\\\\._ ]+)\\\\(([a-zA-Z_ ,]+)\\\\)[ ]+VALUES[ ]+\\\\((.*)\\\\)/i\",\"$query \",$t1) )\n {\n $qitems['tablename'] = trim(ltrim($t1[1]));\n $qitems['fields'] = trim(ltrim($t1[2]));\n $qitems['values'] = trim(ltrim($t1[3]));\n $cid = $this->path . $databasename . $qitems['tablename'];\n if ( !isset($tblcache[$cid]) )\n $tblcache[$cid] = new XMLTable($databasename,$qitems['tablename'],$this->path);\n $tbl = &$tblcache[$cid];\n //native mysql table ----------------------->\n /*if ($tbl->driverclass->connection)\n {\n $ret = $t->driverclass->dbQuery($query);\n //dprint_r($ret);\n return $ret;\n }*/\n //native mysql table -----------------------<\n\n\n $fields = explode(\",\",$qitems['fields']);\n $values = explode(\",\",$qitems['values']);\n $recordstoinsert = array();\n if ( count($fields) == count($values) )\n {\n for ( $i = 0;$i < count($fields);$i++ )\n {\n $recordstoinsert[$fields[$i]] = preg_replace(\"/^'/\",\"\",preg_replace(\"/'$/s\",\"\",preg_replace('/^\"/s',\"\",preg_replace('/\"$/s',\"\",$values[$i]))));\n }\n }\n else\n return \"xmldb: syntax error\";\n\n return $tbl->InsertRecord($recordstoinsert);\n }\n }\n //UPDATE TODO\n if ( preg_match(\"/^UPDATE/is\",$query) )\n {\n //UPDATE `fndatabase`.`users` SET `name` = 'quattro' WHERE CONVERT( `users`.`email` USING utf8 ) = 'uno' LIMIT 1 ;\n\n\n }\n //DELETE TODO\n if ( preg_match(\"/^DELETE/is\",$query) )\n {\n\n }\n }",
"abstract public function query();",
"function tableData(){\n\t\t$entity_type = in(\"entity_type\");\t\t\n\t\t$table = $entity_type()->getTable();\n\t\t$test = in('test');\n\n\t\t// Table's primary key\n\t\t$primaryKey = 'id';\n\n\t\t// Array of database columns which should be read and sent back to DataTables.\n\t\t// The `db` parameter represents the column name in the database, while the `dt`\n\t\t// parameter represents the DataTables column identifier. In this case simple\n\t\t// indexes\n\t\t$columns = array(\n\t\t\tarray( \t'db' => 'id',\n\t\t\t\t\t'dt' => 0 \n\t\t\t\t ),\n\t\t\tarray( \t'db' => 'created', \n\t\t\t\t\t'dt' => 1, \n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t),\n\t\t\tarray( \t'db' => 'updated',\n\t\t\t\t\t'dt' => 2,\n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t ),\n\t\t);\n\t\t\n\t\t$additional_columns = self::getAdditionalFields( $entity_type );\n\t\t\n\t\t$columns = array_merge( $columns, $additional_columns );\n\n\t\t// SQL server connection information\n\t\t$sql_details = array(\n\t\t\t'user' => 'root',\n\t\t\t'pass' => '7777',\n\t\t\t'db' => 'ci3',\n\t\t\t'host' => 'localhost'\n\t\t);\n\t\n\t\trequire( 'theme/admin/scripts/ssp.class.php' );\t\t\n\t\t$date_from = in(\"date_from\");\n\t\t$date_to = in(\"date_to\");\n\t\t$extra_query = null;\n\t\tif( !empty( $date_from ) ){\n\t\t\t$stamp_from = strtotime( $date_from );\n\t\t\t$extra_query .= \"created > $stamp_from\";\n\t\t}\n\t\tif( !empty( $date_to ) ){\n\t\t\t$stamp_to = strtotime( $date_to.\" +1 day\" ) - 1;\n\t\t\tif( !empty( $extra_query ) ) $extra_query .= \" AND \";\n\t\t\t$extra_query .= \"created < $stamp_to\";\n\t\t\t\n\t\t}\t\t\n\t\t\n\t\techo json_encode(\n\t\t\tSSP::complex( $_GET, $sql_details, $table, $primaryKey, $columns, $extra_query )\n\t\t);\n\t}",
"function sql_fetch_field($res,$offset = 0)\n {\n $results = array();\n $obj = NULL;\n $results = $res->getColumnMeta($offset);\n foreach($results as $key=>$value) {\n $obj->$key = $value;\n }\n return $obj;\n }",
"function mswGetTableData($table,$row,$val,$and='',$params='*') {\n $q = mysql_query(\"SELECT $params FROM `\".DB_PREFIX.$table.\"`\n WHERE `\".$row.\"` = '{$val}'\n $and\n LIMIT 1\n \") or die(mswMysqlErrMsg(mysql_errno(),mysql_error(),__LINE__,__FILE__));\n return mysql_fetch_object($q);\n}",
"public function query();",
"public function query();",
"public function query();",
"public static function get($table, $fields){\r\n $queryType = \"get\";\r\n \r\n include '../helper/retrieve_data.php';\r\n return $dataobj;\r\n }",
"public function createQuery($data);",
"public function fetch_object($query);",
"function createQuery() ;",
"public function getDataWithTypeDb() {}",
"public function meta(){\n $table_meta = new \\stdClass();\n\n // get fields in the database table\n if(count($this->_model_meta)==0){\n $this->_meta();\n }\n\n\n foreach ($this->_model_meta as $meta) {\n $table_meta->{$meta->name} = $meta;\n }\n\n return $table_meta;\n }",
"public function getData($npk,$table)\n {\n return $this->db->get_where($table,array('npk' => $npk));\n }",
"function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }",
"protected function fromdb($data){\n $this->id = $data['id']; //15\n $this->baseurl = $data['baseurl'];\n $this->repositoryname = $data['repositoryname'];\n $this->identifydata = $data['identifydata'];\n $this->metadataprefix = $data['metadataprefix'];\n $this->errorpolicy = $data['errorpolicy'];\n $this->email = $data['email'];\n $this->granularity = $data['granularity'];\n $this->youngestdatestamp = $data['youngestdatestamp'];\n\n $this->httpuser = $data['httpuser'];\n\n $this->websiteurl = $data['websiteurl'];\n $this->default_identifier = $data['default_identifier'];\n $this->allctxo_parsed = $data['allctxo_parsed'];\n $this->created = $data['created'];\n\n $this->harvest_laststart = $data['harvest_laststart']; //11\n $this->harvest_lastend = $data['harvest_lastend'];\n $this->harvest_lastlistsize = $data['harvest_lastlistsize'];\n $this->harvest_lastexitcode = $data['harvest_lastexitcode'];\n\n $this->parse_laststart = $data['parse_laststart'];\n $this->parse_lastend = $data['parse_lastend'];\n $this->parse_lastctxocount = $data['parse_lastctxocount'];\n $this->parse_lastexitcode = $data['parse_lastexitcode'];\n\n $this->calc_laststart = $data['calc_laststart'];\n $this->calc_lastend = $data['calc_lastend'];\n $this->calc_lastexitcode = $data['calc_lastexitcode'];\n\n $this->aggr_laststart = $data['aggr_laststart'];\n $this->aggr_lastend = $data['aggr_lastend'];\n $this->aggr_lastexitcode = $data['aggr_lastexitcode'];\n\n }",
"function getFromDatabase($row) {\r\n\t\t//id\r\n\t\t$this->id = $row['id'];\r\n\t\t//eventDateTime\r\n\t\t$this->event_date_time = $row['eventDateTime'];\r\n\t\t//time before\r\n\t\t$this->time_before = $row['timeBefore'];\r\n\t\t//frequency\r\n\t\t$this->freq = $row['frequency'];\r\n\t\t//method\r\n\t\t$this->notif_method = $row['method'];\r\n\t}",
"function mosGetDBOBJ($tbl_name, $arr_field, $where = null)\n{\n\tglobal $database;\n\t$db\t=\t$database;\n\t$field\t=\timplode(',',$arr_field);\t\n\t$query\t=\t\"SELECT $field FROM $tbl_name WHERE \". $where;\n\t$db->setQuery($query);\t\n\tif (count($arr_field)>1) {\n\t\treturn $db->loadObjectList();\n\t}else {\n\t\treturn $db->loadResultArray();\n\t}\t\n}",
"public function dataTable();",
"function createQueryObject($ifc, $con){\r\n\t\tdie('Not implemented');\r\n\t}",
"public function getData($table, $values='a.*', $filters = '', $limits='', $orderby='a.ID DESC', $join='', $groupby='') {\n\n global $mdb2;\n\n $sql = \"SELECT $values \"\n . \"FROM $table as a \"\n . \" $join \"\n . \"WHERE a.id >= 1 \";\n\n #makeFilters\n $sql .= $this->makeFilters($filters);\n\n\n if ($groupby != '') {\n $sql .= \" group by $groupby \";\n }\n\n $sql .= \" ORDER BY \" . $orderby . \" \";\n\n if ($limits != '') {\n $sql .= \"Limit $limits[start], $limits[limit];\";\n }\n if ($this->debug == 1) {\n echo \"<br><b>$sql</b><br>\";\n }\n \n $res = $mdb2->loadModule('Extended')->getAll($sql, null, array(), '', MDB2_FETCHMODE_ASSOC);\n\n if (count($res) == 0) {\n $res[0]['result'] = 'empty';\n }\n \n #$arq = fopen(\"../logs/query-select-errors.txt\",'a+');\n #fwrite($arq,$sql.\" - \".@date('d/m/Y h:i:s').'/n');\n return $res;\n }",
"function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }",
"public function get_data(){\n\t\t// by using given function\n\t\tif($this->func_data_total && function_exists($this->func_data_total)){\n\t\t\t$this->items_total = call_user_func_array($this->func_data_total, array());\n\t\t// by using direct SQL request\n\t\t}else{\n\t\t\t$total = $this->db->fetch_all(\n\t\t\t\tsprintf(\n\t\t\t\t\t'SELECT COUNT(*) as cnt'\n\t\t\t\t\t\t.' FROM %s'\n\t\t\t\t\t\t.'%s',\n\t\t\t\t\t$this->sql['table'], // TABLE\n\t\t\t\t\t$this->sql['where'] // WHERE\n\t\t\t\t),\n\t\t\t\t'obj'\n\t\t\t);\n\t\t\t$this->items_total = $total[0]->cnt;\n\t\t}\n\t\t\n\t\t// Getting data\n\t\t// by using given function\n\t\tif($this->func_data_get && function_exists($this->func_data_get)){\n\t\t\t$param = array($this->sql['offset'], $this->sql['limit']);\n\t\t\tif($this->order_by) $param[] = current($this->order_by);\n\t\t\tif($this->order_by) $param[] = key($this->order_by);\n\t\t\t$this->rows = call_user_func_array($this->func_data_get, $param);\n\t\t// by using direct SQL request\n\t\t}else{\n\t\t $columns = array();\n\t\t foreach ( $this->columns_names as $columns_name ) {\n\t\t\t $columns[] = $this->sql['table'] . '.' . $columns_name;\n }\n\t\t\t$this->rows = $this->db->fetch_all(\n\t\t\t\tsprintf(\n\t\t\t\t\t'SELECT %s'\n\t\t\t\t\t\t.' FROM %s'\n\t\t\t\t\t\t.'%s'\n\t\t\t\t\t\t.' ORDER BY %s %s'\n\t\t\t\t\t\t.' LIMIT %s%d',\n\t\t\t\t\timplode(', ', $columns), // COLUMNS\n\t\t\t\t\t$this->sql['table'], // TABLE\n\t\t\t\t\t$this->sql['where'], // WHERE\n\t\t\t\t\tkey($this->order_by), current($this->order_by), // ORDER BY\n\t\t\t\t\t$this->sql['offset'].',', $this->sql['limit'] // LIMIT\t\n\t\t\t\t),\n\t\t\t\t$this->sql['get_array'] === true ? 'array' : 'obj'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Adding actions to each row \n\t\tforeach($this->rows as &$row){\n\t\t\tif(is_object($row)) $row->actions = array_flip(array_keys($this->actions));\n\t\t\tif(is_array($row)) $row['actions'] = array_flip(array_keys($this->actions));\n\t\t} unset($row);\n\n\t\t$this->items_count = count((array)$this->rows);\n\t\t\n\t\t// Execute given function to prepare data\n\t\tif($this->func_data_prepare && function_exists($this->func_data_prepare))\n\t\t\tcall_user_func_array($this->func_data_prepare, array(&$this)); // Changing $this in function\n\t\telse{\n\t\t\t$this->preapre_data__default();\n\t\t}\n\t\t\n\t\treturn $this;\n\t\t\n\t}",
"public static function buildObject($table, $data)\n {\n $objectClass = $table->getPersistClassName();\n $object = new $objectClass;\n $errors = array();\n foreach($table->getFields() as $field) {\n $name = $field->getName();\n if (!isset($data[$name])) {\n $data[$name] = null;\n }\n $postfix = '';\n foreach($table->getBinds() as $bind) {\n if($bind->getLeftField() === $field->getName()){\n $postfix = $bind->getLeftField() === $field->getName() ? OrmUtils::BIND_PREFIX : \"\";\n break;\n }\n }\n $setter = \"set\" . ucfirst($name).$postfix;\n $object->$setter($data[$name]);\n }\n return array($object, $errors);\n }",
"function dspTblInfo($tblQ)\n{\n\n\t$tblParam['tblName'] = $tblQ->tblInfo->tblName;\n\t$tblParam['tblDesc'] = $tblQ->tblInfo->tblComment;\n\t$tblParam['tblFields'] = $tblQ->tblFlds;\n\t$tblParam['tblPrimary'] = $tblQ->tblPrimary;\n\t$tblParam['tblUnique'] = $tblQ->tblUnique;\n\t$tblParam['tblConstraints'] = $tblQ->tblCtrts;\n\t\n\treturn $tblParam;\n}",
"public function getData($table, $id = null, $valueId = null)\n {\n if ($id == null && $valueId == null) {\n $query = \"SELECT * FROM \".$table;\n }else{\n $query = \"SELECT * FROM \".$table.\" WHERE $id ='\".$valueId.\"'\";\n }\n\n $result = $this->conn->query($query);\n $rows = [];\n\n while ($row = $result->fetch_object()) {\n $rows[] = $row;\n }\n \n return $rows;\n }",
"public abstract function get_query();",
"function GetData($Field, $Table, $where = NULL, $and = NULL, $OrderField, $Order = \"DESC\") {\r\n global $con;\r\n $getAll = $con->prepare(\"SELECT $Field FROM $Table $where $and ORDER BY $OrderField $Order\");\r\n $getAll->execute();\r\n $AllData = $getAll->fetchAll();\r\n return $AllData;\r\n }",
"function getByID($table,$field,$value);",
"function get_form_query() {\n\n $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_query_body');\n $my_table->set_col($this->get_button_filter());\n $my_table->set_col('เงื่อนไข ');\n $my_table->set_col(' ค่าที่ค้นหา ');\n $my_table->set_row();\n foreach ($this->caption_fields AS $caption => $id) {\n if (!is_object($this->filter_controls[$id])) {\n $this->set_filter_controls(new OrTextbox($id));\n }\n $my_compare = new OrSelectbox('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[option]->set(array(\n '=' => '=',\n '<>' => '<>',\n '>=' => '>=',\n '<=' => '<=',\n 'BETWEEN' => 'BETWEEN',\n 'LIKE' => 'LIKE',\n 'IN' => 'IN'\n ));\n $my_compare->OP_[default_value]->set($this->get_filter_compare($id)); //สร้าง Function เพื่อค้นหาค่า Default compare\n $my_compare->OP_[auto_post]->set(true);\n //$my_table->set_col($my_control->OP_[caption]->get() , \"td_caption\");\n debug_mode(__FILE__, __LINE__, $this->filter_controls[$id]->OP_[caption]->get(), 'Filter_controls');\n $my_table->set_col($this->filter_controls[$id]->OP_[caption]->get(), \"td_query_caption\");\n $my_table->set_col($my_compare->get_tag(), \"td_query_compare\");\n $my_table->set_col($this->filter_controls[$id]->get_tag(), \"td_query_value\");\n $my_table->set_row('tr_query_body');\n }\n\n $my_table->set_col('ค้นคำ เรียงลำดับ');\n $my_table->set_col($this->get_control_filter());\n $my_table->set_col($this->get_control_order());\n $my_table->set_row();\n\n return $my_table->get_tag();\n }",
"public function __construct($id = null) {\n // Return each value as $this->whatever\n if ($id) {\n $sql = \"SELECT * FROM {$this->table} WHERE id = {$id}\"; // Sanitize this\n $results = DB::getRow($sql);\n if ($results) {\n foreach ($results as $field => $value) {\n $this->_values[$field] = $value;\n }\n $this->_fresh = false;\n }\n }\n }",
"public function getFromCache_queryRow() {}",
"function _set_from_object($query)\n\t{\n\t\tif ( ! is_object($query))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// First generate the headings from the table column names\n\t\tif (count($this->heading) == 0)\n\t\t{\n\t\t\tif ( ! method_exists($query, 'list_fields'))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t$this->heading = $this->_prep_args($query->list_fields());\n\t\t}\n\n\t\t// Next blast through the result array and build out the rows\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$this->rows[] = $this->_prep_args($row);\n\t\t\t}\n\t\t}\n\t}",
"private function query($lang,$func,$table,$field=\"\",$where=\"\",$data=\"\",$sort=\"\")\n\t{\n\t\t$queryString = \"\";\n\t\t$tableArray = array($table);\n\t\t$fieldArray = array();\n\t\t$filterArray = array();\n\n\t\t$queryTable = \"\";\n\t\t$queryField = \"\";\n\t\t$queryWhere = \"\";\n\n\n/*echoall(\"lang: $lang, func: $func, table: $table, field: $field\");\nechoall($where);\nechoall(\"data: $data, sort: $sort\");*/\n\n//------------------------------------------------------------------------------\n// create relation table list\n\t\tforeach($this->relation->children() as $entry)\n\t\t{\n\t\t\tarray_push($tableArray,(string)$entry->attributes()->table);\n\t\t}\n\n\t\t$queryTable = implode(\",\",$tableArray);\n\n\n//------------------------------------------------------------------------------\n//TODO insert prefix to all table names\n\n\n//------------------------------------------------------------------------------\n// create where relation list\n\t\tif (is_array($where))\n\t\t{\n\n// loop over all where clauses\n\t\t\tforeach($where as $entry)\n\t\t\t{\n\t\t\t\t$whereField = (string)$entry->attributes()->field;\n\t\t\t\t$whereValue = (string)$entry->attributes()->value;\n\t\t\t\t$whereOp = (string)$entry->attributes()->operator;\n\n\n// relation field definition found\n\t\t\t\tif ($this->relation->$whereField)\n\t\t\t\t{\n\t\t\t\t\t$relTableName = (string)$this->relation->$whereField->attributes()->table;\n\t\t\t\t\t$relTableId = (string)$this->relation->$whereField->attributes()->id;\n\t\t\t\t\t$relTableDisplay = (string)$this->relation->$whereField->attributes()->display;\n\n\t\t\t\t\tarray_push($filterArray,\"{$relTableName}.content{$whereOp}'{$whereValue}' and {$table}.{$whereField}={$relTableName}.{$relTableId}\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray_push($filterArray,\"{$table}.{$whereField}{$whereOp}{$whereValue}\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$idFilter = implode(\" and \",$filterArray);\n\t\t}\n\n\n//------------------------------------------------------------------------------\n// create field relation list\n// get field list\n\t\t$fieldList = mysql_list_fields($this->name,$table);\n\n// loop fields\n\t\tif ($fieldList)\n\t\t{\n\t\t\tfor ($x = 0;$x < mysql_num_fields($fieldList);$x++)\n\t\t\t{\n//TODO look if field defined or all fields\n\n\t\t\t\t$fieldName = mysql_field_name($fieldList,$x);\n\n// relation field found\n\t\t\t\tif ($this->relation->$fieldName)\n\t\t\t\t{\n\t\t\t\t\t$relationId = $this->relation->$fieldName->attributes()->id;\n\t\t\t\t\t$relationTable = $this->relation->$fieldName->attributes()->table;\n\n\n// insert alias for relation\n\t\t\t\t\tarray_push($fieldArray,$relationTable . \".content AS \" . $fieldName);\n\t\t\t\t\tarray_push($fieldArray,$relationTable . \".lang AS \" . $fieldName . \"_lang\"); // language referenz\n\n// insert filter parameters for relation\n\t\t\t\t\tarray_push($filterArray,\"{$relationTable}.{$relationId}={$table}.{$fieldName}\");\n\n\n//------------------------------------------------------------------------------\n// check for language\n// filter string for entry filtering\n\t\t\t\t\t$filterString = \"{$relationTable}.{$relationId}={$table}.{$fieldName} and \" . $idFilter;\n\n// create where clause for language check\n\t\t\t\t\tif ($filterString)\n\t\t\t\t\t{\n// get database entry default language\n\t\t\t\t\t\t$langQuery = \"SELECT {$table}.lang FROM {$table},{$relationTable} WHERE $filterString\";// and lang='{$lang}'\";\n\n\t\t\t\t\t\t$langRes = mysql_query($langQuery);\n\t\t\t\t\t\tif ($langRes)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$defaultLang = mysql_fetch_array($langRes);\n\t\t\t\t\t\t\t$defaultLang = $defaultLang['lang'];\n\n\n// check if lang entry is present\n// if not use entry default language\n\t\t\t\t\t\t\t$langQuery = \"SELECT {$table}.lang FROM {$table},{$relationTable} WHERE $filterString and {$relationTable}.lang='{$lang}'\";\n\t\t\t\t\t\t\t$langRes = mysql_query($langQuery);\n\n\n// load current language\n\t\t\t\t\t\t\tif(mysql_num_rows($langRes))\n\t\t\t\t\t\t\t\tarray_push($filterArray,\"{$relationTable}.lang='{$lang}'\");\n\n// load default language\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tarray_push($filterArray,\"{$relationTable}.lang='$defaultLang'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tOLIVError::fire(\"OLIVDatabase::query - no valid resource from query call\");\n\t\t\t\t\t}\n\t\t\t\t}\n// no relation\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray_push($fieldArray,$table . \".\" . $fieldName . \" AS \" . $fieldName);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$queryField = implode(\",\",$fieldArray);\n\t\t}\n\n\n//------------------------------------------------------------------------------\n// recreate where clause for query\n\t\tif ($filterArray);\n\t\t\t$queryWhere = implode(\" and \",$filterArray);\n\n\n//echoall($queryWhere);\n//------------------------------------------------------------------------------\n// parse command\n\t\tif ($queryWhere) $queryWhere = \"WHERE \" . $queryWhere;\n\n\t\tswitch (strtolower($func))\n\t\t{\n\t\t\tcase 'select':\n\t\t\t\t$queryString = \"SELECT $queryField FROM $queryTable $queryWhere $sort\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'insert':\n\t\t\t\t$queryString = \"INSERT INTO $queryTable SET $data\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'update':\n\t\t\t\t$queryString = \"UPDATE $queryTable SET $data WHERE $queryWhere\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\t$queryString = \"DELETE FROM $queryTable WHERE $queryWhere\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ($queryString)\n\t\t{\n\n\n//echoall($queryString);\n//------------------------------------------------------------------------------\n//------------------------------------------------------------------------------\n// mysql query call\n\t\t\t$this->sqlResource = mysql_query($queryString);\n\t\t\t$this->insertId = mysql_insert_id($this->dbResource);\n//------------------------------------------------------------------------------\n//------------------------------------------------------------------------------\n\t\t}\n\t}",
"function get_detail_data($table_name,$where,$return_data)\r\n{\r\n\t$ci = & get_instance();\r\n\t$ci->load->database();\r\n\t$result = $ci->db->get_where($table_name,$where)->row();\r\n\tif($result):\r\n\t\treturn $result->$return_data;\r\n\telse:\r\n\t\treturn false;\r\n\tendif;\r\n}",
"public function data() {\n\t\treturn $this->query;\n\t}",
"function my_browse_data( $table_name , $datas ){\r\n\t\r\n\tglobal $connection;\r\n\t\r\n\t$primary_field = my_get_field_list($table_name);\r\n\tforeach($datas as $field => $value){\r\n\t\t$fieldname = $field ;\r\n\t\t$fieldvalue = $value;\r\n\t}\r\n\t\r\n\t$query = \" SELECT `\".$primary_field. \"` FROM `\".$table_name.\"` WHERE `\".$fieldname.\"` = \". $fieldvalue ;\r\n\t \r\n\t$result = my_query( $query );\r\n\tif( my_num_rows($result) > 0 ){\r\n\t\t\r\n\t\t$data = array();\r\n\t\t\r\n\t\twhile(\t$row = my_fetch_array($result) ){\r\n\t\t\t$data[] = $row[$primary_field];\r\n\t\t}\r\n\t\t\r\n\t\treturn $data;\r\n\t\r\n\t}\r\n\t\r\n\treturn false;\r\n\t\r\n}",
"public function query()\n\t{\n\t\t\n\t}",
"public function createDataRow()\n\t{\n\t\t$row = array() ;\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\t$row[$field] = $this->$field ;\n\t\t}\n\t\treturn $row ;\n\t}",
"public static function query();",
"abstract public function queryOne($Qs);",
"private function _prepareReturnData($data) {\n $o = new Agana_Model_Object($data);\n $o->setId($data['objid']);\n $o->setTableName($data['tablename']);\n return $o;\n }",
"public function loadFromObject($obj)\n\t{\n\t\t//throw new Exception('i');\n\t\t//var_dump($obj);\n\t\t//print_r($obj);\n\t\t\n\t\t$vars_info = $this->loadTableDescription($obj->getTableName());\n\t\t//print_r($vars_info);\n\t\t$vars = array();\n\t\tforeach($vars_info as $inf)\n\t\t{\n\t\t\t$varname = $inf['COLUMN_NAME'];\n\t\t\t$vars[$varname] = array();\n\t\t\t$v =& $vars[$varname];\n\t\t\t\n\t\t\t$v['current_value'] = $obj->$varname;\n\t\t\t\n\t\t\t//TODO: use export instead??\n\t\t\t$v['DATA_TYPE'] = $inf['DATA_TYPE'];\n\t\t\t$v['CHARACTER_MAXIMUM_LENGTH'] = $inf['CHARACTER_MAXIMUM_LENGTH'];\n\t\t\t$v['NUMERIC_PRECISION'] = $inf['NUMERIC_PRECISION'];\n\t\t\t$v['COLUMN_TYPE'] = $inf['COLUMN_TYPE'];\n\t\t\t$v['IS_NULLABLE'] = $inf['IS_NULLABLE'];\n\t\t\t$v['COLUMN_KEY'] = $inf['COLUMN_KEY'];\n\t\t\t$v['COLUMN_COMMENT'] = $inf['COLUMN_COMMENT'];\n\t\t\t\n\t\t\t$ref_tbl = $inf['REFERENCED_TABLE_NAME'];\n\t\t\t$ref_col = $inf['REFERENCED_COLUMN_NAME'];\n\t\t\tif(!empty($ref_tbl) && !empty($ref_col))\n\t\t\t{\n\t\t\t\t//TODO: this is a workaround.\n\t\t\t\t$name = ($ref_tbl == 'style') ? 'class' : 'name';\n\t\t\t\t$name = ($ref_tbl == 'user') ? 'username' : $name;\n\t\t\t\t$name = ($ref_tbl == 'IBO_student_exam') ? 'id' : $name;\n\t\t\t\t$v['references'] = SqlQuery::getInstance()->listQuery($ref_tbl,$ref_col,$name,'DISTINCT',1);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$v['references'] = NULL;\n\t\t}\n\t\t\n\t\t//and make the call to construct elements:\n\t\t$this->loadFromDescription($vars);\n\t\t\n\t}",
"function getDataListWhere($table,$fields = null,$where = null,$order = null,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}",
"public function _query()\n {\n }",
"function getResultSet($data,$table,$chkfield,$id=0,$ext=0)\n\t{\n\t\t$ret=0;\n\t\tif(strlen($data))\n\t\t{\n\t\t\tif(strlen($table))\n\t\t\t{\n\t\t\t\tif($chkfield==1)\n\t\t\t\t{\n\t\t\t\t\t$where=\" 1\";\n\t\t\t\t}else{\n\t\t\t\t\t$where=$this->WhereClause($chkfield,$id);\n\t\t\t\t}\n\t\t\t\tif(strlen($where))\n\t\t\t\t{\n\t\t\t\t\t$sql=\"select $data from $table where $where\";\n\t\t\t\t\tif($ext)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(is_string($ext))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql.=\" \" . $ext;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n// debug(\"sql\",$sql);\n\t\t\t\t\t$ret=$this->query($sql);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}",
"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}",
"abstract public function GetValue($query);",
"function get_data()\n\t{\n\t\t$query = $this->db->get(\"Testing\");\n\n\t\treturn $query;\n\t}",
"public function __construct($obj = null)\n {\n if( !is_null($obj) && $obj instanceof Zend_Db_Table_Row ) {\n $this->id = $obj->ID;\n $this->code = $obj->CODE;\n $this->purpose_of_visit = $obj->PURPOSE_OF_VISIT;\n $this->visa_type_id = $obj->VISA_TYPE_ID;\n $this->processing_time_type_id = $obj->PROCESSING_TIME_TYPE_ID;\n $this->visa_letter = $obj->VISA_LETTER;\n $this->number_of_visa = $obj->NUMBER_OF_VISA;\n $this->price_detail = $obj->PRICE_DETAIL;\n $this->total_price = $obj->TOTAL_PRICE;\n $this->arrival_date = $obj->ARRIVAL_DATE;\n $this->arrival_airport = $obj->ARRIVAL_AIRPORT;\n $this->payment = $obj->PAYMENT;\n \n $this->contact_name = $obj->CONTACT_NAME;\n $this->contact_email = $obj->CONTACT_EMAIL;\n $this->contact_phone = $obj->CONTACT_PHONE;\n \n $this->status = $obj->STATUS;\n $this->trans_code = $obj->TRANS_CODE;\n $this->trans_number = $obj->TRANS_NUMBER;\n $this->onepay_link = $obj->ONEPAY_LINK;\n $this->create_date = $obj->CREATE_DATE;\n $this->update_date = $obj->UPDATE_DATE;\n }\n if(is_array($obj)){\n $this->id = $obj['ID'];\n $this->code = $obj['CODE'];\n $this->purpose_of_visit = $obj['PURPOSE_OF_VISIT'];\n $this->visa_type_id = $obj['VISA_TYPE_ID'];\n $this->processing_time_type_id = $obj['PROCESSING_TIME_TYPE_ID'];\n $this->visa_letter = $obj['VISA_LETTER'];\n $this->number_of_visa = $obj['NUMBER_OF_VISA'];\n $this->price_detail = $obj['PRICE_DETAIL'];\n $this->total_price = $obj['TOTAL_PRICE'];\n $this->arrival_date = $obj['ARRIVAL_DATE'];\n $this->arrival_airport = $obj['ARRIVAL_AIRPORT'];\n \n $this->contact_name = $obj['CONTACT_NAME'];\n $this->contact_email = $obj['CONTACT_EMAIL'];\n $this->contact_phone = $obj['CONTACT_PHONE'];\n \n $this->status = $obj['STATUS'];\n $this->trans_code = $obj['TRANS_CODE'];\n $this->trans_number = $obj['TRANS_NUMBER'];\n if(isset($obj['ONEPAY_LINK'])) $this->onepay_link = $obj['ONEPAY_LINK'];\n if(isset($obj['VISA_TYPE'])) $this->visa_type = $obj['VISA_TYPE'];\n if(isset($obj['PROCESSING_TIME_TYPE'])) $this->processing_time_type = $obj['PROCESSING_TIME_TYPE'];\n if(isset($obj['PAYMENT'])) $this->payment = $obj['PAYMENT'];\n if(isset($obj['CREATE_DATE'])) $this->create_date = $obj['CREATE_DATE'];\n if(isset($obj['UPDATE_DATE'])) $this->update_date = $obj['UPDATE_DATE'];\n }\n }",
"public function getObjectDataTable()\n\t{\n\t\treturn $this->table_obj_data;\n\t}",
"function getValue($table_name, $key_column_name, $key_value, $column_name)\n {\n\n }",
"function maxdb_fetch_object($result)\n{\n}",
"public function ormObject();",
"static function list($q=\"\",$f=\"\"){\n \t$query = \"select \n\t\t\t\t\tcloto_id.id,\n\t\t\t\t\tcloto_id.tipo,\n\t\t\t\t\tcloto_type.nome AS tipo_nome,\n\t\t\t\t\t\n\t\t\t\t\tif(cloto_id.tipo = '1',cloto_label.value,\n\t\t\t\t\t\tif(cloto_id.tipo = '2',cloto_number.value,\n\t\t\t\t\t\t\tif(cloto_id.tipo = '3',cloto_text.value,'[object]')\n\t\t\t\t\t\t)\n\t\t\t\t\t) as value\n\t\t\t\tfrom cloto_id\n\t\t\t\t\n\t\t\t\tleft join cloto_label on cloto_id.id = cloto_label.id\n\t\t\t\tleft join cloto_number on cloto_id.id = cloto_number.id\n\t\t\t\tleft join cloto_text on cloto_id.id = cloto_text.id\n\t\t\t\tleft join cloto_object on cloto_id.id = cloto_object.id\n\t\t\t\t\n\t\t\t\tINNER JOIN cloto_type ON cloto_id.tipo = cloto_type.id\n\t\t\t;\";\n \t$retorno = dbQuery($query);\n\n \treturn $retorno;\n\n }",
"public function getDBTValue(){ \n $query = \"SELECT * FROM tbl_payment WHERE id ='1'\"; // id = 1 for direct bank\n $result = $this->db->select($query);\n return $result;\n }",
"static function ObjectArray($class, $object = false, $condition = false)\n\t{\n\t\n\t\t//\t$class:\t \tThe name of the class we are making an array of\n\t\t//\t$object: \tIf false, each element of the array will be an array with the database values, otherwise each element will be an object\n\t\t//\t$condition:\tThis is what you want to come after the table name in the db select statement. e.g. \"where id>12\"\n\t\t$DBI = new DBInterface();\n\t\t$query = false;\n\t\t$val = false;\n\t\t$key = \"id\";\n\t\teval(\"\\$table_name = $class::DbTableName();\");\n\t\t$table_name = (strlen($table_name)>0)? $table_name : $class;\n\t\teval(\"\\$fields = $class::DbTableFields();\");\n\t\t$fields = $condition;\n\t\tif(is_array($fields))\n\t\t{\n\t\t\t$f = \"\";\n\t\t\tforeach($fields as $field)\n\t\t\t{\n\t\t\t\tif($f!=\"\")\n\t\t\t\t\t$f .= \",\";\n\t\t\t\t$f .= $table_name.\".\".$field;\n\t\t\t}\n\t\t} else {\n\t\t\t$f = '*';\n\t\t}\n\t\t$query = \"select $f from $table_name\";\n\t\tif($condition)\n\t\t\t$searchfields = \" \".$condition;\n\t\telse $searchfields = \"\";\n\t\t\n\t\t$obj = false;\n\t\t//echo \"OBJECT $class<br>$query$searchfields<br><br>\";\n\t\tif($object)\n\t\t{\n\t\t\t$val = $class;\n\t\t\t$obj = true;\n\t\t}\n\t\tif($query!==false) {\n\t\t\t$res = $DBI->DbSelect($query.$searchfields);\n\t\t\tif($res->Success())\n return $DBI->MakeArray($res, $key, $val, $obj);\n else {\n \t//print_r($res);\n \t//return $res->Message();\n return null;\n \n }\n\t\t} else {\n \treturn \"Query ($query) is false\";\n\t\t}\n\n\t}",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function __construct() { \n\t\t$this->Connection = new RDataConnection();\t// connection object\n\t\t$this->buildQuery = array(\n\t\t\t'query' \t=> array(),\n\t\t\t'select' \t=> array(),\n\t\t\t'where' \t=> array(),\n\t\t\t'insert' \t=> array(),\n\t\t\t'update' \t=> array(),\n\t\t\t'join' \t=> array(),\n\t\t\t'orderBy' \t=> array(),\n\t\t\t'limit'\t\t=> array(),\n\t\t\t'groupBy' \t=> array(),\n\t\t\t'having' \t=> array(),\n\t\t\t'from' \t=> array(),\n\t\t\t'delete' \t=> array()\n\t );\t\t\t\t\t\t\t \n\t\t$this->params = array();\t\n\t\t$this->types = array();\t\t\n\t\t$this->customQuery = array();\t\n\t\t$this->customParams = array();\t\n\t\t$this->customTypes = array();\t\n\t\t$this->addFoundRows = false;\t\n\t\t$this->queryType = self::SELECT;\n\t\tself::$inputIdx = 0;\n\t\t//$this->debug = (defined('DEV_MODE') && constant('DEV_MODE') === true); \n\t\t$this->debug = isDevMode(); \n\t\t\t\n\t\t// init connection\n\t\t//$this->Connection->Connect(CONNECTION_TYPE,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME,DATABASE_HOST,DATABASE_PORT);\n\t\t$this->Connection->Connect('mysql',DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME,DATABASE_HOST,DATABASE_PORT);\n\t}",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function getTable();",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"function getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\tif (!$table) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$db\t\t= JFactory::getDbo();\r\n\t\t$query\t= $db->getQuery(true);\r\n\t\t\r\n\t\t$query->select('a.id');\r\n\t\t//$query->select('a.'.$key.' ,a.'.$label.'');\r\n\t\tif (is_array($fields)) {\r\n\t\t\tforeach($fields as $field) {\r\n\t\t\t\t$query->select('a.'.$field);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query->from($table.' as a');\r\n\r\n\t\tif ( is_array($where) ) {\r\n\t\t\tforeach($where as $where_key => $where_item) {\r\n\t\t\t\t$query->where('a.'.$where_key.' = \"'.$where_item.'\"' );\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (is_array($order)) {\r\n\t\t\tforeach($order as $order_item) {\r\n\t\t\t\t$query->order('a.'.$order_item);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif ( is_int($limit_start) && is_int($limit_limit) ) { \r\n\t\t\t$db->setQuery((string)$query,$limit_start, $limit_limit);\r\n\t\t} else {\r\n\t\t\t$db->setQuery((string)$query);\r\n\t\t}\r\n\r\n\t\tif (!$db->query()) {\r\n\t\t\tJError::raiseError(500, $db->getErrorMsg());\r\n\t\t}\r\n\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db;\r\n\t}",
"public function select(){\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\t\t\t\r\n\t\t\tif (! isset ( $this->id )) { \r\n\t\t\t\techo \"Fatal Error: Id is not set for the object! Please do \\$objA->setId(\\$id); in: \" . __METHOD__;\r\n\t\t\t\texit ();\r\n\t\t\t}\r\n\r\n\t\t\t//count how many rows found\r\n\t\t\tif($this->exists ()) {\r\n\t\t\t\r\n\t\t\t\t$sql = \"SELECT * FROM $this->sqlTable WHERE lp_id = ?\";\r\n\t\r\n\t\t\t\t$stmt = $ks_db->query ( $sql, $this->id );\r\n\t\t\t\t\r\n\t\t\t\t//record is found, associate columns to the object properties\r\n\t\t\t\twhile ( true == ($row = $stmt->fetch ()) ) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->id = $row ['lp_id'];\r\n\t\t\t\t\t$this->userid = $row ['lp_userid'];\r\n\t\t\t\t\t$this->random = $row ['lp_random'];\r\n\t\t\t\t\t$this->deadline = $row ['lp_deadline'];\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\techo \"No record found with id ($this->id) from table ($this->sqlTable).\";\r\n\t\t\t}\t\r\n\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}",
"public function __construct($obj = null)\n {\n if( !is_null($obj) && $obj instanceof Zend_Db_Table_Row ) {\n $this->id = $obj->ID;\n $this->name = $obj->NAME;\n }\n \n if(is_array($obj)){\n //echo $obj['TOUR_TYPE_ID'];die;\n $this->id = $obj['ID'];\n if(isset($obj['name'])) $this->name = $obj['NAME'];\n }\n }",
"abstract protected function mapData($data, $tableObject);",
"private function _generateQuery() {\n\t\t// vyhodnoceni odeslanych filtracnich dat\n\t\t$filterObj = $this->getRequest()->getParam(\"_filter\", null);\n\t\t$uuid = $this->getRequest()->getParam(\"id\", null);\n\t\t$uuids = $this->getRequest()->getParam(\"_uuids\", null);\n\t\t\n\t\t// vyhodnoceni stavu\n\t\tif ($uuid) {\n\t\t\t// uuid byl odeslan primo v requestu\n\t\t\t$this->_queryObject = array($uuid);\n\t\t\t\n\t\t\treturn;\n\t\t} elseif ($uuids) {\n\t\t\t// byl odeslan seznam uuid\n\t\t\t$this->_queryObject = (array) $uuids;\n\t\t\t\n\t\t\treturn;\n\t\t} elseif (!$filterObj) {\n\t\t\t// zadna z moznosti nebyla vyuzita\n\t\t\t$this->_queryObject = array();\n\t\t}\n\t\t\n\t\t/**\n\t\t * pokud program dosel az sem, byl odeslan plnohodnotny filtracni objekt\n\t\t */ \n\t\t\n\t\t// reset referenci\n\t\tBB_Db_Query_Reference::clearTables();\n\t\t\n\t\t// vytvoreni filtracniho objektu a ziskani seznamu tabulek\n\t\t$queryObj = BB_Db_Query_Factory::factory($filterObj);\n\t\t$tableNames = BB_Db_Query_Reference::getTables();\n\t\t\n\t\t// vygenerovani seznamu pouzitych sloupcu z index\n\t\t$usedColumns = $this->getRequest()->getParam(\"_uuidColumns\", array());\n\t\t$usedColumns = (array) $usedColumns;\n\t\t\n\t\tif (!$usedColumns) {\n\t\t\t// seznam pouzitych sloupci je prazdny - toto neni pripustne\n\t\t\tthrow new Zend_Exception(\"UUID_COLUMNS_NOT_SET\", 400);\n\t\t}\n\t\t\n\t\t$usedReferences = array();\n\t\t\n\t\tforeach ($usedColumns as $column) {\n\t\t\t$reference = new BB_Db_Query_Reference($column);\n\t\t\t\n\t\t\t// kontrola jestli je tabulka v seznamu\n\t\t\tif (!in_array($reference->getTable(), $tableNames)) {\n\t\t\t\t// tabulka neni v seznamu, vyhodi se chyba\n\t\t\t\tthrow new Zend_Exception(\"UNKNOWN_INDEX_UUID_COLUMN\", 400);\n\t\t\t}\n\t\t\t\n\t\t\t$usedReferences[] = new BB_Db_Query_Reference($column);\n\t\t}\n\t\t\n\t\t// anulace statickych vlastnosti reference\n\t\tBB_Db_Query_Reference::clearTables();\n\t\t\n\t\t// vygenerovani infomraci pro filtraci dat\n\t\t$filterData = new stdClass;\n\t\t\n\t\t$filterData->columns = $usedReferences;\n\t\t$filterData->query = $queryObj;\n\t\t$filterData->tables = $tableNames;\n\t\t\n\t\t// nastaveni objektu\n\t\t$this->_queryObject = $filterData;\n\t\t\n\t\treturn $this;\n\t}",
"function db_fetch_object($qid) {\n\n\treturn mysqli_fetch_object($qid);\n}",
"function table()\n {\n return array('pattern' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL);\n }",
"public function fetchRow($q = '', $t = 'object')\r\n {\r\n return $this->fetch($this->query($q), $t);\r\n }",
"function get_table_data($table, $field, $key1 = null, $value1 = null, $key2 = null, $value2 = null)\n{\n global $connection;\n $results = $connection->query(\"SET NAMES utf8\");\n if (!$results) { print (\"error=\".$connection->get_error().\"<br>\"); return false; }\n if ($field == 'all') $field ='*';\n if (!$key1) $sql = \"SELECT $field FROM $table\";\n else if (!$key2) $sql = \"SELECT $field FROM $table WHERE $key1=$value1\";\n else $sql = \"SELECT $field FROM $table WHERE $key1=$value1 AND $key2=$value2\";\n //_dbg($sql);\n $results = $connection->query($sql);\n if (!$results) {\n print (\"error=\".$connection->get_error().\"<br>\");\n return false;\n }\n //_dbg($results);\n return $results;\n}",
"function yy_r113(){\n $this->_retvalue = new SQL\\Table($this->yystack[$this->yyidx + -4]->minor, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor);\n }",
"function simpandata($table,$data){\n\t\treturn $this->db->insert($table,$data);\n\t}"
] | [
"0.61773235",
"0.61346346",
"0.6022659",
"0.58992887",
"0.58486164",
"0.58401656",
"0.58184034",
"0.5818092",
"0.5797533",
"0.5787485",
"0.57364666",
"0.57317257",
"0.5715858",
"0.56953174",
"0.56577474",
"0.5655057",
"0.5655057",
"0.5655057",
"0.564691",
"0.56062585",
"0.5592252",
"0.55798817",
"0.5541491",
"0.5535745",
"0.55179006",
"0.55156446",
"0.55035794",
"0.5477983",
"0.54768085",
"0.54589593",
"0.5450551",
"0.54492354",
"0.54468584",
"0.5442468",
"0.54416674",
"0.5440242",
"0.54391223",
"0.542675",
"0.54224735",
"0.5418149",
"0.5408565",
"0.54034984",
"0.5399417",
"0.5397687",
"0.53903496",
"0.5379305",
"0.53759205",
"0.5372185",
"0.5371126",
"0.53638583",
"0.535911",
"0.53586197",
"0.5355689",
"0.5355157",
"0.53515404",
"0.5342716",
"0.5342294",
"0.5341312",
"0.533995",
"0.53364927",
"0.5332404",
"0.53308797",
"0.5325749",
"0.5325075",
"0.53200847",
"0.5308853",
"0.53067356",
"0.53062236",
"0.5306022",
"0.5306022",
"0.5306022",
"0.5306022",
"0.5306022",
"0.5306022",
"0.5306022",
"0.5306022",
"0.5306022",
"0.529922",
"0.52975714",
"0.52975714",
"0.52975714",
"0.52975714",
"0.52975714",
"0.52975714",
"0.52975714",
"0.52963877",
"0.5293781",
"0.5293781",
"0.5293781",
"0.5291786",
"0.5280906",
"0.528013",
"0.52792525",
"0.52783394",
"0.5275377",
"0.52449036",
"0.5243226",
"0.52363193",
"0.5232683",
"0.5232239"
] | 0.5822777 | 6 |
Create token password reset | public function request(RequestPasswordReset $request)
{
$user = User::where('email', $request->validated())->first();
if (!$user) return response()->error('Email tidak ditemukan', StatusCode::UNPROCESSABLE_ENTITY);
$resetPassword = PasswordReset::updateOrCreate(
['email' => $user->email],
[
'email' => $user->email,
'token' => \Str::random(60)
]
);
if ($user && $resetPassword)
$user->notify(
new PasswordResetRequest($resetPassword->token)
);
return response()->successWithMessage('Email telah dikirim untuk mengatur ulang kata sandi Anda.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generatePasswordResetToken()\n {\n $this->password = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->reset_token = \"P\" . Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->pwd_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $security = new Security();\n $this->password_reset_token = $security->generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString();\n }",
"public function generatePasswordResetToken()\n\t{\n\t\t$this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n\t}",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\r\n }",
"public function generatePasswordResetToken(): void\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\r\n }",
"public function generatePasswordResetToken() {\n\t\t$this->txt_password_reset_token = Yii::$app->security->generateRandomString () . '_' . time ();\n\t}",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->passwordResetToken = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = (new Security)->generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken(){\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = UsniAdaptor::app()->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::instance()->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->employer_password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePwdResetToken(PasswordResetForm $form);",
"private function generateResetPasswordToken()\n {\n $passwordReset = PasswordReset::create([\n 'user_id' => $this->id,\n 'token' => Str::random(150) . $this->id . time(),\n 'expires' => Carbon::now()->addDays(30)->format('Y-m-d H:i:s')\n ]);\n\n return $passwordReset;\n }",
"public function generateEmailResetToken()\n {\n $this->reset_token = \"E\" . Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function resetToken() {\n $token = $this->generateSecureToken(8);\n\n // Check if that there isn't already a Password Reset with the same token\n while(PasswordReset::where('token', $token)->count() != 0) {\n // If there is already a Password Reset with the same token, generate a new one and check again\n $token = $this->generateSecureToken(8);\n }\n\n return $token;\n }",
"public function createResetToken()\n {\n $duration=1440; //minutes\n\n $userTokenKey = 'user:'. $this->id.':reset:token';\n\n $resetToken = str_random(50);\n\n $tokenKeyUser = 'reset:token:'.$resetToken.':user';\n\n cache()->put($userTokenKey,[\n 'reset_token'=>$resetToken,\n 'remember_token'=>$this->remember_token,\n ],$duration);\n\n cache()->put($tokenKeyUser,$this->id,$duration);\n\n return $this;\n\n }",
"public function testCreatePasswordRecoveryToken()\n {\n }",
"function createPasswordToken($email) {\r\n $this->db->beginTransaction();\r\n $sql = $this->db->prepare(\"SELECT UserID FROM USER WHERE email=:email_address\");\r\n $sql->execute(array('email_address' => $email));\r\n $userId = $sql->fetch(PDO::FETCH_ASSOC)['UserID'];\r\n if($userId) {\r\n $sql = $this->db->prepare(\"SELECT token, expiry FROM RESET_TOKEN\");\r\n $sql->execute();\r\n $existingTokens = $sql->fetchAll(PDO::FETCH_ASSOC);\r\n $token = '';\r\n do {\r\n for($i = 0; $i < 16; $i++) {\r\n $token .= mt_rand(0, 9);\r\n }\r\n } while(in_array($token, $existingTokens['token']));\r\n // Delete any existing tokens that have expired\r\n $sql = $this->db->prepare(\"DELETE FROM RESET_TOKENS WHERE expiry < NOW()\");\r\n $sql->execute();\r\n // New tokens are valid for one hour\r\n $sql = $this->db->prepare(\"INSERT INTO RESET_TOKENS (UserID, token, expiry) VALUES (:user_id, :token, DATE_ADD(NOW(), INTERVAL 1 HOUR))\");\r\n $sql->execute(array(\r\n 'user_id' => $userId,\r\n 'token' => $token\r\n ));\r\n $this->db->commit();\r\n return $token;\r\n }\r\n $this->db->rollBack();\r\n return false;\r\n }",
"public function regenerateToken();",
"public function resetNewPassword() {\r\n try {\r\n $post = $this->request->all();\r\n $token = $post['resetToken'];\r\n if ($data = $this->admin->checkPasswordToken($token)) {\r\n $email = $data->email;\r\n $user_id = $data->user_id;\r\n $secret = Hash::make($post['new_password']);\r\n $update = array(\r\n 'password' => $secret,\r\n );\r\n if ($this->user->update($update, $email, 'email')) {\r\n $where = array(\r\n 'email' => $email,\r\n 'user_id' => $user_id,\r\n );\r\n $this->admin->deleteResetPassToken($where);\r\n $arrResponse['http_status'] = Config::get('constants.HTTP_OK');\r\n $arrResponse['message'] = Lang::get('global.passwordSuccess');\r\n } else {\r\n $arrResponse['http_status'] = Config::get('constants.DB_ERROR');\r\n $arrResponse['message'] = Lang::get('global.somethingWentWrong');\r\n }\r\n } else {\r\n $arrResponse['http_status'] = Config::get('constants.DATA_NOT_MATCH');\r\n $arrResponse['message'] = Lang::get('global.passwordLinkExpire');\r\n }\r\n } catch (Exception $e) {\r\n throw new Exception(Lang::get('global.somethingWentWrong'), $e->getCode());\r\n }\r\n return response()->json($arrResponse, 200);\r\n }",
"public function reset_password_post($token)\n {\n\n $data = $this->validate(request(), [\n 'email' => 'required',\n 'password' => 'required',\n ]);\n\n $check_token = DB::table('password_resets')->where('token', $token)->where('created_at', '>', Carbon::now()->subHours(2))->first();\n if(!empty($check_token)){\n $admin = User::where('email', $check_token->email)->update([\n 'email' => $check_token->email,\n 'password' => bcrypt(request('password'))\n ]);\n DB::table('password_resets')->where('email', $check_token->email)->delete();\n Auth()->guard('web')->attempt(['email' => $check_token->email, 'password'=> request('password')], true);\n return redirect('/');\n }else{\n return redirect('en/admin/login');\n }\n\n }",
"protected function fakeResetTokenAdmin()\n {\n $this->token = Password::getRepository()->create($this->admin);\n }",
"public function generateToken()\n\t{\n\t\tif( empty( $this->myAccountID ) )\n\t\t\tthrow PasswordResetException::toss( $this, 'NO_ACCOUNT_ID' ) ;\n\t\tif( empty( $this->myAuthID ) )\n\t\t\tthrow PasswordResetException::toss( $this, 'NO_AUTH_ID' ) ;\n\t\t$this->myNewToken = AuthDB::generatePrefixedAuthToken( static::TOKEN_PREFIX ) ;\n\t\t$theSql = SqlBuilder::withModel($this->model)\n\t\t\t->startWith( 'INSERT INTO ' )->add( $this->model->tnAuthTokens )\n\t\t\t->add( 'SET ' )\n\t\t\t->mustAddParam('created_by', $_SERVER['REMOTE_ADDR'])\n\t\t\t->setParamPrefix( ', ' )\n\t\t\t->mustAddParam('created_ts', $this->model->utc_now())\n\t\t\t->mustAddParam( 'auth_id', $this->myAuthID )\n\t\t\t->mustAddParam( 'account_id', $this->myAccountID )\n\t\t\t->mustAddParam( 'token', $this->myNewToken )\n\t\t\t//->logSqlDebug(__METHOD__) //DEBUG\n\t\t\t;\n\t\ttry\n\t\t{\n\t\t\t//execDML() on parameterized queries ALWAYS returns true,\n\t\t\t// exceptions are the only means of detecting failure here.\n\t\t\t$theSql->execDML() ;\n\t\t\treturn $this ;\n\t\t}\n\t\tcatch( PDOException $pdoe )\n\t\t{\n\t\t\t$this->myNewToken = null ;\n\t\t\tthrow PasswordResetException::toss( $this, 'TOKEN_GENERATION_FAILED' ) ;\n\t\t}\n\t}",
"public function forgotPassword()\n {\n $email = $this->input->post('email');\n $token = bin2hex(random_bytes(25));\n\n $user_id = $this->authentication_helper->checkEmail($email);\n\n if (isset($user_id) && !empty($user_id)) \n {\n $status = $this->authentication_worker->createToken($token, $user_id);\n if ($status) {\n $to_email = $email;\n $subject = \"Redefina sua senha\";\n $url = site_url('authentication/resetNewPassword' . \"?token=\" . $token);\n $message = \"Redefina sua senha da ZZjober clicando no link<br/><a href='\" . $url. \"'>\".$url.\"</a>\";\n $this->sendMail($to_email, $subject, $message);\n $this->session->set_flashdata('success_msg', 'Verifique seu e-mail para redefinir sua nova senha através do link');\n redirect('home/Entrar');\n }\n } else {\n $this->session->set_flashdata('error_msg', 'E-mail não encontrado');\n redirect('home/Entrar');\n }\n\n }",
"public function emailConfirmationToken() {\n \n $token = $this->generateSecureToken(15);\n // Check if that there isn't already a Password Reset with the same token\n while(User::where('email_confirmation_token', $token)->count() != 0) {\n // If there is already a Password Reset with the same token, generate a new one and check again\n $token = $this->generateSecureToken(15);\n }\n\n $this->email_confirmation_token = $token;\n \n return $token;\n }",
"public function reset_password(){\n \n //validate the $_GET variable\n $_GET=filter_var_array($_GET,FILTER_SANITIZE_STRING);\n\n if(!isset($_GET[\"selector\"]) || !isset($_GET[\"validator\"])){\n\n header(\"Location:{$this->config->domain()}\");\n die(); \n }\n\n //store the selector $_GET variable\n $token_selector=(isset($_GET[\"selector\"])) ? $_GET[\"selector\"] : \"\";\n \n //conver the the validator to the random_bytes\n $url_token_validator=(isset($_GET[\"validator\"])) ? hex2bin($_GET[\"validator\"]) : \"\";\n \n //store all information related to the token\n $token_info=array();\n \n //store the token model's object\n $token_obj=$this->model_objs[\"token_obj\"];\n \n //fetch E-mail validation token using $token_selector\n $fetch_token=$token_obj->select(array(\n \"column_name\"=>\"\n tokens.token_validator,\n tokens.token_expires,\n tokens.user_id\n \",\n \"where\"=>\"tokens.token_usage='password_reset' AND tokens.token_selector='{$token_selector}'\"\n ));\n \n if($fetch_token[\"status\"] == 1 && $fetch_token[\"num_rows\"] == 1){\n \n $token_info=$fetch_token[\"fetch_all\"][0];\n\n }else{\n \n echo \"<h2>The URL is no longer available</h2>\";\n\n die();\n }\n \n\n if(!empty($token_info)){\n \n //set the timezone to Asia/Dhaka\n date_default_timezone_set(\"Asia/Dhaka\");\n \n //store the current time stamp\n $current_time=date(\"U\");\n \n //store the difference between the current time and token expire time\n $time_diff=$token_info[\"token_expires\"] - $current_time;\n \n //check if time difference reaches 0 or less than \n if($time_diff <= 0){\n\n echo \"The link has already been expired\";\n\n die();\n }\n\n //now match $url_token_validator and $db_token_validator\n if(password_verify($url_token_validator,$token_info[\"token_validator\"])){\n \n /**\n * update the user_email_status \n * and user_account_status \n */\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Reset Password\";\n\n $this->view(\"accounts/reset_password\",$this->data);\n\n }else{\n\n $this->data[\"title_tag\"]=\"Lobster | Invalid URL\";\n\n echo \"<h2>Invalid URL</h2>\";\n }\n\n \n }\n\n \n \n\n \n \n }",
"public function resetAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $max_token_age = $this->container->getParameter(\"fom_user.max_reset_time\");\n if (!$this->checkTimeInterval($user->getResetTime(), $max_token_age)) {\n $form = $this->createForm('form');\n return $this->render('FOMUserBundle:Login:error-tokenexpired.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView()\n ));\n }\n\n $form = $this->createForm(new UserResetPassType(), $user);\n return array(\n 'user' => $user,\n 'form' => $form->createView());\n }",
"function resetPassword($token, $password) {\r\n $sql = $this->db->prepare(\"SELECT UserID FROM RESET_TOKENS WHERE token=:token AND expiry > NOW()\");\r\n $sql->execute(array('token' => $token));\r\n $userId = $sql->fetch(PDO::FETCH_ASSOC)['UserID'];\r\n if ($userId) {\r\n\r\n $options = [\r\n 'cost' => 11,\r\n 'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),\r\n ];\r\n $passwordHashed = password_hash($password, PASSWORD_DEFAULT, $options);\r\n\r\n $sql = $this->db->prepare(\"UPDATE USER SET password=:new_password WHERE UserID=:user_id\");\r\n $sql->execute(array(\r\n 'new_password' => $passwordHashed,\r\n 'user_id' => $userId,\r\n ));\r\n $sql = $this->db->prepare(\"DELETE FROM RESET_TOKENS WHERE token=:token\");\r\n $sql->execute(array('token' => $token));\r\n return 'success';\r\n }\r\n return 'invalid';\r\n }",
"public function resetPassword();",
"public function resetPassGenToken($email) {\r\n\t\t$resetUrl = NULL;\r\n\r\n\t\tif ($this->searchUser($email) == TRUE) {\r\n\r\n\t\t\t$Util = new EnvUtilities();\r\n\t\t\t$token = $this->createToken($Util->RandomString(15));\r\n\t\t\t$ucId = NULL;\r\n\t\t\t//TODO: Should be in config file rather than hard coded\r\n\t\t\t$resetUrl = \"http://\" . $_SERVER['SERVER_NAME'] . \"/auth/forgotPassword.php?e=\" . urlencode($email) . \"&t=\" . urlencode($token);\r\n\r\n\t\t\t//do we even have a user account for this person\r\n\t\t\t$_loadUser = $this->loadUser($email);\r\n\t\t\tif (isset($_loadUser)) {\r\n\t\t\t\t$this->ucId = $_loadUser['uc_id'];\r\n\t\t\t\t$this->fname = $_loadUser['first'];\r\n\t\t\t\t$this->lname = $_loadUser['last'];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new MyException('User account not in system. Try another email or username.');\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\r\n\t\t\t//prep the DB query to insert a token\r\n\t\t\t$queryDelete = \"DELETE FROM tkn_password_reset WHERE uc_id='{$this->ucId}';\";\r\n\t\t\t$query = \"INSERT INTO tkn_password_reset (uc_id, token) VALUES ('$this->ucId', '{$token}');\";\r\n\r\n\t\t\ttry {\r\n\t\t\t\t$sqlObj = new DataBase();\r\n\t\t\t\t$sqlObj->DoQuery($queryDelete);\r\n\t\t\t\ttime_nanosleep(0, 500000000); //let's make sure delete of old records is done\r\n\t\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t\t$sqlObj->destroy();\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$this->sendResetEmail($email, $resetUrl);\r\n\t\t\t\t} catch (MyException $e) {\r\n\t\t\t\t\tthrow new MyException($e->getMessage());\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn TRUE;\r\n\t\t\t} catch (MyException $e) {\r\n\t\t\t\tthrow new MyException('Not able to reset password. Please try again.' . $e->getMessage());\r\n\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new MyException('User profile not found.');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"public function createToken();",
"public function createToken($email){\n\n $isToken = DB::table('password_resets')->where('email', $email)->first();\n\n if($isToken) {\n return $isToken->token;\n }\n $user = User::where('email','=',$email)->first();\n $userRole = $user->roles()->first();\n if ($userRole) {\n $this->scope = $userRole->title;\n }\n $tokenResult = $user->createToken($user->email.'-' .now(), [$this->scope]);\n $this->saveToken($tokenResult->accessToken, $email);\n return $tokenResult->accessToken;\n }",
"public function generateResetPassword()\n {\n $this->setRules([ StringLiterals::EMAIL => 'required|max:100|email' ]);\n $this->_validate();\n $this->_customer = $this->_customer->where('email', $this->request->email)->first();\n if (isset($this->_customer) && is_object($this->_customer) && ! empty($this->_customer->id)) {\n $this->_customer->access_otp_token = mt_rand();\n $this->_customer->save();\n $this->email = $this->email->fetchEmailTemplate('password_reset_otp');\n $this->email->content = str_replace([ '##USERNAME##','##OTP##' ], [ $this->_customer->name,$this->_customer->access_otp_token ], $this->email->content);\n $this->notification->email($this->_customer, $this->email->subject, $this->email->content);\n return true;\n }\n return false;\n }",
"public function recentlyCreatedToken(CanResetPassword $user);",
"function new_pwd_token() {\n $token = bin2hex(random_bytes(32));\n $_SESSION['new_pwd_token'] = $token;\n return $token;\n }",
"public function generateResetpasswordKey(){\n\t\t$this->resetpassword_key = $this->passwordGenerator();\n\t}",
"public function do_reset_password()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UserController@reset_password', array('token'=>$input['token']))\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }",
"public function resetPassword()\n {\n $result['error'] = false;\n $result['message'] = '';\n $this->setRules([ 'token' => 'required', StringLiterals::PASSWORD => 'required|min:6',//'password_confirmation' => 'required|same:password|min:6' \n ]);\n $this->_validate();\n $customerInfo = $this->_customer->where('forgot_password', $this->request->token)->first();\n if (!empty($customerInfo)) {\n $customerInfo->forgot_password = null;\n $customerInfo->password = Hash::make($this->request->password);\n $customerInfo->save();\n } else {\n $result['error'] = true;\n $result['message'] = trans('passwords.token');\n }\n return $result;\n }",
"public function createAdminToken();",
"public function postReset()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::to('user/login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::to('user/reset/'.$input['token'])\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }",
"public function tokenResetAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $this->setResetToken($user);\n\n return $this->redirect($this->generateUrl('fom_user_password_send'));\n }",
"public function forget_password_post()\n {\n $admin = User::where('email', request('email'))->first();\n if(!empty($admin))\n {\n $token = app('auth.password.broker')->createToken($admin);\n $data = DB::table('password_resets')->insert([\n 'email' => $admin->email,\n 'token' => $token,\n 'created_at' => Carbon::now()\n ]);\n\n Mail::to($admin->email)->send(new reset_password(['data' => $admin, 'token' => $token]));\n return back();\n }\n }",
"public function passwordAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $max_token_age = $this->container->getParameter(\"fom_user.max_reset_time\");\n if (!$this->checkTimeInterval($user->getResetTime(), $max_token_age)) {\n $form = $this->createForm('form');\n return $this->render('FOMUserBundle:Login:error-tokenexpired.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView()\n ));\n }\n\n $form = $this->createForm(new UserResetPassType(), $user);\n $form->bind($this->get('request'));\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $user->setResetToken(null);\n\n $helper = new UserHelper($this->container);\n $helper->setPassword($user, $user->getPassword());\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('fom_user_password_done'));\n }\n\n return array(\n 'user' => $user,\n 'form' => $form->createView());\n }",
"public function resetPasswordForm(string $token): void\n {\n /** Vérifie que le token contient bien le nombre de caractères attendu */\n if (strlen($token) !== 100)\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n }\n else\n {\n /** Créer une instance de Users défini le token passer en paramètre et rechercher un utilisateur avec ce token */\n $userInfo = (new Users())->setPasswordResetToken($token)->getUserByPasswordResetToken();\n\n /** L'utilisateur existe en base de données */\n if ($userInfo !== false)\n {\n /** Si la date d'expiration est dépasser */\n if ($userInfo->getPasswordResetExpire() < (new \\DateTime())->format('Y-m-d H:i:s'))\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation est expiré.');\n }\n /** Si le token donnée en paramètre et celui en base de données. */\n else if ($token === $userInfo->getPasswordResetToken())\n {\n $FV = new FormValidator($_POST);\n /** Vérifie que le formulaire est envoyé et que le token CSRF est valide. */\n if ($FV->checkFormIsSend('resetPasswordForm'))\n {\n /** Vérification des champs */\n $FV->verify('password')->isNotEmpty()->passwordConstraintRegex()\n ->passwordCorrespondTo('confirmPassword')->needReEntry();\n $FV->verify('confirmPassword')->needReEntry();\n\n /** Si le formulaire est valide */\n if ($FV->formIsValid())\n {\n /** On stock le mot de passe entrer par l'utilisateur dans l'objet */\n $userInfo->setPassword(password_hash($FV->getFieldValue('password'), PASSWORD_BCRYPT));\n /** Mettre à jour le mot de passe, si un problème survient on indique une erreur. */\n if ($userInfo->updateUserPasswordById())\n {\n FlashMessageService::addSuccessMessage('Mot de passe mis à jour avec succès, vous pouvez désormais vous connecté.');\n $this->redirect(\\AltoRouter::getRouterInstance()\n ->generate('login'));\n }\n else\n {\n FlashMessageService::addErrorMessage('Une erreur est survenue lors de la mise à jour de votre mot de passe, veuillez ressayer.');\n }\n }\n }\n }\n }\n else\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n }\n }\n $this->render('Authentification/ResetPasswordForm', 'Reinitialisation du mot de passe.');\n }",
"public function reset_password($token)\n {\n $check_token = DB::table('password_resets')->where('token', $token)->where('created_at', '>', Carbon::now()->subHours(2))->first();\n if(!empty($check_token)){\n return view('Admin.login.reset_password', ['data' => $check_token]);\n }else{\n return redirect('en/admin/forget_password');\n }\n\n }",
"public function create(TokenResetable $receiver, array $options = []);",
"public function sendResetPasswordLink(Request $request)\n\t{ \n\t\t$returnArr=config('constants.return_array');\n\t\t//$input=$request->all();\n\t\t$input=array_map('trim', $request->all());\n\t\ttry{\n\t\t\tDB::beginTransaction();\n\t\t\t$canProceed=0;\n\t\t\t$validationRules=[\n\t 'email' => 'required|email',\n\t ];\n\t $validator= \\Validator::make($input, $validationRules);\n\t if($validator->fails()){\n\t $returnArr['status']=3;\n\t $returnArr['content']=$validator->errors();\n\t $returnArr['message']=\"Validation failed\";\n\t return $returnArr;\n\t }\n\n\t $userData=$this->user->where('email', $input['email'])->first();\n\t if($userData == null){\n\t \t$userData=$this->admin->where('email', $input['email'])->first();\n\t \tif($userData == null)\n\t \t\t$canProceed=0;\n\t \telse\n\t \t\t$canProceed=1;\n\t }\n\t else\n\t \t$canProceed=1;\n\n\t if($canProceed == 1){\n\n\t \t$deleteExistingTokens=$this->resetPassword->where('email', $input['email'])->delete();\n\n\t \t$microTime=preg_replace('/(0)\\.(\\d+) (\\d+)/', '$3$1$2', microtime());\n\t\t $length=rand(20,30);\n\t\t $tokenPre = bin2hex(random_bytes($length));\n\t\t $token = $tokenPre.$microTime;\n\t\t $resetPasswordData['user_id']=isset($userData->id) ? $userData->id : NULL;\n\t\t $resetPasswordData['email']=$input['email'];\n\t\t $resetPasswordData['token']=$token;\n\t\t $resetPasswordData['ip_address']=$request->ip();\n\t\t $resetPasswordData['expire_at']=\\Carbon\\Carbon::now()->addMinutes(60);\n\t\t $resetPasswordData['created_at']=\\Carbon\\Carbon::now()->toDateTimeString();\n\t\t $createUserToken=$this->resetPassword->create($resetPasswordData); \n\n\t\t if($createUserToken){\n\t\t $passwordResetLink=\"https://www.alegralabs.com/mukesh/symcom/zurücksetzen-passwort.php?token=\".$token;\n\n\t\t $data['receiver_name']=$userData->full_name;\n\t\t $data['password_reset_link']=$passwordResetLink;\n\t\t $data['created_at']=$resetPasswordData['created_at'];\n\n\t\t Mail::send('emails.reset-password-mail', $data, function($message) use($userData) {\n\t\t \t$receiverEmail=trim($userData->email);\n\t\t\t\t\t $message->to($receiverEmail, $userData->full_name)\n\t\t\t\t\t ->subject('Symcom password reset link');\n\t\t\t\t\t $message->from('[email protected]','Symcom');\n\t\t\t\t\t});\n\n\t\t $returnArr['status']=2;\n\t\t $returnArr['content']=\"\";\n\t\t $returnArr['message']=\"Reset password link sent successfully.\";\n\n\t\t }else{\n\t\t $returnArr['status']=5;\n\t\t $returnArr['content']=\"\";\n\t\t $returnArr['message']=\"Operation failed, could not generate and send the reset password link.\";\n\t\t }\n\t }else{\n\t \t$returnArr['status']=4;\n\t\t $returnArr['content']=\"\";\n\t\t $returnArr['message']=\"No user found with the provided email\";\n\t }\n\n\t DB::commit();\n\t }\n catch(\\Exception $e){\n \tDB::rollback();\n \t$returnArr['status']=6;\n\t $returnArr['content']=$e;\n\t $returnArr['message']=\"Something went wrong\";\n }\n\n return $returnArr; \n\t}",
"public function forgot_password_post(Request $request)\n {\n\n $request->validate([ 'email' => 'required']);\n\n $admin = User::where('email', $request->email)->first();\n\n if(!empty($admin)){\n\n $token = app('auth.password.broker')->createToken($admin);\n\n $data = DB::table('password_resets')->insert([\n 'email' => $admin->email,\n 'token' => $token,\n 'created_at' => Carbon::now()\n ]);\n\n Mail::to($admin->email)->send(new UserResetPassword(['data' => $admin , 'token' => $token]));\n \n session()->flash('success', trans('admin.the_reset_link_sent_successfully'));\n\n return back();\n\n }\n\n session()->flash('error', trans('admin.invalid_email'));\n\n return back();\n\n }",
"public function doResetPassword()\r\n {\r\n $repo = App::make('UserRepository');\r\n $input = array(\r\n 'token' => Input::get('token'),\r\n 'password' => Input::get('password'),\r\n 'password_confirmation' => Input::get('password_confirmation'),\r\n );\r\n\r\n // By passing an array with the token, password and confirmation\r\n if ($repo->resetPassword($input)) {\r\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\r\n\r\n return Redirect::action('UserController@login')\r\n ->with('notice', $notice_msg);\r\n } else {\r\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\r\n\r\n return Redirect::action('UserController@resetPassword', array('token' => $input['token']))\r\n ->withInput()\r\n ->with('error', $error_msg);\r\n }\r\n }",
"protected function startPasswordReset()\n\t{\n\t\t$token = new Token();\n\t\t$hashed_token = $token->getHash();\n\t\t$this->password_reset_token = $token->getValue();\n\t\t\n\t\t$expiry_timestamp = time() + 60 * 60 * 2; // two hours from now\n\t\t\n\t\t$sql = 'UPDATE users SET password_reset_hash = :token_hash, password_reset_expires_at = :expires_at WHERE id = :id';\n\t\t\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':token_hash', $hashed_token, PDO::PARAM_STR);\n\t\t$stmt->bindValue(':expires_at', date('Y-m-d H:i:s', $expiry_timestamp) ,PDO::PARAM_STR );\n\t\t$stmt->bindValue(':id', $this->id, PDO::PARAM_INT);\n\t\t\n\t\treturn $stmt->execute();\n\t}",
"public function generateToken();",
"public function postResetPassword()\n\t{\n\t\t//check if valid token from the password_reminders table, if not show error message\n\t\t$rules = array(\t'password' =>$this->userService->getNewUserValidatorRule('password'),\n\t\t\t\t\t\t'password_confirmation'=>'Required|same:password');\n\t\t$token = Input::get('token');\n\t\t$v = Validator::make(Input::all(), $rules);\n\t\tif($v->passes())\n\t\t{\n\t\t\t$ret_msg = $this->userService->resetPassword(Input::all());\n\t\t\tif($ret_msg == '')\n\t\t\t{\n\t\t\t\treturn Redirect::to('user/login')->with('success_message', trans('auth/form.changepassword_success_message'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to('users/reset-password/'.$token)->withInput()->with('error', $ret_msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('user/reset-password/'.$token)->withInput()->withErrors($v);\n\t\t}\n\t}",
"public function resetPassword(Request $request)\n {\n $request->validate([\n 'rut' => 'required|string|max:10|cl_rut|exists:hr_employee,rut',\n 'password' => 'required|string|min:6',\n 'password_repeat' => 'required|string|min:6|same:password',\n 'token' => 'required',\n ]);\n\n $user = LoginService::getUser_ByRequest($request);\n if(! isset($user))\n return response()->json([\n 'message' => 'El email ingresado no se encuentra en la base de datos',\n 'http_status_code' => 404,\n 'status' => 'error',\n ], 404);\n \n $passwordReset = PasswordResets::where('email', $user->hrEmployee->email)->first();\n\n if(! isset($passwordReset) || \n ! Hash::check($request->token, $passwordReset->token) ||\n Carbon::parse($passwordReset->created_at)->addMinutes(config('auth.passwords.users.expire'))->isPast())\n {\n return response()->json([\n 'message' => 'El token enviado no es válido',\n 'http_status_code' => 404,\n 'status' => 'error',\n ], 404);\n } // end if\n\n // update pass\n $user->password = Hash::make($request->password);\n $user->save();\n\n // Create Token of actual user\n $tokenResult = $user->createToken('Personal Access Token');\n $token = $tokenResult->token; \n $token->expires_at = Carbon::now()->addDays(1);\n\n $token->save();\n\n // Delete token password reset\n $passwordReset->delete();\n\n return response()->json([\n 'status' => 'success',\n 'http_status_code' => 200,\n 'message' => 'Autorizado',\n 'user' => [\n 'nombre_completo' => $user->hrEmployee->getFullName(), \n 'email' => $user->email, \n 'roles' => $user->getRoleNames(),\n ],\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse($tokenResult->token->expires_at)->toDateTimeString()\n , 200]);\n\n }",
"public function postReset()\n {\n $credentials = Input::only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n $validator = Validator::make(\n array('email' => Input::get('email'), 'password' => Input::get('password'), 'password_confirm' => Input::get('password_confirm')),\n array('email' => 'required|unique:users,email|email', 'password' => 'required|min:4|max:20|same:password_confirm')\n );\n $response = Password::reset($credentials, function ($user, $password) {\n $user->password = Hash::make($password);\n $user->save();\n });\n\n switch ($response) {\n case Password::INVALID_TOKEN:\n return Redirect::to('password/forgot')->with('error', Lang::get($response));\n\n case Password::INVALID_PASSWORD:\n case Password::INVALID_USER:\n return Redirect::back()->with('error', Lang::get($response));\n\n case Password::PASSWORD_RESET:\n return Redirect::to('/login')->with('success', 'Password was successfully reset!<br> You make now Log in.');\n }\n }",
"public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }",
"public function postReset(Request $request)\n {\n // dd($request->all());\n\n $status = '';\n $this->validate($request, [\n 'token' => 'required',\n 'email' => 'required|email',\n 'password' => 'required|confirmed|min:6',\n ]);\n\n $credentials = $request->only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n $obj_admin = $this->AgentModel->where('email','=',$credentials['email'])->first();\n if($obj_admin)\n {\n $password = isset($credentials['password'])?Hash::make($credentials['password']):'';\n $status = $obj_admin->update(['password'=>$password]);\n }\n if($status)\n {\n $is_deleted_token = DB::table('admin_password_resets')->where('token','=',$credentials['token'])->delete();\n Session::flash('success', 'Password set successfully.');\n }\n else\n {\n Session::flash('error','Error occure while set a password.');\n }\n return redirect($this->module_url_path);\n }",
"public function passwordResetCode();",
"public function reset_password($token = NULL)\n {\n if(!$token) \n {\n $this->base->set_message('Password recovery token is missing.','danger');\n $this->index();\n } \n else \n {\n // add supplied token in session\n $this->session->set_userdata('token',$token);\n $data['page'] = 'user/reset_password';\n $this->load->view('index',$data);\n } \n }",
"public function generatePasswordResetToken(int $hours = null): Token\n {\n $token = app(Token::class)->generate(Token::TYPE_PASSWORD_RESET, $this, $hours);\n\n $this->notify(new PasswordReset);\n\n return $token;\n }",
"public function createUpdateToken()\n {\n $pdo = static::getDB();\n\n $token = bin2hex(random_bytes(24));\n\n $sql = \"UPDATE users SET token = :token, otp_last_date = TO_DATE(:otp_last_date, 'YYYY-MM-DD HH24:MI:SS') WHERE email = :email\";\n\n $result = $pdo->prepare($sql);\n\n $result->execute([\n ':email' => $this->email,\n ':token' => $token,\n ':otp_last_date' => Extra::getCurrentDateTime()\n ]);\n\n return $token;\n }",
"public function generate_recovery_mode_token()\n {\n }",
"public function reset(Request $request)\n {\n\n DB::beginTransaction();\n\n $this->validate($request, [\n 'token' => 'required',\n 'email' => 'required|email',\n 'password' => 'required|confirmed',\n ]);\n\n $credentials = $request->only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n\n // password_resets check \n $result = DB::select('\n select *\n from password_resets\n where email = ?\n ',[$request->input('email')]);\n\n // 성공 \n if(isset($result[0]->token) && $result[0]->token==$request->get('token')){\n \n // password 같으면 입력 \n DB::update(' \n update t_user \n set \n password = ?\n where email = ?\n ',[bcrypt($request->get('password')), $request->get('email')]);\n\n // token 삭제 \n DB::delete('\n delete from password_resets\n where email = ? \n ',[$request->input('email')]);\n\n DB::commit();\n return Response::json(['success'=>true]);\n\n }else{ // 변경실패 \n return Response::json(['success'=>false]);\n }\n }",
"function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }"
] | [
"0.80527616",
"0.79847896",
"0.79786503",
"0.7936979",
"0.7891862",
"0.7882117",
"0.787267",
"0.787267",
"0.787267",
"0.7861713",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78612155",
"0.78590727",
"0.7854209",
"0.78540945",
"0.7841655",
"0.78328687",
"0.7829642",
"0.7814258",
"0.7806007",
"0.7804034",
"0.7804034",
"0.7804034",
"0.78031796",
"0.7776559",
"0.7775468",
"0.77459705",
"0.76755047",
"0.76522285",
"0.74558413",
"0.7449553",
"0.7195677",
"0.7187402",
"0.7157481",
"0.71027774",
"0.7003853",
"0.699083",
"0.6960759",
"0.69213384",
"0.6777106",
"0.6776271",
"0.6774792",
"0.6747038",
"0.67282593",
"0.67273986",
"0.6703953",
"0.6703184",
"0.66630477",
"0.6642812",
"0.6631914",
"0.6619819",
"0.661274",
"0.6610756",
"0.66103184",
"0.6609932",
"0.6608224",
"0.66076905",
"0.6590656",
"0.65901744",
"0.65307575",
"0.6476879",
"0.6467278",
"0.6459791",
"0.6453072",
"0.6441315",
"0.6439247",
"0.64211184",
"0.642053",
"0.6417925",
"0.63657266",
"0.63542986",
"0.6346335",
"0.6344358",
"0.6344011",
"0.63315076",
"0.6327751",
"0.63251287",
"0.631296",
"0.62993"
] | 0.0 | -1 |
Find token password reset | public function find($token)
{
$resetPassword = PasswordReset::where('token', $token)->first();
if (!$resetPassword) return response()->error('Reset password token is invalid!');
if (Carbon::parse($resetPassword->updated_at)->addMinutes(720)->isPast()) {
$resetPassword->delete();
return response()->error('Reset password token is invalid!');
}
return response()->successWithKey($resetPassword, 'reset_password_token');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function resetToken() {\n $token = $this->generateSecureToken(8);\n\n // Check if that there isn't already a Password Reset with the same token\n while(PasswordReset::where('token', $token)->count() != 0) {\n // If there is already a Password Reset with the same token, generate a new one and check again\n $token = $this->generateSecureToken(8);\n }\n\n return $token;\n }",
"public function reset_password($token)\n {\n $check_token = DB::table('password_resets')->where('token', $token)->where('created_at', '>', Carbon::now()->subHours(2))->first();\n if(!empty($check_token)){\n return view('Admin.login.reset_password', ['data' => $check_token]);\n }else{\n return redirect('en/admin/forget_password');\n }\n\n }",
"public static function findByPasswordResetToken($token) {\n\t\t$expire = \\Yii::$app->params ['user.txt_passwordResetTokenExpire'];\n\t\t$parts = explode ( '_', $token );\n\t\t$timestamp = ( int ) end ( $parts );\n\t\tif ($timestamp + $expire < time ()) {\n\t\t\t// token expired\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn static::findOne ( [ \n\t\t\t\t'txt_password_reset_token' => $token \n\t\t] );\n\t}",
"public function reset_password(){\n \n //validate the $_GET variable\n $_GET=filter_var_array($_GET,FILTER_SANITIZE_STRING);\n\n if(!isset($_GET[\"selector\"]) || !isset($_GET[\"validator\"])){\n\n header(\"Location:{$this->config->domain()}\");\n die(); \n }\n\n //store the selector $_GET variable\n $token_selector=(isset($_GET[\"selector\"])) ? $_GET[\"selector\"] : \"\";\n \n //conver the the validator to the random_bytes\n $url_token_validator=(isset($_GET[\"validator\"])) ? hex2bin($_GET[\"validator\"]) : \"\";\n \n //store all information related to the token\n $token_info=array();\n \n //store the token model's object\n $token_obj=$this->model_objs[\"token_obj\"];\n \n //fetch E-mail validation token using $token_selector\n $fetch_token=$token_obj->select(array(\n \"column_name\"=>\"\n tokens.token_validator,\n tokens.token_expires,\n tokens.user_id\n \",\n \"where\"=>\"tokens.token_usage='password_reset' AND tokens.token_selector='{$token_selector}'\"\n ));\n \n if($fetch_token[\"status\"] == 1 && $fetch_token[\"num_rows\"] == 1){\n \n $token_info=$fetch_token[\"fetch_all\"][0];\n\n }else{\n \n echo \"<h2>The URL is no longer available</h2>\";\n\n die();\n }\n \n\n if(!empty($token_info)){\n \n //set the timezone to Asia/Dhaka\n date_default_timezone_set(\"Asia/Dhaka\");\n \n //store the current time stamp\n $current_time=date(\"U\");\n \n //store the difference between the current time and token expire time\n $time_diff=$token_info[\"token_expires\"] - $current_time;\n \n //check if time difference reaches 0 or less than \n if($time_diff <= 0){\n\n echo \"The link has already been expired\";\n\n die();\n }\n\n //now match $url_token_validator and $db_token_validator\n if(password_verify($url_token_validator,$token_info[\"token_validator\"])){\n \n /**\n * update the user_email_status \n * and user_account_status \n */\n\n $this->data[\"title_tag\"]=\"Lobster | Accounts | Reset Password\";\n\n $this->view(\"accounts/reset_password\",$this->data);\n\n }else{\n\n $this->data[\"title_tag\"]=\"Lobster | Invalid URL\";\n\n echo \"<h2>Invalid URL</h2>\";\n }\n\n \n }\n\n \n \n\n \n \n }",
"public function find($token)\n {\n // $resetPassword = ResetPassword::where('token', $token)->first();\n\n // if (!$resetPassword){\n // response()->json([\n // 'errors' => [ 'message' => ['This password reset token is invalid.'] ]\n // ], 404);\n // $user = ResetPassword::where('token', $token)->first();\n // return redirect('change-password/INVALID_TOKEN');\n // }\n // if ($resetPassword->updated_at) {\n // $resetPassword->delete();\n // return response()->json([\n // 'errors' => [ 'message' => ['This password reset token is invalid.'] ]\n // ], 404);\n // return redirect('change-password/INVALID_TOKEN');\n // }\n return redirect('reset-password/'.$token);\n }",
"public static function findByPasswordReset($token){\n\t\t$token = new Token($token);\n\t\t//get hashed token\n\t\t$hashed_token = $token->getHash();\n\t\t//check if token hash exists in the database\n\t\t$sql = 'SELECT * FROM users WHERE password_reset_hash = :token_hash';\n\t\t\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':token_hash', $hashed_token, PDO::PARAM_STR);\n\t\t$stmt->setFetchMode(PDO::FETCH_CLASS, get_called_class());\n\t\t\n\t\t$stmt->execute();\n\t\t$user = $stmt->fetch();\n\t\t\n\t\tif($user){\n\t\t\t//check password reset token hasn't expired\n\t\t\tif(strtotime($user->password_reset_expires_at)>time()){\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t}\n\t}",
"function findByEmailAndResetPasswordToken($email, $token);",
"public function reset_password_post($token)\n {\n\n $data = $this->validate(request(), [\n 'email' => 'required',\n 'password' => 'required',\n ]);\n\n $check_token = DB::table('password_resets')->where('token', $token)->where('created_at', '>', Carbon::now()->subHours(2))->first();\n if(!empty($check_token)){\n $admin = User::where('email', $check_token->email)->update([\n 'email' => $check_token->email,\n 'password' => bcrypt(request('password'))\n ]);\n DB::table('password_resets')->where('email', $check_token->email)->delete();\n Auth()->guard('web')->attempt(['email' => $check_token->email, 'password'=> request('password')], true);\n return redirect('/');\n }else{\n return redirect('en/admin/login');\n }\n\n }",
"public function ResetAdminTokenValidation($token){\n return DB::table('password_resets')\n ->where('token',$token)\n ->where('created_at','>',Carbon::now()->subHour(2))\n ->first();\n }",
"public static function findByPasswordResetToken($token)\r\n {\r\n $expire = 7200;// Yii::$app->params['user.passwordResetTokenExpire'];\r\n $parts = explode('_', $token);\r\n $timestamp = (int) end($parts);\r\n\r\n if ($timestamp + $expire < time()) {\r\n // token expired\r\n return null;\r\n }\r\n\r\n return static::findOne([\r\n 'password_reset_token' => $token,\r\n 'status' => self::STATUS_ACTIVE,\r\n ]);\r\n }",
"public function emailConfirmationToken() {\n \n $token = $this->generateSecureToken(15);\n // Check if that there isn't already a Password Reset with the same token\n while(User::where('email_confirmation_token', $token)->count() != 0) {\n // If there is already a Password Reset with the same token, generate a new one and check again\n $token = $this->generateSecureToken(15);\n }\n\n $this->email_confirmation_token = $token;\n \n return $token;\n }",
"function resetPassword($token, $password) {\r\n $sql = $this->db->prepare(\"SELECT UserID FROM RESET_TOKENS WHERE token=:token AND expiry > NOW()\");\r\n $sql->execute(array('token' => $token));\r\n $userId = $sql->fetch(PDO::FETCH_ASSOC)['UserID'];\r\n if ($userId) {\r\n\r\n $options = [\r\n 'cost' => 11,\r\n 'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),\r\n ];\r\n $passwordHashed = password_hash($password, PASSWORD_DEFAULT, $options);\r\n\r\n $sql = $this->db->prepare(\"UPDATE USER SET password=:new_password WHERE UserID=:user_id\");\r\n $sql->execute(array(\r\n 'new_password' => $passwordHashed,\r\n 'user_id' => $userId,\r\n ));\r\n $sql = $this->db->prepare(\"DELETE FROM RESET_TOKENS WHERE token=:token\");\r\n $sql->execute(array('token' => $token));\r\n return 'success';\r\n }\r\n return 'invalid';\r\n }",
"public function getResetPasswordToken()\n {\n return $this->resetPasswordToken;\n }",
"public function verifyResetPassword()\n {\n $result['error'] = false;\n $result['message'] = '';\n $this->setRules([ 'token' => 'required']);\n $this->_validate();\n $customerInfo = $this->_customer->where('forgot_password', $this->request->token)->first();\n if (empty($customerInfo)) {\n $result['error'] = true;\n $result['message'] = trans('passwords.token_expired');\n }\n return $result;\n }",
"public function generatePwdResetToken(PasswordResetForm $form);",
"public function resetPasword($token)\n {\n $email = $this->userRepo->findToken($token);\n if ($token) {\n $deleteToken = $this->userRepo->deleteToken($token);\n if ($deleteToken) {\n return view('backend.form_reset',compact('email'));\n }else {\n echo \"token has been delete\";\n }\n }\n }",
"public function passwordResetCode();",
"public function getResetPassword($token)\n\t{\n\t\t$is_valid = $this->userService->isValidPasswordToken($token);\n\t\tif($is_valid)\n\t\t{\n\t\t\treturn View::make('auth/changePassword')->with('token', $token);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn View::make('auth/changePassword')->with('token', $token)->with('error', trans('auth/form.change_password.invalid_token'));\n\t\t}\n\t}",
"public function getPasswordResetToken(): Token\n {\n return $this->tokens()->where('type', Token::TYPE_PASSWORD_RESET)->first();\n }",
"public static function showPasswordResetForm($token){\n try{\n $tokenData = Password_Resets::where('token', $token)->first();\n if ( !$tokenData ){ \n if($isMobile == 1){\n session()->flash('error', trans('messages.InvalidResetPassword'));\n return redirect()->route('admin.verification');\n }else{\n session()->flash('error', trans('messages.InvalidResetPassword'));\n return redirect()->to('/admin/login');\n }\n }\n return view('admin.auth.reset',array('token'=>$token));\n }catch(\\Exception $e){ \n session()->flash('error',$e->getMessage());\n return redirect()->route('resetpasswordform');\n } \n }",
"public function reset_password($token)\n {\n\n //echo '<pre>'; print_r($token); die('here');\n $data = User::where('mail_token', $token)->first();\n if(empty($data)){\n echo \"Page Expired.\";die;\n }else{\n return view('reset_password')->with('data', $data);\n }\n \n\n }",
"public function resetPassGenToken($email) {\r\n\t\t$resetUrl = NULL;\r\n\r\n\t\tif ($this->searchUser($email) == TRUE) {\r\n\r\n\t\t\t$Util = new EnvUtilities();\r\n\t\t\t$token = $this->createToken($Util->RandomString(15));\r\n\t\t\t$ucId = NULL;\r\n\t\t\t//TODO: Should be in config file rather than hard coded\r\n\t\t\t$resetUrl = \"http://\" . $_SERVER['SERVER_NAME'] . \"/auth/forgotPassword.php?e=\" . urlencode($email) . \"&t=\" . urlencode($token);\r\n\r\n\t\t\t//do we even have a user account for this person\r\n\t\t\t$_loadUser = $this->loadUser($email);\r\n\t\t\tif (isset($_loadUser)) {\r\n\t\t\t\t$this->ucId = $_loadUser['uc_id'];\r\n\t\t\t\t$this->fname = $_loadUser['first'];\r\n\t\t\t\t$this->lname = $_loadUser['last'];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new MyException('User account not in system. Try another email or username.');\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\r\n\t\t\t//prep the DB query to insert a token\r\n\t\t\t$queryDelete = \"DELETE FROM tkn_password_reset WHERE uc_id='{$this->ucId}';\";\r\n\t\t\t$query = \"INSERT INTO tkn_password_reset (uc_id, token) VALUES ('$this->ucId', '{$token}');\";\r\n\r\n\t\t\ttry {\r\n\t\t\t\t$sqlObj = new DataBase();\r\n\t\t\t\t$sqlObj->DoQuery($queryDelete);\r\n\t\t\t\ttime_nanosleep(0, 500000000); //let's make sure delete of old records is done\r\n\t\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t\t$sqlObj->destroy();\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$this->sendResetEmail($email, $resetUrl);\r\n\t\t\t\t} catch (MyException $e) {\r\n\t\t\t\t\tthrow new MyException($e->getMessage());\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn TRUE;\r\n\t\t\t} catch (MyException $e) {\r\n\t\t\t\tthrow new MyException('Not able to reset password. Please try again.' . $e->getMessage());\r\n\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new MyException('User profile not found.');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"public function tokenResetAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $this->setResetToken($user);\n\n return $this->redirect($this->generateUrl('fom_user_password_send'));\n }",
"public function showResetPasswordForm($token, $id)\n { \n \n $user = Users::find([\n 'token = :token: AND forgetpass = :forgetpass: AND id = :id: ',\n 'bind' => [\n 'token' => $token,\n 'forgetpass' => true,\n 'id' => $id\n ],\n ])->getFirst();\n\n if (! $user) {\n flash()->session()->warning(\n 'We cant find your request, please '.\n 'try again, or contact us.'\n );\n\n return redirect()->to(route('showLoginForm'))\n ->withError(lang()->get('responses/forgetpass.unknown_error'));\n\n }\n\n // $user->setToken('');\n // $user->setForgetpass(0);\n // $user->save();\n\n if(request()->isPost()) {\n \n $inputs = request()->get();\n\n $validator = new ResetpassValidator;\n $validation = $validator->validate($inputs);\n\n if (count($validation)) {\n session()->set('input', $inputs);\n\n return redirect()->to(url()->previous())\n ->withError(ResetpassValidator::toHtml($validation));\n }\n\n try {\n $this->userService->assignNewPassword($user, $inputs['password']);\n return redirect()->to(route('showLoginForm'))\n ->withSuccess(lang()->get('responses/forgetpass.reset_success'));\n\n \n } catch (EntityException $e) {\n return redirect()->to(url()->previous())\n ->withError(lang()->get('responses/forgetpass.unknown_error'));\n } \n\n }\n \n \n # find session if it has an 'input'\n if (session()->has('input')) {\n\n # get the session 'input' then remove it\n $input = session()->get('input');\n session()->remove('input');\n\n # set the tag 'email' to rollback the value inputted\n tag()->setDefault('email', $input['email']);\n }\n\n return view('auth.showResetPasswordForm');\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int)end($parts);\n if ($timestamp + $expire < time()) {\n return null;\n }\n\n return static::findOne(['password_reset_token' => $token]);\n\n }",
"public function generatePasswordResetToken() {\n\t\t$this->txt_password_reset_token = Yii::$app->security->generateRandomString () . '_' . time ();\n\t}",
"public function resetAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $max_token_age = $this->container->getParameter(\"fom_user.max_reset_time\");\n if (!$this->checkTimeInterval($user->getResetTime(), $max_token_age)) {\n $form = $this->createForm('form');\n return $this->render('FOMUserBundle:Login:error-tokenexpired.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView()\n ));\n }\n\n $form = $this->createForm(new UserResetPassType(), $user);\n return array(\n 'user' => $user,\n 'form' => $form->createView());\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }",
"public function testVerifyPasswordRecoveryToken()\n {\n }",
"public function do_reset_password()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UserController@reset_password', array('token'=>$input['token']))\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString();\n }",
"public function getReset($enc_token = null)\n {\n if (is_null($enc_token)) \n {\n return redirect($this->module_url_path)->with('error', 'Your password reset link was expired.');\n }\n $token = $enc_token;\n $password_reset = DB::table('admin_password_resets')->where('token',$token)->first();\n if($password_reset != NULL)\n {\n $this->arr_view_data['token'] = $token;\n $this->arr_view_data['password_reset'] = (array)$password_reset;\n $this->arr_view_data['admin_panel_slug'] = $this->admin_panel_slug;\n\n return view($this->module_view_folder.'.reset_password',$this->arr_view_data); \n }\n else\n {\n return redirect($this->module_url_path)->with('error','Your password reset link was expired.');\n }\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int)end($parts);\n if ($timestamp + $expire < time()) {\n return null;\n }\n\n return static::findOne(['password_reset_token' => $token]);\n }",
"protected function startPasswordReset()\n\t{\n\t\t$token = new Token();\n\t\t$hashed_token = $token->getHash();\n\t\t$this->password_reset_token = $token->getValue();\n\t\t\n\t\t$expiry_timestamp = time() + 60 * 60 * 2; // two hours from now\n\t\t\n\t\t$sql = 'UPDATE users SET password_reset_hash = :token_hash, password_reset_expires_at = :expires_at WHERE id = :id';\n\t\t\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':token_hash', $hashed_token, PDO::PARAM_STR);\n\t\t$stmt->bindValue(':expires_at', date('Y-m-d H:i:s', $expiry_timestamp) ,PDO::PARAM_STR );\n\t\t$stmt->bindValue(':id', $this->id, PDO::PARAM_INT);\n\t\t\n\t\treturn $stmt->execute();\n\t}",
"public function resetPassword()\n {\n $result['error'] = false;\n $result['message'] = '';\n $this->setRules([ 'token' => 'required', StringLiterals::PASSWORD => 'required|min:6',//'password_confirmation' => 'required|same:password|min:6' \n ]);\n $this->_validate();\n $customerInfo = $this->_customer->where('forgot_password', $this->request->token)->first();\n if (!empty($customerInfo)) {\n $customerInfo->forgot_password = null;\n $customerInfo->password = Hash::make($this->request->password);\n $customerInfo->save();\n } else {\n $result['error'] = true;\n $result['message'] = trans('passwords.token');\n }\n return $result;\n }",
"public function getReset($token = null)\n {\n return view('passwords.reset', compact('token'));\n }",
"public function startPasswordReset()\n {\n //Instancia el token\n $token = new Token();\n\n //Hashea el token\n $hashed_token = $token->getHash();\n\n //Setea la variable password_reset_token con el token \n $this->password_reset_token = $token->getValue();\n\n //Setea la fecha de vencimiento\n $expiry_timestamp = time() + 60 * 60 * 2; // 2 horas desde ahora\n \n //Crea la consulta\n $sql = 'UPDATE users \n SET password_reset_hash = :token_hash,\n password_reset_expiry = :expires_at\n WHERE ID = :id';\n\n //Conecta a la DB \n $db = static::getDB();\n\n //Prepara el stmt\n $stmt = $db->prepare($sql);\n \n //Bindea los valores\n $stmt->bindValue(':token_hash', $hashed_token, PDO::PARAM_STR);\n $stmt->bindValue(':expires_at', date('Y-m-d H:i:s', $expiry_timestamp), PDO::PARAM_STR);\n $stmt->bindValue(':id', $this->id, PDO::PARAM_INT);\n\n //Ejecuta y devuelve true o false si falla\n return $stmt->execute();\n\n\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int)end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n ]);\n }",
"public function generatePasswordResetToken()\n {\n $this->pwd_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function verifyForgotPasswordToken(Request $request, $token)\n {\n $resetToken = PasswordReset::where('token', $token)->first();\n if (isset($resetToken)) {\n // $resetToken[\"current_date\"] = date('Y-m-d H:i:s', strtotime(gmdate(\"Y-m-d H:i:s\")));\n // $resetToken[\"expiry_date\"] = date('Y-m-d H:i:s', strtotime($resetToken[\"created_at\"]) + 86400);\n $expire_within_hours = ((strtotime($resetToken[\"created_at\"]) + (env('REQUEST_EXPIRATION_TIME') * 3600)) - strtotime(gmdate(\"Y-m-d H:i:s\"))) / 3600;\n $request->session()->put(['email' => $resetToken->email]);\n $request->session()->put(['token' => $resetToken->token]);\n $request->session()->put(['expiry' => $expire_within_hours]);\n if ($expire_within_hours < 0) {\n return redirect('/message')->with('warning', \"Sorry! This link has been expired.\");\n }\n //if token is valid, redirect to reset form\n return view(\"passwordResetForm\", compact('resetToken'));\n }\n return redirect('/message')->with('warning', \"Sorry your request could not be found or may have been deleted.\");\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = \\Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token\n ]);\n }",
"public function forgotPasswordVerify()\n {\n // Grab Link Data\n $user_id = $this->input->get('id');\n $token = $this->input->get('token');\n\n // Grab User data.\n //$user = $this->repo->find($user_id);\n\n // Check for token match.\n if ($this->auth->userResetTokenVerify($user_id, $token)) {\n $this->session->resetId = $user_id;\n $this->redirect->url('/users/resetPassword/');\n }\n else {\n $this->data->title = 'Forgot Password Verification';\n $this->data->content = $this->load->view('users/invalidToken', $this->data, true);\n $this->load->view('', $this->data);\n }\n }",
"public function passwordAction()\n {\n $token = $this->get('request')->get('token');\n if (!$token) {\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig');\n }\n\n $user = $this->getDoctrine()->getRepository(\"FOMUserBundle:User\")->findOneByResetToken($token);\n if (!$user) {\n $mail = $this->container->getParameter('fom_user.mail_from_address');\n return $this->render('FOMUserBundle:Login:error-notoken.html.twig', array(\n 'site_email' => $mail));\n }\n\n $max_token_age = $this->container->getParameter(\"fom_user.max_reset_time\");\n if (!$this->checkTimeInterval($user->getResetTime(), $max_token_age)) {\n $form = $this->createForm('form');\n return $this->render('FOMUserBundle:Login:error-tokenexpired.html.twig', array(\n 'user' => $user,\n 'form' => $form->createView()\n ));\n }\n\n $form = $this->createForm(new UserResetPassType(), $user);\n $form->bind($this->get('request'));\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $user->setResetToken(null);\n\n $helper = new UserHelper($this->container);\n $helper->setPassword($user, $user->getPassword());\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('fom_user_password_done'));\n }\n\n return array(\n 'user' => $user,\n 'form' => $form->createView());\n }",
"public function showResetForm(Request $request, $token)\n {\n $data['page_title'] = \"Reset Password\";\n $tk = DB::table('admin_password_resets')->where('token',$token)->first();\n\n if(is_null($tk))\n {\n $notification = array('message' => 'Token Not Found!!','alert-type' => 'warning');\n return redirect()->route('admin.password.request')->with($notification);\n }else{\n $email = $tk->email;\n return view('admin.reset.reset',$data)->with(\n ['token' => $token, 'email' => $email]\n );\n }\n }",
"public function showResetForm(Request $request, $token)\n {\n $tokenData = DB::table('password_resets')\n ->where('token', $token)->first();\n\n /* Redirect the user back to the password \n reset request form if the token is invalid */\n if (!$tokenData) \n { \n $message = 'Invalid token. Please contact Systems Admin';\n return view('auth.passwords.reset', \n compact(['message']));\n }\n else\n {\n return view('auth.passwords.reset', \n compact(['token']));\n }\n\n }",
"public function generatePasswordResetToken()\n {\n $this->password = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function removePasswordResetToken() {\n\t\t$this->txt_password_reset_token = null;\n\t}",
"public function postReset()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::to('user/login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::to('user/reset/'.$input['token'])\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }",
"public function generatePasswordResetToken()\n {\n $security = new Security();\n $this->password_reset_token = $security->generateRandomKey() . '_' . time();\n }",
"public function generatePasswordResetToken()\n\t{\n\t\t$this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n\t}",
"function resetPasswordRoutine($token, $password){\n\t\t\t\n\t\tif(empty($token)){ \n\t\t\taddMessage('error', 'No token supplied');\n\t\t\twLog(2, 'No token supplied');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(empty($password)){ \n\t\t\taddMessage('error', 'No password supplied');\n\t\t\twLog(2, 'No password supplied');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($this->loadByForgotPasswordToken($token)){\n\t\t\t\n\t\t\tif($this->updatePassword($password)){\n\t\t\t\t\n\t\t\t\t$this->clearForgotPasswordToken();\n\t\t\t\t\n\t\t\t\tclearMessages();\n\t\t\t\t\n\t\t\t\t//LOG THEM IN\n\t\t\t\t$this->_setSession();\n\t\t\t\taddMessage('success', 'Your password was reset successfully');\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\taddMessage('error', 'An error occurred while resetting your password. Please retry.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\twLog(1, 'Error during loadByForgotPasswordToken() '.$token);\n\t\t\treturn false;\n\t\t}\n\t}",
"public function generatePasswordResetToken(){\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function getReset($token = null)\n\t{\n\t\tif (is_null($token)) App::abort(404);\n\n $emailAddress = DB::table('password_reminders')->whereToken($token)->pluck('email');\n\n\t\treturn View::make('password.reset')->with(['token' => $token, 'emailAddress' => $emailAddress]);\n\t}",
"public function getPasswordResetToken($email)\n {\n\n $sql = \"SELECT `token` FROM `reset`\n WHERE `type`='reset'\n AND `email` = \".$this->db->escape($email).\"\n LIMIT 1;\";\n\n $query = $this->db->query($sql);\n\n if ($query && $query->num_rows() > 0) {\n $result = $query->row_array();\n return $result['token'];\n }\n\n // For SPROCs, you MUST use $query->free_result() to avoid\n // getting the \"2014 Commands out of sync\" mysql error.\n $sql = sprintf('CALL RESET_TOKEN(%s)',\n $this->db->escape($email));\n $query = $this->db->query($sql);\n $result = $query->row_array();\n $query->free_result();\n\n return @$result['token'] ? $result['token'] : false;\n }",
"public static function findByPasswordResetToken($token)\n {\n $expire = Yii::$app->params['user.passwordResetTokenExpire'];\n $parts = explode('_', $token);\n $timestamp = (int) end($parts);\n if ($timestamp + $expire < time()) {\n // token expired\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => self::STATUS_ACTIVE,\n ]);\n }",
"public function resetPasswordForm(string $token): void\n {\n /** Vérifie que le token contient bien le nombre de caractères attendu */\n if (strlen($token) !== 100)\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n }\n else\n {\n /** Créer une instance de Users défini le token passer en paramètre et rechercher un utilisateur avec ce token */\n $userInfo = (new Users())->setPasswordResetToken($token)->getUserByPasswordResetToken();\n\n /** L'utilisateur existe en base de données */\n if ($userInfo !== false)\n {\n /** Si la date d'expiration est dépasser */\n if ($userInfo->getPasswordResetExpire() < (new \\DateTime())->format('Y-m-d H:i:s'))\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation est expiré.');\n }\n /** Si le token donnée en paramètre et celui en base de données. */\n else if ($token === $userInfo->getPasswordResetToken())\n {\n $FV = new FormValidator($_POST);\n /** Vérifie que le formulaire est envoyé et que le token CSRF est valide. */\n if ($FV->checkFormIsSend('resetPasswordForm'))\n {\n /** Vérification des champs */\n $FV->verify('password')->isNotEmpty()->passwordConstraintRegex()\n ->passwordCorrespondTo('confirmPassword')->needReEntry();\n $FV->verify('confirmPassword')->needReEntry();\n\n /** Si le formulaire est valide */\n if ($FV->formIsValid())\n {\n /** On stock le mot de passe entrer par l'utilisateur dans l'objet */\n $userInfo->setPassword(password_hash($FV->getFieldValue('password'), PASSWORD_BCRYPT));\n /** Mettre à jour le mot de passe, si un problème survient on indique une erreur. */\n if ($userInfo->updateUserPasswordById())\n {\n FlashMessageService::addSuccessMessage('Mot de passe mis à jour avec succès, vous pouvez désormais vous connecté.');\n $this->redirect(\\AltoRouter::getRouterInstance()\n ->generate('login'));\n }\n else\n {\n FlashMessageService::addErrorMessage('Une erreur est survenue lors de la mise à jour de votre mot de passe, veuillez ressayer.');\n }\n }\n }\n }\n }\n else\n {\n FlashMessageService::addErrorMessage('Le lien de reinitialisation n\\'est pas valide.');\n }\n }\n $this->render('Authentification/ResetPasswordForm', 'Reinitialisation du mot de passe.');\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function getPasswordReset($token)\n {\n $reset = $this->resets->getByToken($token);\n\n if (empty($reset)) {\n return \\Error::abort(404);\n }\n\n $this->nav('navbar.logged.out.login');\n $this->title('auth.reset.title');\n\n return $this->view('auth.password.reset', compact('reset'));\n }",
"public function generatePasswordResetToken()\n {\n $this->reset_token = \"P\" . Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function removePasswordResetToken() {\n \t$this->password_reset_token = null;\n }",
"public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\r\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }",
"public function resetPassword(Request $request){\n $vldate=Validator::make($request->all(),[\n 'token'=>['required','string','exists:password_resets,token'],\n 'password'=>['min:8','required','confirmed']\n ]);\n if($vldate->fails()){\n return response()->json([\n 'token' => null,\n 'data' => null,\n 'state' => '404',\n 'err' => $vldate->errors()->first()\n ]);\n }//end of validate token\n\n $email=PasswordReset::where('token',$request->token)->first();\n if($email){\n $user=User::where('email',$email->email)->first();\n $user->password=bcrypt($request->password);\n $user->save();\n\n $em=PasswordReset::where('token',$email->email)->get();\n foreach($em as $eml){\n $eml->delete();\n };\n\n return response()->json([\n 'token' => null,\n 'data' => null,\n 'state' => '200',\n 'err' => null,\n 'success'=>'Password changed'\n ]);\n }\n\n }",
"public function getReset( $token )\n {\n return View::make(Config::get('confide::reset_password_form'))\n ->with('token', $token);\n }",
"public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\r\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function reset_password($token = NULL)\n {\n if(!$token) \n {\n $this->base->set_message('Password recovery token is missing.','danger');\n $this->index();\n } \n else \n {\n // add supplied token in session\n $this->session->set_userdata('token',$token);\n $data['page'] = 'user/reset_password';\n $this->load->view('index',$data);\n } \n }",
"public function getPasswordReset(Request $request)\n {\n if ($request->input('token')) {\n $check = PasswordReset::where('token', $request->input('token'))->first();\n\n if ($check && strtotime($check->created_at) + (Config::get('auth.password.expire') * 60) >= strtotime('now')) {\n return view('users.password_reset', ['token' => $request->input('token')]);\n } else {\n flash()->warning(trans('users.token_expired'));\n\n return redirect('users/forgotten-password');\n }\n } else {\n flash()->warning(trans('users.invalid_token'));\n\n return redirect('users/forgotten-password');\n }\n }",
"public function removePasswordResetToken()\n {\n $this->pwd_reset_token = null;\n }",
"public function generatePasswordResetToken() {\n $this->employer_password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }",
"public function testCreatePasswordRecoveryToken()\n {\n }",
"public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\n }",
"public static function findByPasswordResetToken($token) {\n if (!static::isPasswordResetTokenValid($token)) {\n return null;\n }\n\n return static::findOne([\n 'password_reset_token' => $token,\n 'status' => [self::STATUS_ACTIVE, self::STATUS_UNVERIFY],\n ]);\n }"
] | [
"0.7536813",
"0.7254049",
"0.7175221",
"0.71548027",
"0.71306026",
"0.71240515",
"0.7086724",
"0.69619274",
"0.69555783",
"0.6938892",
"0.6935091",
"0.69178563",
"0.68704724",
"0.68521863",
"0.6838332",
"0.6773534",
"0.6748277",
"0.674786",
"0.6722352",
"0.66963625",
"0.6662848",
"0.66477",
"0.66335607",
"0.6607607",
"0.6590375",
"0.6574073",
"0.65686035",
"0.6554125",
"0.655346",
"0.6549443",
"0.6540487",
"0.65392584",
"0.6530391",
"0.65277094",
"0.65236825",
"0.65197885",
"0.6503517",
"0.6496273",
"0.649079",
"0.6484587",
"0.6483176",
"0.6483176",
"0.64831376",
"0.6476952",
"0.6467951",
"0.6464118",
"0.64428115",
"0.6442258",
"0.6440047",
"0.6439369",
"0.6437729",
"0.6436055",
"0.6435669",
"0.6433394",
"0.6430956",
"0.64293873",
"0.6414803",
"0.6412645",
"0.6412645",
"0.6412645",
"0.6408763",
"0.640091",
"0.6390247",
"0.6386986",
"0.63862395",
"0.63833576",
"0.63728225",
"0.6372399",
"0.6371431",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63681644",
"0.63631856",
"0.6359719",
"0.63583",
"0.6352387",
"0.63488597",
"0.63487154",
"0.6341684"
] | 0.66141355 | 23 |
Checks if database connection is opened and open it if not | private function databaseConnection()
{
// connection already opened
if ($this->db_connection != null) {
return true;
} else {
// create a database connection, using the constants from config/config.php
try {
// Generate a database connection, using the PDO connector
// @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/
// Also important: We include the charset, as leaving it out seems to be a security issue:
// @see http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers#Connecting_to_MySQL says:
// "Adding the charset to the DSN is very important for security reasons,
// most examples you'll see around leave it out. MAKE SURE TO INCLUDE THE CHARSET!"
$this->db_connection = new PDO("pgsql:host=".DB_HOST." port=".DB_PORT." dbname=".DB_NAME." user=".DB_USER." password=".DB_PASS."");
return true;
// If an error is catched, database connection failed
} catch (PDOException $e) {
$this->errors[] = MESSAGE_DATABASE_ERROR;
return false;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _open() {\n\t\tif (!$this->DbConnection) {\n\t\t\t$db = &GetDatabase();\n\t\t\tif (!$db) return false;\n\t\t\t$this->DbConnection = &$db;\n\t\t}\n\t\treturn true;\n\t}",
"private function checkOpenDB(){\r\n if($this->connected){\r\n return true;\r\n }\r\n \r\n //No database opened yet\r\n return false;\r\n }",
"public static function open(){\n//\t\techo 'open'.\"\\n<br>\";\n\t\t$db = RuntimeInfo::instance()->connections()->MySQL(RuntimeInfo::instance()->helpers()->Session()->getSessionConfig()->getHosts());\n\t\t\n\t\t// Change this dependant on what the default db type is (ex: mysql 4.o-, 4.1+, or oracle 10g+)\n\t\tif($db instanceof MySQLAbstraction) { return true; } // to true from $db\n\t\treturn false;\n\t}",
"private function open_db() {\n\n\t\t//var_dump($this->connection); exit;\n\n\t\t\n\n\t}",
"private function openDb() {\n if(!$this->db) {\n $this->db = new Db();\n }\n }",
"private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}",
"function open()\n {\n switch ($this->engine)\n {\n case \"mysql\":\n if (mysql_select_db($this->dbName))\n {\n $this->resetError();\n return true;\n }\n else\n {\n $this->setError(\n \"Could not open the database $this->dbName: \"\n . mysql_error(),\n \"open #001\"\n );\n return false;\n }\n break;\n }\n }",
"function is_open( )\n {\n return is_resource($this->_hDb );\n }",
"protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }",
"private function databaseConnection(){\n // connection already opened\n if ($this->db_connection != null) {\n return true;\n } else {\n // create a database connection, using the constants from config/config.php\n try {\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME . ';charset=utf8', DB_USER, DB_PASS);\n return true;\n } catch (PDOException $e) {\n $this->errors[] = MESSAGE_DATABASE_ERROR;\n return false;\n }\n }\n }",
"protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }",
"public function Open()\n {\n if (isset($this->db_link)) {\n echo \"Warning : You already connected to MySql.\";\n } else {\n $this->db_link = mysqli_connect($this->db_host, $this->db_user, $this->db_password, $this->db_database_select);\n if (mysqli_error($this->db_link)) {\n die(\"Connection failed: \" . mysqli_error($this->db_link));\n }\n return true;\n }\n return false;\n }",
"public function open_db_connection() {\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n // cgecking if the connection has errors\n if($this->connection->connect_errno) {\n die(\"Database connection failed\" . $this->connection->connect_error);\n }\n }",
"public function open_db_connection()\n\t{\n\n\t\t$this->connection = new mysqli(DB_HOST,DB_USER,\n\t\t\tDB_PASS,DB_NAME);\n\n\t\tif ($this->connection->connect_errno):\n\t\t\tdie('database connection failed badly' . $this->connection->connect_error);\n\t\tendif;\n\n\t}",
"private function OpenDbConnection()\n\t{\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->DB_CONN = mysqli_connect($this->DB_HOST, $this->DB_USER, $this->DB_PASS, $this->DB_NAME);\n\t\t\t\n\t\t\tif ( mysqli_connect_errno() > 0 )\n\t\t\t{\n\t\t\t\n\t\t\t\tthrow new Exception('Unable to connect to database');\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie ('error connecting');\n\t\t\ttrigger_error('Database server cannot be accessed.', E_USER_WARNING);\n\t\t\tif ( $_SERVER['SCRIPT_NAME'] != '/error.php' )\n\t\t\t{\n\t\t\t\tRedirect::GotoError('We\\'re sorry, but our database is currently unavailable at this time. Our engineers are working to bring GAA back to you.');\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function open_db_connection() {\n //$this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n //the more \"object oriented\" way of doing this is this next line:\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n if( $this->connection->connect_errno ) {\n die(\"Database connection failed badly\" . $this->connection->connect_error);\n }\n\n }",
"public function openConnection()\n {\n if ($this->failedConnection)\n return false;\n $this->connection = @mysqli_connect(static::host, static::user, static::pwd, static::db);\n if (!$this->connection) {\n $this->failedConnection = true;\n $_SESSION['error'] = \"Connection to database is failed\";\n return false;\n }\n $this->connectionOpen = true;\n return true;\n }",
"public function openConnection() {\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\", \n\t\t\t\t\t$this->userName, $this->password);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\t$error = \"Connection error: \" . $e->getMessage();\n\t\t\tprint $error . \"<p>\";\n\t\t\tunset($this->conn);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function openConnection() {\n\t\ttry {\n\t\t\t$this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\",\n\t\t\t\t\t$this->userName, $this->password);\n\t\t\t$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\t$error = \"Connection error: \" . $e->getMessage();\n\t\t\tprint $error . \"<p>\";\n\t\t\tunset($this->conn);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function openConnection()\n {\n try {\n $this->conn = new PDO(\"mysql:host=$this->host;dbname=$this->database\",\n $this->userName, $this->password);\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n $error = \"Connection error: \" . $e->getMessage();\n print $error . \"<p>\";\n unset($this->conn);\n return false;\n }\n return true;\n }",
"public static function open_db_connection(){\r\n self::$connection = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\r\n\t\t}",
"public function open_db_connection(){\n\n // refer to this class connection -> procedural way\n // $this->connection = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // refer to this class connection -> oriented way\n $this->connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // when error occurs during attempt of database connection\n // if(mysqli_connect_errno()){\n\n // when error occurs during attempt of database connection\n // using connect_errno is a build in function from mysqli\n if($this->connection->connect_errno){ \n // exit with message and error\n // using connect_errno is a build in function from mysqli\n die(\"Database connection failed badly!\" . $this->connection->connect_error);\n }\n }",
"private function open_db_connection(){\n $this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME) \n or\n die(\"database connection failed\" . $this->connection->connect_error);\n \n }",
"public function openConnection() { \n\t\t\t// Try and connect to the database\n\t\t\tif(!isset(self::$connection)) {\n\t\t\t\t// Load configuration as an array. Use the actual location of your configuration file\n\t\t\t\t$config = parse_ini_file(\"../scripts/config.ini\");\n\t\t\t\tself::$connection = new mysqli($config['host'], $config['user'], $config['pass'], $config['db']);\n\n\t\t\t\t// If connection was not successful, handle the error\n\t\t\t\tif(self::$connection === false) {\n\t\t\t\t\t// Handle error\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn self::$connection;\n\t\t\t}\n\t\t}",
"public function getIsDbConnectionValid(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n $e = null;\n try {\n $this->getDb()->open();\n } catch (DbConnectException $e) {\n // throw it later\n } catch (InvalidConfigException $e) {\n // throw it later\n }\n\n if ($e !== null) {\n Craft::error('There was a problem connecting to the database: ' . $e->getMessage(), __METHOD__);\n /** @var ErrorHandler $errorHandler */\n $errorHandler = $this->getErrorHandler();\n $errorHandler->logException($e);\n return false;\n }\n\n return true;\n }",
"public function open()\n {\n if (!isset($this->handle)) {\n $this->stats->benchmark('bedrockWorkerManager.db.open', function () {\n $this->handle = new SQLite3($this->location);\n $this->handle->busyTimeout(15000);\n $this->handle->enableExceptions(true);\n });\n }\n }",
"function getOpenedConnection() {\n\tglobal $dbh;\n\tif($dbh->sqlstate == null) {\n\t\t$dbh = null;\n\t\t$dbh = openDB();\n\t\t\n\t} else{} \n\treturn $dbh;\n}",
"public function open_conn(){\n \n \n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n \n if(!$this->connection){\n die(\"Database Connection Failed because: \" . mysql_error());\n }else{\n $db_select = mysql_select_db(DB_NAME,$this->connection);\n if(!$db_select){\n die(\"Database Connection Failed because: \" .mysql_error());\n }\n }\n }",
"function open()\n {\n $this->conn = mysqli_connect($this->host, $this->user, $this->password,$this->database);\n if (!$this->conn) {\n\t\theader(\"Location: error.html\");\n\t\t//echo mysql_error();\n\t exit;\n return false;\n }\n return true;\n }",
"protected function databaseConnection()\n {\n // if connection already exists\n if ($this->db_connection != null) {\n return true;\n } else {\n try {\n $this->db_connection = new PDO('mysql:host='. DB_HOST .';dbname='. DB_NAME . ';charset=utf8', DB_USER, DB_PASS);\n return true;\n } catch (PDOException $e) {\n $this->errors[] = MESSAGE_DATABASE_ERROR . $e->getMessage();\n }\n }\n return false;\n }",
"function openDB() {\r\n global $db;\r\n if(!is_resource($db)) {\r\n /* Conection String eg.: mysqli(\"localhost\", \"lpaecomms\", \"letmein\", \"lpaecomms\")\r\n * - Replace the connection string tags below with your MySQL parameters\r\n */\r\n $db = new mysqli(\r\n \"localhost\",\r\n \"root\",\r\n \"\",\r\n \"lpa_ecomms\"\r\n );\r\n if ($db->connect_errno) {\r\n echo \"Failed to connect to MySQL: (\" .\r\n $db->connect_errno . \") \" .\r\n $db->connect_error;\r\n }\r\n }\r\n}",
"public function checkConnection()\n {\n $this->last_error = '';\n if (!isset($this->database)) \n $this->connect();\n }",
"function connect() {\n trigger_before( 'connect', $this, $this );\n $this->conn = mysql_connect($this->host,$this->user,$this->pass,$this->opt1,$this->opt2);\n if (!$this->conn) {\n $this->db_open = false;\n trigger_error(\"Sorry, the database connection failed. Please check your database connection settings.\".@mysql_error($this->conn), E_USER_ERROR );\n } else {\n $this->db_open = mysql_select_db($this->dbname);\n if (!$this->db_open)\n trigger_error(@mysql_error($this->conn), E_USER_ERROR );\n }\n return $this->db_open;\n }",
"private function _checkConnection()\n\t{\n\t\tif (is_resource($this->_connection) === false)\n\t\t{\n\t\t\t// no active connection reconnect\n\t\t\t$this->_connect();\n\t\t}\n\t}",
"public function isConnectionOpen(): bool;",
"public function open_connection()\n {\n $this->connection = new mysqli(DB_SERVER, DB_USER, DB_USR_PASS, DB_NAME);\n if (mysqli_connect_errno()) \n {\n exit('Connect failed: '. mysqli_connect_error());\n }\n }",
"public function openConnection() {\n $this->mysqli = new mysqli($this->hostname, $this->username, $this->password, $this->database);\n if (mysqli_connect_errno()) {\n header( 'HTTP/1.1 500 DB Error' );\n die(mysqli_connect_error());\n }\n }",
"function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}",
"function connectionExists(){\n\t\tglobal $dbConnection;\n\t\tif($dbConnection == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}",
"private function openDatabaseConnection()\n {\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(\\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_OBJ, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new \\PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }",
"function connect() {\n\t\t$config = $this->config;\n\t\t$this->connection = $config['connect']($config['database']);\n\t\t$this->connected = is_resource($this->connection);\n\n\t\tif ($this->connected) {\n\t\t\t$this->_execute('PRAGMA count_changes = 1;');\n\t\t}\n\t\treturn $this->connected;\n\t}",
"public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }",
"function db_connection($db_action = \"OPEN\") {\n\t\t\n\t\tglobal $db_conn, $db_host, $db_user, $db_pass, $db_name;\n\n\t\tif(!isset($db_lastAction)) {\n\t\t\tstatic $db_lastAction = \"NONE\";\n\t\t}\n\t\t\n \n\t\tif ($db_action != $db_lastAction) //PROTECT FROM TRYING TO OPEN AN ALREADY OPEN CONNECTION OR CLOSE AN ALREADY CLOSED CONNECTION\n\t\t{ \n\t\t\tif ($db_action == \"OPEN\")\n\t\t\t{\n\t\t\t\t$db_conn = new mysqli ($db_host,$db_user,$db_pass,$db_name);\n\t\t\t\t\n\t\t\t\tif (mysqli_connect_errno ($db_conn))\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"error\">Failed to connect to database.</div>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$db_conn->set_charset('utf8');\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($db_action == \"CLOSE\" && $db_conn)\n\t\t\t{\n\t\t\t\tmysqli_close($db_conn);\n\t\t\t}\n\t\t\t\n\t\t\t$db_lastAction = $db_action;\n\t\t}\n\t}",
"public function OpenConnection() { \n if ($this->USE_PERMANENT_CONNECTION) { \n $conn = mysql_pconnect($this->SERVER,$this->USERNAME,$this->PASSWORD); \n } else { \n $conn = mysql_connect($this->SERVER,$this->USERNAME,$this->PASSWORD); \n } \n if ((!$conn) || (!mysql_select_db($this->DATABASE,$conn))) { \n $this->ERROR_MSG = \"\\r\\n\" . \"Unable to connect to database - \" . date('H:i:s'); \n $this->debug(); \n return false; \n } else { \n $this->CONNECTION = $conn; \n return true; \n } \n }",
"public function openConnection() {\n $this->connection = new mysqli($this->host, $this->username, $this->password, $this->database);\n\n if ($this->connection->connect_error) {\n die(\"Error: \" . $this->connection->connect_error);\n }\n }",
"public function openConnection() {\n\t\t$this->connection = new mysqli($this->host, $this->username, $this->password, $this->database);\n\n\t\tif ($this->connection->connect_error) {\n\t\t\tdie(\"<p>Error:\" . $this->connection->connect_error . \"</p>\");\n\t\t}\n\t }",
"private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\n //UTF-8 encoding queries\n $this->db->exec(\"SET NAMES 'utf8'\");\n $this->db->exec(\"SET CHARACTER SET utf8\");\n $this->db->exec(\"SET COLLATION_CONNECTION='utf8_unicode_ci'\");\n }",
"private function openconnection(){\r\n $options = array(\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\r\n\r\n // PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n // PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n // PDO::ATTR_EMULATE_PREPARES => false,\r\n );\r\n try{\r\n $this->db = new PDO('mysql' . ':host=' . DBHOST . DBPORT . ';dbname=' . DBNAME.';charset='.CHARSET, DBUSER, DBPASS, $options);\r\n } catch (Exception $e) {\r\n throw new Exception($e->getMessage(), (int)$e->getCode());\r\n }\r\n }",
"public function openConnection(): bool;",
"public function openConnection(): bool;",
"private function databaseConnection(){\n \t\tif($this->connection != null){\n \t\t\treturn;\n \t\t} else {\n \t\t\t$this->connection = mysqli_connect(\"127.0.0.1\", \"user\", \"password\", \"database\") or die(\"Error \" . mysqli_error($this->connection));\n \t\t}\n\n\t}",
"static private function open_default()\n {\n if(!self::is_open('default')) self::open('default', DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_BASE );\n }",
"function open($connection_id = 0) {\n\t\tif ($connection_id == 0) {\n\t\t\t# get credentials from object variables\n\t\t\t$connection_string = $this->format_pg_connection_string($this->get_object_credentials());\n\t\t}\n\t\telse {\n\t\t\t$this->debug->write(\"Open Database connection with connection_id: \" . $connection_id, 4);\n\t\t\t$this->connection_id = $connection_id;\n\t\t\t$connection_string = $this->get_connection_string();\n\t\t}\n\t\t$this->dbConn = pg_connect($connection_string);\n\t\tif (!$this->dbConn) {\n\t\t\t$this->err_msg = 'Die Verbindung zur PostGIS-Datenbank konnte mit folgenden Daten nicht hergestellt werden: ' . str_replace($credentials['password'], '********', $connection_string);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->debug->write(\"Database connection: \" . $this->dbConn . \" successfully opend.\", 4);\n\t\t\t$this->setClientEncodingAndDateStyle();\n\t\t\t$this->connection_id = $connection_id;\n\t\t\treturn true;\n\t\t}\n\t}",
"function open($save_path, $session_name)\n {\n if (MDB2::isError($this->_connect($this->options['dsn']))) {\n return false;\n } else {\n return true;\n }\n }",
"private function is_db_available(){\n \t$host = Configuration::DB_HOST;\n\t\t$dbname = Configuration::DB_NAME;\n\t\t$dbuser = Configuration::DB_USER;\n\t\t$dbpass = Configuration::DB_PASS;\n\t\t$con = null;\n\t\ttry{\n\t\t\t$con = new PDO(\"mysql:host=$host;dbname=$dbname\", $dbuser, $dbpass, array(PDO::ATTR_PERSISTENT => true));\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t\t$con = null;\n\t\treturn true;\n }",
"private function open_connection(){\n\t\t$this -> conn = new mysqli(self::$SERVER, self::$USER, self::$PASS, $this -> DATABASE);\n\t}",
"protected function _initDbConnection() {\n\t\tif (!empty($this->db)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Create a new connection\n\t\tif (empty($this->config['datasource'])) {\n\t\t\tdie(\"FeedAggregatorPdoStorage: no datasource configured\\n\");\n\t\t}\n\n\t\t// Initialise a new database connection and associated schema.\n\t\t$db = new PDO($this->config['datasource']); \n\t\t$this->_initDbSchema();\n\t\t\n\t\t// Check the database tables exist\n\t\t$this->_initDbTables($db);\n\n\t\t// Database successful, make it ready to use\n\t\t$this->db = $db;\n\t}",
"public function tryConnection()\n {\n\n if ($this->attemptCount >= $this->attempts) {\n $this->error('Connection attempts exceeded');\n die('Connection attempts exceeded');\n }\n\n $this->attemptCount++;\n\n try {\n if(DB::connection()->getPdo()) {\n return true;\n }\n } catch (\\Exception $e) {\n $this->info($e->getMessage());\n return false;\n }\n }",
"public function open_connection() {\n try{\n \t\t$conn_string = \"mysql:host=\" . DB_SERVER . \";dbname=\" . DB_NAME . \";charset=utf8\";\n \t\t$this->connection = new PDO($conn_string, DB_USER, DB_PASS);\n \t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n \t} catch (PDOException $e) {\n \t\techo \"Connection failed: \" . $e->getMessage();\n \t}\n }",
"public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }",
"function openDatabaseConnection() {\n\t\t# open connection to MySQL database\n\t\t$link = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD)\n\t\t\tor die(\"Could not connect to the SQL database server help\");\n\t\tmysql_select_db(MYSQL_DATABASE) or die(\"Could not connect to the SQL database server\");\n\t}",
"protected function databaseConnectionIsValid()\n {\n try {\n app('db')->reconnect()->getPdo();\n \n return true;\n } catch (\\PDOException $e) {\n return false;\n }\n }",
"private function checkDatabaseManager()\r\n {\r\n // check if DatabaseManager is instanciated\r\n if($this->_DatabaseHandler === null)\r\n {\r\n $this->_DatabaseHandler = new \\mysqli($this->_Hostname, $this->_Username, $this->_Password, $this->_DatabaseName);\r\n // check for errors\r\n if ($this->_DatabaseHandler->connect_errno)\r\n {\r\n // get the error code and message\r\n $errorCode = $this->_DatabaseHandler->connect_errno;\r\n $errorMessage = $this->_DatabaseHandler->connect_error;\r\n // set the database handler object to null\r\n $this->_DatabaseHandler = null;\r\n // throw the exception\r\n throw new \\Mangetsu\\Library\\Database\\DatabaseException(\"Could not connect to database!\", $errorCode, $errorMessage);\r\n }\r\n // set autocommit to on\r\n $this->_DatabaseHandler->autocommit(TRUE);\r\n }\r\n }",
"public function open() {\n\n\t\t$this->openConnection();\n\n\t\tif (parent::ping() === false) {\n\t\t\t$this->openConnection(true);\n\t\t}\n\n\t}",
"function openDatabaseConnection() \n{\n\t$options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\t\n\t$db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n\n\treturn $db;\n}",
"private function connectDB(){\n try {\n if ( false === $this->config->get('database.enabled',false) ){\n $this->dodb = false;\n return false;\n }\n $this->dodb = true;\n\n $DBh = DB::obtain(\n $this->config->get('database.host',null),\n $this->config->get('database.database',null),\n $this->config->get('database.user',null),\n $this->config->get('database.password',null)\n );\n\n $DB = DB::pass();\n //clear config data from memory\n $this->config->set('database.host',null);\n $this->config->set('database.database',null);\n $this->config->set('database.user',null);\n $this->config->set('database.password',null);\n return true;\n } catch ( Exception $e ){\n throw new SystemException($e->getMessage());\n }\n }",
"public function connectOpen()\n\t{\n\t try {\n\t $this->pdo = new PDO(\"mysql:host=127.0.0.1;port=8889;dbname=kiva\", DBUSER, DBPASS, array(PDO::ATTR_EMULATE_PREPARES => false));\n\t echo \"\\n\\nConnected to database....\\n\\n\";\n\t } catch (Exception $e) {\n\t //error_log(json_encode(array('ERROR' => 'pdo_connect', 'errno: ' => 'initial_connect_issue', 'errmsg: ' => $e->getMessage(), 'FAIL' => true)));\n\t $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t error_log(json_encode(array('ERROR' => 'pdo_connect', 'errno: ' => $this->pdo->errorCode(), 'errmsg: ' => $this->pdo->errorInfo(), 'FAIL' => true)));\n\t return false;\n\t }\n\t}",
"function dbopenGMS( $db_link, $db_task )\n{\n\t# if already open, just return the passed db_link\n\tif (isset($db_link) AND ($db_link != NULL) ) {\n\t\t#printf(' db link is already set and is Not NULL <br>' );\n\t\treturn $db_link;\n\t}\n\tinclude(\"config.db.php\");\n\t\n##printf(' pre try pdo open ');\t\t\t\n\ttry {\n\t\t$pdo_dblink = new PDO( \"mysql:host=$db_host;dbname=$db_name\", $db_user, $db_pass );\n\t\tif (!$pdo_dblink) {\n\t\t\tthrow new DBEx(\"Cannot connect to the database\"); \n\t\t} \n\t} catch (PDOException $e) {\n\t\tgmsError( 'ECDBOPEN', $e->getMessage(), '', '', '' );\n\t\t##printf(' catch 1 ');\n\t\treturn null;\n\t} catch (DBEx $e) {\n\t\tgmsError( 'ECDBOPENDBEX', $e->getMessage(), '', '', '' );\n\t\treturn null;\n\t}\n\n\t# setup Db attributes and return the \n\t$pdo_dblink->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t$pdo_dblink->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t$db_link = $pdo_dblink;\n\treturn $pdo_dblink;\n\t\n}",
"function db_open( ) {\n\t$dbinfo['username']=\"username\";\n\t$dbinfo['password']=\"password\";\n\t$dbinfo['dbname']=\"dbname\";\n\t$dbinfo['host']=\"host\";\n // Connecting\n $ret['id'] = mysql_connect( $dbinfo['host'], $dbinfo['username'], $dbinfo['password'] );\n if( !$ret['id'] ) {\n $ret['error'] = \"ERROR: Cannot connect to database!\";\n return $ret;\n }\n\n // Selecting DB\n if ( !mysql_select_db( $dbinfo['dbname'], $ret['id'] ) ) {\n $ret['error'] = \"ERROR: Cannot select database!\";\n return $ret;\n\t\t}\n\n return $ret;\n}",
"function OpenDatabase()\n{\n $dblink = @mysql_connect(HOSTNAME, USERNAME, PASSWORD); \n\n if ($dblink)\n {\n @mysql_select_db(DBNAME);\n }\n return $dblink;\n}",
"function databaseConnect() {\n if(!$this->db->Connect($this->PMDR->getConfig('login_module_db_host'), $this->PMDR->getConfig('login_module_db_user'), $this->PMDR->getConfig('login_module_db_password'), $this->PMDR->getConfig('login_module_db_name'))) {\n $this->databaseReset();\n return false;\n }\n return true;\n }",
"function getDBConnection() {\n\t\n\t\tglobal $dbh;\n\n\t\tif(!$dbh) {\n\t\t\t$dbh = mysqli_connect(\"localhost\", \"sa\", \"sa\", \"travelexperts\");\n\t\t\tif(!$dbh) {\n\t\t\t\tprint(\"Connection failed: \" . mysqli_connect_errno($dbh) . \"--\" . mysqli_connect_error($dbh) . \"<br/>\");\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\t//db connection exists, do not need to create again.\n\t\t}\n\t\t\n\t}",
"private function openDB($pdoParams, array $credentials = array()){\r\n try{\r\n //We check if any DB is already opened\r\n if($this->checkOpenDB()){\r\n //We run into an error\r\n throw new Exception(\"Trying to open a database \"\r\n . \"while another is already opened !\");\r\n }\r\n\r\n //We open DataBase\r\n if(count($credentials) == \"\")\r\n $this->db = new PDO($pdoParams);\r\n else\r\n $this->db = new PDO($pdoParams, \r\n $credentials['username'],\r\n $credentials['password']);\r\n }\r\n catch (Exception $e){\r\n exit($this->echoException($e));\r\n }\r\n catch(PDOException $e){\r\n exit($this->echoPDOException($e));\r\n }\r\n \r\n //We set the connected var to yes\r\n $this->connected = true;\r\n\r\n //We set PDO to return errors in verbose mode\r\n if($this->verbose)\r\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n }",
"private function restore_database_connection() {\n\t\tglobal $updraftplus, $wpdb;\n\n\t\t$wpdb_connected = $updraftplus->check_db_connection($wpdb, false, false, true);\n\n\t\tif (false === $wpdb_connected || -1 === $wpdb_connected) {\n\t\t\tsleep(10);\n\t\t\t$this->setup_database_objects(true);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function get_db_instance() {\n\t\treturn ( ! empty( $this->db ) && $this->db->db_connect() ) ? $this->db : false;\n\t}",
"public function connect(){ //connrct to database\r\t\tif ($this->connected==false){\r\t\t\tif ($this->pers){\r\t\t\t\t$this->handle=sqlite_popen($this->server);\r\t\t\t}else{\r\t\t\t\t$this->handle=sqlite_open($this->server);\r\t\t\t}\r\t\t\t\r\t\t\t//$this->engine = new SQLiteDatabase($this->server);\r\t\t\t$this->connected=true;\r\t\t}//\r\t}",
"function db_connect() {\n /*\n * Create new persistent database connection, or return the existing one\n */\n static $database;\n\n if(!isset($database)) {\n $database = new mysqli('localhost', 'root', '', 'auto_company', 3306);\n }\n\n if(!$database) {\n // Couldn't connect\n echo db_error();\n return false;\n }\n\n return $database;\n}",
"public function dbConnection(): false|\\Illuminate\\Database\\Connection\n {\n $dbconnection = false;\n try {\n $dbconnection = DB::connection();\n } catch (\\Exception $e) {\n $dbconnection = false;\n $this->checksBag->addErrorAndHint(\n \"Error Database connection\",\n \"- \" . $e->getCode() . \" - \" . $e->getMessage(),\n \"Check out your .env file for these parameters: DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD\"\n );\n }\n return $dbconnection;\n }",
"function openDb() {\n $host = DB_HOST;\n $username = DB_USER;\n $password = DB_PASSWORD;\n $database = DB_NAME;\n\n // create connection\n $connection = mysqli_connect($host, $username, $password, $database);\n\n // check if connection was successful\n if (mysqli_connect_errno()) {\n die(\"MYSQL connection failed\");\n }\n\n return $connection;\n}",
"private function openConnexion()\n {\n try {\n $bdd = new PDO($this->db, $this->login, $this->pass);\n $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $bdd->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->connec = $bdd;\n // return $this->connec;\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }",
"private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}"
] | [
"0.8270589",
"0.80481344",
"0.76318526",
"0.7609206",
"0.759871",
"0.7516326",
"0.745048",
"0.7399882",
"0.736889",
"0.73644257",
"0.7345927",
"0.7337658",
"0.7311356",
"0.7285169",
"0.72412014",
"0.7141178",
"0.71143585",
"0.71004367",
"0.70963025",
"0.7088647",
"0.703881",
"0.7018886",
"0.70142114",
"0.7011215",
"0.6968791",
"0.6910705",
"0.68932736",
"0.6891519",
"0.68786716",
"0.6849042",
"0.6840649",
"0.68328494",
"0.6799269",
"0.67987305",
"0.6793982",
"0.67880493",
"0.6756161",
"0.67379516",
"0.67298734",
"0.6727645",
"0.67253214",
"0.6718535",
"0.6694607",
"0.6689933",
"0.6678196",
"0.66721445",
"0.6647789",
"0.6641308",
"0.6636006",
"0.6636006",
"0.66340786",
"0.66330427",
"0.6615441",
"0.66002697",
"0.65518725",
"0.6537198",
"0.6523846",
"0.6521623",
"0.65184706",
"0.65061045",
"0.6496183",
"0.6479959",
"0.6432811",
"0.6430073",
"0.64057696",
"0.6404779",
"0.63880366",
"0.6384594",
"0.6381538",
"0.63304687",
"0.6329585",
"0.63110185",
"0.6308421",
"0.63022965",
"0.62889856",
"0.6286079",
"0.62810385",
"0.6277664",
"0.627221",
"0.6255192",
"0.62463915",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454",
"0.62426454"
] | 0.7083101 | 20 |
checks the id/verification code combination and set the user's activation status to true (=1) in the database | public function get_info()
{
// if database connection opened
if ($this->databaseConnection()) {
// try to update user with specified information
$query_user = $this->db_connection->prepare('SELECT * FROM directory WHERE username = :user_name AND id = :id');
$query_user->bindValue(':user_name', $_SESSION['user_name'], PDO::PARAM_STR);
$query_user->bindValue(':id', $_SESSION['user_id'], PDO::PARAM_STR);
$query_user->execute();
if ($query_user->rowCount() > 0) {
return $query_user->fetchObject();
} else {
return false;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function activate_user()\n{\n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n if(isset($_GET['email'])){\n $email=clean($_GET['email']);\n $validation_code=clean($_GET['code']);\n $sql=\"SELECT id FROM users WHERE email='\".escape($_GET['email']).\"' AND validation_code='\".escape($_GET['code']).\"'\";\n $result=query($sql);\n if(row_count($result)==1){\n $sql2=\"UPDATE users SET active=1, validation_code=0 WHERE email='\" .escape($email).\"' AND validation_code='\".escape($validation_code).\"'\";\n $result2=query($sql2);\n set_message(\"<p class='bg-success'>Your account has been activated please login</p>\");\n redirect(\"login.php\");\n }else{\n set_message(\"<p class='bg-danger'>Your account could not be activated</p>\");\n redirect(\"login.php\");\n }\n\n }\n\n\n }\n}",
"function activate_user(){\n\n // use the get request since the user information \n // has been post \n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n\n if(isset($_GET['email'])) {\n \n $email = clean($_GET['email']);\n $validation_code = clean($_GET['code']);\n \n // select the user in the database \n $sql = \"SELECT id FROM users WHERE email ='\".escape($_GET['email']).\"' AND validation_code = '\".escape($_GET['code']).\"'\";\n $result = query($sql); // get the result \n\n // if the user exists in the database, activate the account by updating active by 1\n // Then the user is redirected to the login page to login \n if(row_count($result)==1){\n\n $sql2 = \"UPDATE users SET active = 1, validation_code = 0 WHERE email = '\".escape($email).\"' AND validation_code = '\".escape($validation_code).\"'\";\n $result2 = query($sql2);\n\n set_message(\"<p class='bg-success'> Your account has been activated please login</p>\");\n \n redirect(\"login.php\");\n }\n else{ // if the user is not activated display an error message\n // and redirect the user to the login page\n\n set_message(\"<p class='bg-danger'> Sorry Your account has not been activated</p>\");\n \n redirect(\"register.php\"); \n\n } \n }\n\n} // GET \n\n}",
"function activateUser($id) {\n \n $this->db->where('userID', $id);\n $this->db->update('user', array('status' => 1)); \n\n }",
"public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }",
"public function activate(){\r\n\t\t$id = $this->uri->segment(3);\r\n\t\t$code = $this->uri->segment(4);\r\n\r\n\t\t//fetch requests details\r\n\t\t$request = $this->requests_model->getRequestById($id);\r\n \r\n\r\n\t\t//if code matches\r\n\t\tif($request['code'] == $code){\r\n\t\t\t//update user active status\r\n\t\t\t// $data['activate'] = true;\r\n\t\t\t$query = $this->accounts_model->updateActivate($id);\r\n\r\n\t\t\tif($query){\r\n\r\n\t\t\t\t$row = $this->accounts_model->getCheckUser($request['email']);\r\n\r\n\t\t\t\t$this->session->set_userdata('is_user', $row['type']);\r\n\t\t\t\t$this->session->set_userdata('myName', \t$row['firstname'].\" \".$row['lastname']);\r\n\t\t\t\t$this->session->set_userdata('myEmail', $row['email']);\r\n\t\t\t\t$this->session->set_userdata('myId', \t$row['id']);\r\n\t\t\t\t$this->session->set_userdata('myRole', \t$row['role']);\r\n\r\n\t\t\t\t$this->session->set_flashdata('msg', 'User activated successfully');\r\n\t\t\t\tredirect('main');\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\t$this->session->set_flashdata('error_msg', 'Something went wrong in activating account');\r\n\t\t\t\tredirect('login'); \r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\t\t\t\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Cannot activate account. Code didnt match');\r\n\t\t\tredirect('login'); \r\n\t\t}\r\n \r\n\t}",
"public function activate_account(){\n $db = \\Config\\Database::connect();\n $m = $db->table('ff_users');\n\n $uri = service('uri');\n $id = $uri->getsegment('2');\n\n $q = ask_db('user_id','ff_users',['random_key'=>\"'$id'\"]);\n\n if(!empty($q)){\n $data = ['is_active' =>'1'];\n\n $m->where('random_key', $id);\n $m->update($data);\n\n $_SESSION['success'] = 'Account is successfully activated';\n } else {\n $_SESSION['error'] = 'There was an error in activating your account, kindly respond to the activation email';\n }\n\n\n\n return redirect('login');\n\n\n }",
"public function CheckActivationCode($code){\n $this->db->where('activation_code',$code);\n $query = $this->db->get('users'); \n if ($query->num_rows() > 0)\n { \n return true;\n }\n else\n { \n return false;\n }\n }",
"public function userActivation($activation_code) {\n $this->load->model('register_model');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'first_name', 'last_name', 'user_name', 'user_email', 'user_type', 'email_verified', 'user_status');\n $condition_to_pass = array(\"activation_code\" => $activation_code);\n /* get user details to verify the email address */\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n if ($arr_login_data[0]['email_verified'] == 1) {\n $this->session->set_userdata('activation_error', \"You have already activated your account. Please login.\");\n } else {\n\n $user_detail = $this->common_model->getRecords(\"mst_users\", \"user_id\", array(\"activation_code\" => $activation_code));\n $this->load->model('admin_model');\n /* Removing the user if he is exists in inactiveated list */\n $this->register_model->updateInactiveUserFile($this->common_model->absolutePath(), 1, intval($user_detail[0]['user_id']));\n $table_name = 'mst_users';\n $update_data = array(\"user_status\" => '1', 'email_verified' => '1');\n $condition_to_pass = array(\"activation_code\" => $activation_code);\n $this->common_model->updateRow($table_name, $update_data, $condition_to_pass);\n $this->session->set_userdata('msg_success', \"Your email address has been verified successfully.\");\n }\n } else {\n $this->session->set_userdata('msg_failed', \"Invalid activation link.\");\n }\n redirect(base_url() . \"sign-in\");\n }",
"function verify($email,$code)\n {\n $sql = \"SELECT id\n FROM\n user\n WHERE\n verification = '$code'\n AND\n email='$email'\n \";\n $query = $this->db->query($sql);\n if($query->num_rows()>0)\n {\n $row = $query->row();\n $update['verification'] = 'done';\n $update['status'] = 1;\n $this->db->where('id', $row->id);\n $this->db->update('user', $update);\n return $row->id;\n }\n }",
"public function activate($code)\n {\n if (Auth::check())\n {\n return Redirect::to('/');\n }\n\n\n $user = User::where('code', '=', $code)->where('active', '=', 0);\n\n if ($user->count())\n {\n $user = $user->first();\n\n //update user to active state\n $user->active = 1;\n $user->code = '';\n\n if ($user->save())\n {\n\n return Redirect::route('log')\n ->with('success', 'Your account is activated. Now you can sign in.');\n }\n }\n\n return Redirect::route('log')\n ->with('success', 'WE could not activate your account. Try again later.');\n\n }",
"public function getActivate($code) {\n\n\n\t$user = User::where('code' , '=' , $code)->where('active' , '=' ,0);\n\n\tif($user->count()) {\n\t\t$user = $user->first();\n\n\t\t// update user activate \n\t\t$user->active = 1;\n\t\t$user->code = '';\n\t\t if($user->save()) {\n\n\n\t\t \treturn Redirect::to('users/index')->with('yes' , 'account activate done u can now login ');\n\n\n\t\t }\n\t}\n\n\treturn Redirect::to('users/index')->with('yes' , 'we coulnt activate ur account yet pleas try again later ');\n\n}",
"public function activate() {\r\n \r\n $statement = ConnectionModel::getConnection()->query('Select * From user where id = :id and confirmToken = :confirmToken',\r\n ['id' => $this->_id,\r\n 'confirmToken' => $this->_confirmToken]);\r\n \r\n if($statement) {\r\n \r\n $activate = ConnectionModel::getConnection()->query('Update user set isConfirmed = 1 where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n if($activate) {\r\n \r\n $user = ConnectionModel::getConnection()->query('Select * From user where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n $result = new UserModel('','');\r\n $result->hydrate($user[0]);\r\n \r\n return $result;\r\n \r\n }\r\n \r\n }\r\n \r\n return false;\r\n \r\n}",
"public function activation($code, $language=\"en\"){\n\t\tif($this->check_activity($code)){\n\t\t//User validation passes\n\t\t\t$data = array(\n\t\t\t'account_active' => '1',\n\t\t\t);\n\n\t\t\t$this->save($data, $id);\n\t\t\t//Sets up notification and redirecting\n\t\t\t$this->session->set_flashdata('activation', true);\n\t\t\tredirect($language.'/home/activate', 'refresh');\n\t\t}\n\t\t//User validation fails\n\t\t//Sets up error reporting and redirecting\n\t\t$this->session->set_flashdata('activation', false);\n\t\tredirect($language.'/home/activate', 'refresh');\n\t\t}",
"function activate()\n {\n if (empty($this->userID)) $this->error('No user is loaded', __LINE__);\n if ( $this->is_active()) $this->error('Allready active account', __LINE__);\n $res = $this->db->query(\"UPDATE \".$this->usertable.\" SET \".$this->user_active.\" = 1 \n\tWHERE \".$this->user_id.\" = '\".$this->escape($this->userID).\"' LIMIT 1\");\n if (@count($res) == 1)\n\t{\n\t\t$this->userData[$this->user_active] = true;\n\t\treturn true;\n\t}\n\treturn false;\n }",
"function activate($id){\n $data=[\n 'isactive' => '1',\n ];\n $this->db->where('id', $id);\n $this->db->update('users_permissions', $data);\n return $this->db->affected_rows();\n }",
"function confirm_registration($registration_code)\n {\n /* Check the users table for the activation code */\n $this->db->select('id');\n $this->db->from('users');\n $this->db->where('activation_code',$registration_code);\n $result = $this->db->get();\n if($result->num_rows == 1){\n /* Activate account */\n $data = array(\n 'activated' => 1\n );\n $this->db->where('activation_code',$registration_code);\n $this->db->update('users',$data);\n $user = $result->row_array();\n $email = $this->get_email($user['id']);\n return $email;\n } else {\n return false;\n }\n }",
"function oaupostgrad_users_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `student_Idn` FROM `student` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `student` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"function users_user_activation($args)\n{\n $code = base64_decode(FormUtil::getPassedValue('code', (isset($args['code']) ? $args['code'] : null), 'GETPOST'));\n $code = explode('#', $code);\n\n if (!isset($code[0]) || !isset($code[1])) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n $uid = $code[0];\n $code = $code[1];\n\n // Get user Regdate\n $regdate = pnUserGetVar('user_regdate', $uid);\n\n // Checking length in case the date has been stripped from its space in the mail.\n if (strlen($code) == 18) {\n if (!strpos($code, ' ')) {\n $code = substr($code, 0, 10) . ' ' . substr($code, -8);\n }\n }\n\n if (DataUtil::hash($regdate, 'md5') == DataUtil::hash($code, 'md5')) {\n $returncode = pnModAPIFunc('Users', 'user', 'activateuser',\n array('uid' => $uid,\n 'regdate' => $regdate));\n\n if (!$returncode) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n LogUtil::registerStatus(__('Done! Account activated.'));\n return pnRedirect(pnModURL('Users', 'user', 'loginscreen'));\n } else {\n return LogUtil::registerError(__('Sorry! You entered an invalid confirmation code. Please correct your entry and try again.'));\n }\n}",
"function activateUser()\n {\n // Sets the value of activated to yes\n $int = 1;\n\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"UPDATE User SET \n \t\tactiveUser = ?\n \t\t\tWHERE ID = ?\"))\n ) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n\n if (!($stmt->bind_param(\"ii\",\n $int,\n $this->id))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n }",
"public function verify(){\n\t\t$email = $this->input->get('email');\n\t\t$token = $this->input->get('token');\n\n\t\t$user = $this->db->get_where('user',['email' =>$email])->row_array();\n\n\t\tif ($user) {\n\t\t\t$user_token = $this->db->get_where('user_token',['token' => $token])->row_array();\n\t\t\tif ($user_token) {\n\t\t\t\t\n\t\t\t\t$this->db->set('is_active',1);\n\t\t\t\t$this->db->where('email', $email);\n\t\t\t\t$this->db->update('user');\n\t\t\t\t$this->db->delete('user_token',['email'=>$email]);\n\n\t\t\t\t// kalo token nya gak ada\n\t\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-success\" role=\"alert\">'.$user['email'].' Success Activated!</div>');\n\t\t\t\tredirect('auth');\n\n\t\t\t}else{\n\t\t\t\t// kalo token nya gak ada\n\t\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Wrong Token</div>');\n\t\t\t\tredirect('auth');\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$this->session->set_flashdata('message','<div class=\"alert alert-danger\" role=\"alert\">Account activation failed! Wrong email</div>');\n\t\t\tredirect('auth');\n\t\t}\n\t}",
"public function getActivate($code){\n\t\t\n\t\t//find the user where activate_code is same and active is false\n\t\t$user =\tUser::where('activate_code','=',$code);\n\n\t\t//If user found\n\t\tif($user->count()){\n\t\t\t\n\t\t\t//get user data\n\t\t\t$user=$user->first();\n\t\t\t\n\t\t\t//update user active state\n\t\t\t$user->active\t\t\t=\t1;\n\t\t\t$user->activate_code\t=\t'';\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\t\t\t\t//redirect to login page with success msg\n\t\t\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAccount has been activated. <br/>You can login now.\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\t\t}\n\n\t\t//redirect to login page with alternative success msg\n\t\treturn Redirect::route('account-login')->with('account-active-msg','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYour account already activated. <br/>You can login now.\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t}",
"public static function setUserActivationCode($userId, $activationCode){\r\n Doctrine_Query::create()->update('Users')\r\n ->set('ActivationCode',\"'\".$activationCode.\"'\")\r\n ->where('Id = ? ',$userId)\r\n ->execute();\r\n return true;\r\n }",
"public function activation($hash, $email, $option) {\n if ($this->db->update($this->tablename,array('active'=>$option),array(\"hash\"=>$hash, \"email\"=>$email))) {\n $status = ($option == 1) ? 'activated':'deactivated';\n $result['status'] = true;\n $result['msg'] = \"Account successfully $status\";\n } else {\n $result['status'] = false;\n }\n return $result;\n }",
"public function userActivation($email, $code)\n {\n if ($this->checkActivationUser($email, $code)) {\n $sql = \"UPDATE user SET status=1, activeDate = NOW() WHERE email='$email'\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return 1;\n } else {\n return 0;\n }\n }",
"public function activateUser($request)\r\n {\r\n /*\r\n * When registration has done you must activate your account to log in.\r\n * (Application will show you message \"You must confirm account\")\r\n */\r\n\r\n\r\n /*\r\n * In database we want to set field IsActivated to '1'\r\n */\r\n $params = [\r\n 'IsActivated' => '1'\r\n ];\r\n\r\n /*\r\n * Update row in user table where Activativon ==$request['activation']<---\r\n */\r\n $this->primary = 'Activation';\r\n $this->update($request['activation'], $params);\r\n\r\n }",
"public function checkActivationUser($email, $code)\n {\n $sql = \"SELECT id FROM `user` WHERE `email` = '$email' and `activationCode`='$code'\";\n $query = $this->db->prepare($sql);\n $query->execute();\n $result = $query->fetchAll();\n $count = sizeof($result);\n if ($count > 0)\n return true;\n else return false;\n }",
"public function verify_account($account_id, $verification_code)\n {\n $this->db->select('verification_code');\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $real_verification_code = $this->db->get('accounts')->row();\n if (!empty($real_verification_code))\n {\n $real_verification_code = $real_verification_code->verification_code;\n if (!empty($real_verification_code) && $real_verification_code === $verification_code)\n {\n // Set the account to be activated/verified/validated in the database\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $this->db->update('accounts', array('is_verified' => true, 'verification_code' => NULL));\n return true;\n }\n }\n return false;\n }",
"public static function activate($id) {\n\t\t$user = UserQuery::create()->findOneById($id);\n\t\tif (!empty($user)) {\n\t\t\t$user->setActive(1);\n\t\t\ttry {\n\t\t\t\t$user->save();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (PropelException $exp) {\n\t\t\t\tif (ConfigModule::get(\"global\",\"showPropelExceptions\"))\n\t\t\t\t\tprint_r($exp->getMessage());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function verification() {\n\t\t$reffer_code = $_REQUEST['user_reffer_code'];\n\t\t$code = $_REQUEST['user_verification_code'];\n\t\t$mobile = $_REQUEST['user_mobile_no'];\n\t\t//$token = $_POST['token'];\n\t\tif (!empty($code)) {\n\n\t\t\t// Refferal amount\n\t\t\t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t//-----------------/////\n\n\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_contact_no', $mobile);\n\t\t\tif (!empty($records)) {\n\n\t\t\t\t$user_id = $records['0']['user_id'];\n\t\t\t\t$token = $records['0']['user_verified_code'];\n\t\t\t\t$status = $records['0']['user_mobile_verify_status'];\n\t\t\t\t$user_email = $records['0']['user_email'];\n\t\t\t\t$user_self_reffer = $records['0']['user_refferal_code'];\n\t\t\t\t$wallet_amount = $records[0]['wallet_amount'];\n\t\t\t\t$user_profile_pic = $records[0]['user_profile_pic'];\n\t\t\t\tif (!empty($user_profile_pic)) {\n\t\t\t\t\tif (filter_var($user_profile_pic, FILTER_VALIDATE_URL)) {\n\t\t\t\t\t\t$img = $user_profile_pic;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$img = self_img_url . $user_profile_pic;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$img = '';\n\t\t\t\t}\n\t\t\t\tif ($code != $token) {\n\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Invalid Varification code');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t} else if ($code == $token) {\n\t\t\t\t\tif ($status == '1') {\n\t\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Already verified');\n\t\t\t\t\t\techo $this -> json($post);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t\t$data['user_mobile_verify_status'] = 1;\n\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data);\n\n\t\t\t\t\t//check reffer code\n\t\t\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\t\t\t\tif (!empty($reffer_records)) {\n\t\t\t\t\t\t$user11_id = $reffer_records['0']['user_id'];\n\n\t\t\t\t\t\t$data12['reffer_user_id'] = $user11_id;\n\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data12);\n\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t if(!empty($reffer_records)){\n\t\t\t\t\t * \t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t\t $refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t\t $user11_id = $reffer_records['0']['user_id'];\n\t\t\t\t\t $reffer_code_database = $reffer_records['0']['user_refferal_code'];\n\t\t\t\t\t $wallet = $reffer_records['0']['wallet_amount'];\n\t\t\t\t\t $frnd_number = $reffer_records['0']['user_contact_no'];\n\t\t\t\t\t $current_date=date(\"Y-m-d h:i:sa\");\n\t\t\t\t\t $transaction_id= strtotime(\"now\").mt_rand(10000000, 99999999);\n\t\t\t\t\t $wt_type=2; // credit in frnd acconnt\n\t\t\t\t\t $refferamount=$refferal_amount; // reffer amount\n\t\t\t\t\t $wt_category=9; // refferal amount recieved in wallet\n\t\t\t\t\t $wt_desc=\"Refferal amount add in your wallet using by \".substr($mobile,4);\n\t\t\t\t\t if($reffer_code == $reffer_code_database){\n\n\t\t\t\t\t $add_reffer_money = $this -> conn -> insertnewrecords('refferal_records','refferal_user_id,refferal_frnd_id,refferal_amount,refferal_date', '\"' . $user_id . '\",\"' . $user11_id . '\",\"' . $refferamount . '\",\"' . $current_date . '\"');\n\n\t\t\t\t\t $add_money = $this -> conn -> insertnewrecords('wallet_transaction','wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user11_id . '\",\"' . $current_date . '\",\"' . $wt_type . '\",\"' . $refferamount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\",\"' . $frnd_number . '\"');\n\t\t\t\t\t $data12['reffer_amount_status']=$wallet+$refferal_amount;\n\t\t\t\t\t $update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user11_id, $data12);\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t */\n\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Successfully verified\", \"mobile\" => $_REQUEST['user_mobile_no'], 'user_id' => $user_id, 'user_wallet' => $wallet_amount, 'user_email' => $user_email, 'login_type' => 1, 'user_reffer_code' => $user_self_reffer, 'profile_pic' => $img, 'user_pin_status' => '2');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$error = array('status' => \"false\", \"message\" => \"User not Exist\");\n\t\t\t\techo $this -> json($error);\n\t\t\t}\n\t\t} else {\n\t\t\t$error = array('status' => \"false\", \"message\" => \"Please Enter a valid verification code\", 'user_mobile_no' => $_POST['user_mobile_no'], 'verification_code' => $_POST['user_verification_code']);\n\t\t\techo $this -> json($error);\n\t\t}\n\t}",
"public function verify_actcode($member_email, $code){\n\t\t//$newCode = $this->make_activation_code();\n\t\t$mysql = New Mysql();\n\t\treturn($mysql->update_activation_code($member_email, $code));\n\t}",
"public function active_user($db,$data) {\n\n $sql=\"UPDATE user SET activate=true where token='$data'\";\n return $db->ejecutar($sql);\n }",
"function verify_success($user_id)\n\t\t{\n\t\t\t$statement = $this->conn_id->prepare(\"update users set is_active = 1 where user_id = :user_id\");\n\t\t\treturn $statement->execute(array(':user_id' => $user_id));\n\t\t}",
"public function getActivate($code){\n $user = Admin::where('activate_code', '=', $code)->where('active', '=', 0);\n\t\tif ($user->count()){\n\t\t\t$user = $user->first();\n\n\t\t\t$user->active = 1;\n\t\t\t$user->activate_code = '';\n\t\t\t\n\t\t\tif ($user->save()){\n\t\t\t return Redirect::secure('9gag-admin/login')->with('global', 'Congrats! We have activated your account');\n }\n \n }\n \n return Redirect::secure('/9gag-admin/login')\n ->with('global', 'we could not activate your account, \n try again late!');\n \n die();\n }",
"public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}",
"function oaupostgrad_admin_activator($email, $email_code)\n\t{\n\n\t\tglobal $Oau_auth;\n\t\t$email \t\t\t= \tsanitize($email);\n\t\t$email_code\t\t=\tsanitize($email_code);\n\t\t$deactivator\t=\t0;\n\t\t$activator \t\t=\t1;\n\n\t\t$query1 = \"SELECT `admin_Idn` FROM `administrator` WHERE `email` = '$email' AND `email_code` = '$email_code' AND `active` = $deactivator\";\n\t\t$run_query1 = mysqli_query($Oau_auth, $query1);\n\n\t\tif(mysqli_num_rows($run_query1) > 0)\n\t\t{\n\n\t\t\t$query2 = \"UPDATE `administrator` SET `active` = $activator WHERE `email` = '$email' AND `email_code` = '$email_code'\";\n\t\t\t$run_query2 = mysqli_query($Oau_auth, $query2);\n\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_completed'));\n\t\t\t\t\t\tredirect('/auth/login');\n\n\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_failed'));\n\t\t\tredirect('/auth/login');\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}",
"public static function activate($value){\n\t\t$token = new Token($value);\n\t\t$hashed_token = $token->getHash();\n\t\t\n\t\t$sql = 'UPDATE users \n\t\t\t\tSET is_active = 1,\n\t\t\t\t\tactivation_hash = NULL \n\t\t\t\tWHERE activation_hash = :hashed_token';\n\t\t$db = static::getDB();\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindValue(':hashed_token', $hashed_token, PDO::PARAM_STR);\n\t\t$stmt->execute();\n\t}",
"public function activate($userid){\r\n\t\t\t$statement = $this->con->prepare(\"UPDATE users SET status = 1 WHERE user_id = ?\");\r\n\t\t\t$statement->bind_param(\"i\", $userid);\r\n\t\t\t$statement->execute();\r\n\r\n\t\t\tif($statement) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t$statement->free_result();\r\n\t\t}",
"public function check() : int\n {\n\n /**\n * @return invalid request(1) if a code is empty ,null or undefined,\n * if not continue the next execution\n */\n\n if(!$this->code) return INVALID_REQUEST;\n\n\n /** @var $is_valid check the specified code is equal and valid */\n\n $is_valid = database::getInstance()->has('user',[\n\n \"id\" => (new Users())->get_id(),\n\n \"verification_code\" => $this->code\n\n ]);\n\n /** validation */\n\n if($is_valid) {\n\n /** @var $success if a specified code is valid\n * update the current status of \"isVerify\" attribute of a database\n * to PHONE_NUMBER_VERIFIED(1) and\n * @return the number of affected rows\n */\n\n $success = database::getInstance()->update('user',['isVerify'=>user_type::PHONE_NUMBER_VERIFIED],[\n\n \"id\"=> (new Users())->get_id()\n\n ])->rowCount();\n\n /** if has a affeted rows return valid request(2), invalid request if not */\n\n return $success ? VALID_REQUEST : INVALID_REQUEST;\n\n }\n\n\n /** return invalid request(1) if a code is not equal */\n\n return INVALID_REQUEST;\n\n\n\n }",
"function activateUser() {\n if (isset($_GET['account'])) {\n $account = htmlspecialchars($_GET['account'], ENT_QUOTES);\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT email\n FROM user\n WHERE active = 0\");\n\n if (mysql_num_rows($result) > 0){\n while ($row = mysql_fetch_object($result)) {\n if ($account == crypt($row->email, SALT)) {\n queryDatabase(\"UPDATE user SET active = 1\n WHERE email = '$row->email'\");\n \n echo '<div class=\"good\">Activation successful - Login using EMAIL/USER ID and PASSWORD</div>';\n \n break;\n }\n }\n }\n }\n}",
"function verification() {\n\t\t$reffer_code = $_REQUEST['user_reffer_code'];\n\t\t$code = $_REQUEST['user_verification_code'];\n\t\t$mobile = country_code.$_REQUEST['user_mobile_no'];\n\t\t//$token = $_POST['token'];\n\t\tif (!empty($code)) {\n\t\t\t\n\t\t\t\t// Refferal amount\n\t\t\t\t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t//-----------------/////\n\t\t\t\n\t\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_contact_no', $mobile);\n\t\t\t\tif (!empty($records)) {\n\t\t\t\t\n\t\t\t\t$user_id = $records['0']['user_id'];\n\t\t\t\t$token = $records['0']['user_verified_code'];\n\t\t\t\t$status = $records['0']['user_mobile_verify_status'];\n\t\t\t\t$user_email = $records['0']['user_email'];\n\t\t\t\t$user_self_reffer = $records['0']['user_refferal_code'];\n\t\t\t\t$wallet_amount=$records[0]['wallet_amount'];\n\t\t\t\t$user_profile_pic=$records[0]['user_profile_pic'];\n\t\t\t\tif (!empty($user_profile_pic)) \t{\n\t\t\t\t\tif (filter_var($user_profile_pic, FILTER_VALIDATE_URL)) {\n \t\t\t\t\t$img = $user_profile_pic;\n\t\t\t\t\t} else {\n \t\t\t\t\t$img = self_img_url.$user_profile_pic;\n\t\t\t\t\t}\n\t\t\t\t\t} else \t{\n\t\t\t\t\t$img = '';\t\n\t\t\t\t\t}\n\t\t\t\tif ($code != $token) {\n\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Invalid Varification code');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t} else if ($code == $token) {\n\t\t\t\t\tif($status=='1'){\n\t\t\t\t\t$post = array('status' => 'false', 'message' => 'Already verified');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t\t\t$data['user_mobile_verify_status']=1;\n\t\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user_id, $data);\n\t\t\t\t\t\n\t\t\t\t\t//check reffer code\n\t\t\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code',$reffer_code);\n\t\t\t\tif(!empty($reffer_records)){\n\t\t\t\t\t\t$user11_id = $reffer_records['0']['user_id'];\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$data12['reffer_user_id']=$user11_id;\n\t\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user_id, $data12);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif(!empty($reffer_records)){\n\t\t\t\t * \t$reffer_records = $this -> conn -> get_all_records('reffer_amount');\n\t\t\t\t$refferal_amount = $reffer_records[0]['reffer_amount'];\n\t\t\t\t\t\t\t\t\t\t$user11_id = $reffer_records['0']['user_id'];\n\t\t\t\t\t\t\t\t\t\t$reffer_code_database = $reffer_records['0']['user_refferal_code'];\n\t\t\t\t\t\t\t\t\t\t\t$wallet = $reffer_records['0']['wallet_amount'];\n\t\t\t\t\t\t\t\t\t\t\t$frnd_number = $reffer_records['0']['user_contact_no'];\n\t\t\t\t\t\t\t\t\t\t\t$current_date=date(\"Y-m-d h:i:sa\");\n\t\t\t\t\t\t\t\t\t\t\t$transaction_id= strtotime(\"now\").mt_rand(10000000, 99999999);\n\t\t\t\t\t\t\t\t\t\t\t$wt_type=2; // credit in frnd acconnt\n\t\t\t\t\t\t\t\t\t\t\t$refferamount=$refferal_amount; // reffer amount\n\t\t\t\t\t\t\t\t\t\t\t$wt_category=9; // refferal amount recieved in wallet\n\t\t\t\t\t\t\t\t\t\t\t$wt_desc=\"Refferal amount add in your wallet using by \".substr($mobile,4);\n\t\t\t\t\t\t\t\t\t\tif($reffer_code == $reffer_code_database){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$add_reffer_money = $this -> conn -> insertnewrecords('refferal_records','refferal_user_id,refferal_frnd_id,refferal_amount,refferal_date', '\"' . $user_id . '\",\"' . $user11_id . '\",\"' . $refferamount . '\",\"' . $current_date . '\"');\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$add_money = $this -> conn -> insertnewrecords('wallet_transaction','wt_user_id, wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user11_id . '\",\"' . $current_date . '\",\"' . $wt_type . '\",\"' . $refferamount . '\",\"' . $wt_category . '\",\"' . $transaction_id . '\",\"' . $wt_desc . '\",\"' . $frnd_number . '\"');\n\t\t\t\t\t\t\t\t\t\t\t$data12['reffer_amount_status']=$wallet+$refferal_amount;\n\t\t\t\t\t\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('user', 'user_id',$user11_id, $data12);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Successfully verified\", \"mobile\" => $_REQUEST['user_mobile_no'],'user_id'=>$user_id,'user_wallet'=>$wallet_amount,'user_email'=>$user_email,'login_type'=>1,'user_reffer_code'=>$user_self_reffer,'profile_pic'=>$img,'user_pin_status'=>'2');\n\t\t\t\t\techo $this -> json($post);\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$error = array('status' => \"false\", \"message\" => \"User not Exist\");\n\t\t\t\techo $this -> json($error);\n\t\t\t}\n\t\t} else {\n\t\t\t$error = array('status' => \"false\", \"message\" => \"Please Enter a valid verification code\" ,'user_mobile_no' => $_POST['user_mobile_no'],'verification_code'=>$_POST['user_verification_code']);\n\t\techo $this -> json($error);\n\t\t}\n\t}",
"public function updateVerificationCode($param) {\n $user = $this->_user->where ( StringLiterals::EMAIL, $this->decodeParam ( $param ) )->first ();\n if (count ( $user ) > 0) {\n $user->otp = '123456';\n $user->save ();\n return true;\n } else {\n\n return false;\n }\n }",
"function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }",
"function verify()\n {\n $activation = null;\n $param = getParameter();\n if (!empty($param[0])) {\n $activation = $param[0];\n }\n $resultActive = $this->model->khachhang->activeAccount($activation);\n switch ($resultActive) {\n case 1 :\n redirect('user/active_expire');\n break;\n case 2:\n redirect('user/active_success');\n break;\n case 3:\n redirect('user/active_fail');\n break;\n }\n }",
"function verify_authcode_email($authcode)\n\t{\n\t\t$user_id=$email=$code_type=$user_type=0;\n\t\tif($this->_redis)\n\t\t{\n\t\t\t$data=$this->cache->get($authcode);\t\n\t\t\tif(!empty($data))\n\t\t\t{\n\t\t\t\t$data=json_decode($data);\n\t\t\t\t$user_id=$data->user_id;\n\t\t\t\t$email=$data->email;\n\t\t\t\t$code_type=$data->code_type;\n\t\t\t\t$user_type=$data->user_type;\t\n\t\t\t\t$this->cache->delete($authcode);\n\t\t\t\t$errorcode=true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$errorcode=false;\n\t\t\t\tlog_message('error_tizi','17052:email verify code failed',array('authcode'=>$authcode));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n \t$this->db->select(\"id,user_id,email,code_type,user_type,generate_time\");\n \t$this->db->from($this->_table);\n \t $this->db->where(\"authcode\",$authcode);\n \t$this->db->where(\"has_verified\",0);\n\t\t\t$this->db->where(\"type\",Constant::VERIFY_TYPE_EMAIL);\n \t$query=$this->db->get();\n \t$total=$query->num_rows();\n \t$gen_time=$query->row()->generate_time;\n\t\t\tif($total==1&&date(\"Y-m-d H:i:s\",strtotime($gen_time.\" + \".Constant::AUTHCODE_EXPIRE_EMAIL))>date(\"Y-m-d H:i:s\"))\n \t{\n \t$id=$query->row()->id;\n \t$user_id=$query->row()->user_id;\n \t$email=$query->row()->email;\n\t\t\t\t$code_type=$query->row()->code_type;\n\t\t\t\t$user_type=$query->row()->user_type;\n \t$this->db->where('id',$id);\n \t$this->db->update($this->_table,array('has_verified'=>1,'verified_time'=>date(\"Y-m-d H:i:s\")));\n \tif($this->db->affected_rows()==1) $errorcode=true;\n\t\t\t\telse $errorcode=false;\n \t}\n \telse\n \t{\n \t\t$errorcode=false;\n \t}\n\t\t}\n return array('user_id'=>$user_id,'email'=>$email,'code_type'=>$code_type,'user_type'=>$user_type,'errorcode'=>$errorcode);\n\t}",
"public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }",
"public function userActiveByPin(Request $request){\n $validator = Validator::make($request->all(), [\n 'email' => 'required',\n 'pin' => 'required',\n ]);\n if ($validator->fails())\n {\n return response(['errors'=>$validator->errors()->all()], 422);\n }\n $obj=user::where('email',$request->email)->first();\n if($obj->pin==$request->pin){\n $obj->active=1;\n $obj->save();\n return ['message'=>'User Activted'];\n }\n return ['message'=>'Incorrect Pin'];\n }",
"function setUserActive($token)\r\n{\r\n\tglobal $mysqli,$db_table_prefix;\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\t\tSET active = 1\r\n\t\tWHERE\r\n\t\tactivation_token = ?\r\n\t\tLIMIT 1\");\r\n\t$stmt->bind_param(\"s\", $token);\r\n\t$result = $stmt->execute();\r\n\t$stmt->close();\t\r\n\treturn $result;\r\n}",
"static function chekActivateMember($username, $password, $code)\r\n\t{\r\n\t\t$username = funcs::check_input($username);\r\n\t\t$password = funcs::check_input($password);\r\n\t\t$code = funcs::check_input($code);\r\n\r\n\t\t$status = DBconnect::retrieve_value(\"SELECT isactive FROM \".TABLE_MEMBER.\"\r\n\t\t\t\t\t\t\t\t\t\t\t WHERE \".TABLE_MEMBER_USERNAME.\"='\".htmlspecialchars($username,ENT_QUOTES,'UTF-8').\"'\r\n\t\t\t\t\t\t\t\t\t\t\t AND \".TABLE_MEMBER_PASSWORD.\"='\".$password.\"'\r\n\t\t\t\t\t\t\t\t\t\t\t AND \".TABLE_MEMBER_VALIDATION.\"='\".$code.\"' \");\r\n\t\tif($status == 1)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public static function reissue_verification() {\n $email = $_POST[\"email\"];\n // Fetch whether the email is verified information\n try {\n $request = DB::query(\"SELECT `Verified` FROM `Users` WHERE `Email`=:email;\", array(\":email\" => $email));\n } catch (PDOException $e) {\n return 1;\n }\n\n // Check if the email is actually registered\n if ($request) {\n $verified_status = $request[0][\"Verified\"];\n // Determine whether the email is verified\n if ($verified_status == 1) {\n // Check if users has a password\n try {\n $pass_request = DB::query(\"SELECT `Password` FROM `Users` WHERE `Email`=:email;\", array(\":email\" => $email));\n } catch (PDOException $e) {\n return 1;\n }\n if ($pass_request) {\n return 3;\n } else {\n return 4;\n }\n } else {\n // Gather required data \n try {\n $username = DB::query(\"SELECT `Username` FROM `Users` WHERE `Email`=:email;\", array(\":email\" => $email))[0][\"Username\"];\n } catch (PDOException $e) {\n return 1;\n }\n $vercode = sha1(time());\n try {\n DB::query(\"UPDATE `Users` SET Vercode=:ver WHERE Email=:email;\", array(\":ver\" => $vercode, \":email\" => $email));\n } catch (PDOException $e) {\n return 1;\n }\n $to = $email;\n $headers = <<<MESSAGE\nFROM: George || [email protected]\nContent-Type: text/plain;\nMESSAGE;\n $subject = \"Verification code re-issue\";\n $msg = <<<EMAIL\nHi $username,\n\nYou've requested for a new verification code to be issued!\nPlease follow this <a href='https://flatdragons.com/signup.php?user=$username&ver=$vercode'>link</a> to confirm your account with us :)\n\nKind regards,\nGeorge (FlatDragons)\nEMAIL;\n mail($to, $subject, $msg, $headers);\n return 0;\n }\n } else {\n return 2;\n }\n }",
"public function confirmation($user_vericode)\n\t{\n\t\t$this->load->database();\n\t\t$this->db->where('verification_code', $user_vericode);\n\t\t$data['Active_status'] = 1;\n\t\t$this->db->update('users', $data);\n\t\t\n\t\t// view verification success page\n\t\t$this->load->view('verification_success');\n\t}",
"public function activateAccount($code, $email)\n {\n\n // define all the global variables\n global $database, $message, $functions;\n\n // escape the given strings\n $code = $this->secureInput($code);\n $email = $this->secureInput($email);\n\n // start the checks\n if (empty($code) || empty($email)) {\n $message->setError(\"Code/Email fields most not be empty\", Message::Error);\n return false;\n }\n\n // check if email exists\n if (!$functions->emailExist($email)) {\n $message->setError(\"The provided email is not in our database.\", Message::Error);\n return false;\n }\n\n // check if the given code matches the required characters\n if (strlen($code) < 20 || strlen($code) > 20) {\n $message->setError(\"The given code has to be exactly 20 characters long\", Message::Error);\n return false;\n }\n\n // check if account already has been activated\n if ($functions->isUserActivated($email, true)) {\n $message->setError(\"The account is already activated\", Message::Error);\n return false;\n }\n\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE \" . TBL_USERS_EMAIL . \" = '\" . $email . \"' AND \" . TBL_USERS_ACTIVATION_CODE . \" = '\" . $code . \"'\";\n\n // get the sql results\n $result = $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n // check if wrong code has been used\n if ($database->getQueryNumRows($result, true) < 1) {\n $message->setError(\"Wrong activation code has been used.\", Message::Error);\n return false;\n }\n\n //update the user account with the needed information\n $sql = \"UPDATE \" . TBL_USERS . \" SET \" . TBL_USERS_ACTIVATED . \" ='1',\" . TBL_USERS_ACTIVATION_CODE . \"='' WHERE \" . TBL_USERS_EMAIL . \" = '\" . $email . \"' AND \" . TBL_USERS_ACTIVATION_CODE . \" = '\" . $code . \"'\";\n\n // get the sql results\n $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n $message->setSuccess(\"Your account has been activated successfully !\");\n return true;\n }",
"public function activate($id)\n {\n $user = User::find($id);\n $user->user_status=\"Active\";\n $user->save();\n return redirect()->route('userdisp');\n }",
"static public function tryToActivateAccount() {\r\n\t\tDB::getInstance()->stopAddingAccountID();\r\n\t\t$Account = DB::getInstance()->query('SELECT id FROM `'.PREFIX.'account` WHERE `activation_hash`='.DB::getInstance()->escape($_GET['activate']).' LIMIT 1')->fetch();\r\n\t\tDB::getInstance()->startAddingAccountID();\r\n\r\n\t\tif ($Account) {\r\n\t\t\tDB::getInstance()->update('account', $Account['id'], 'activation_hash', '');\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public function requestact_user($email)\n \t{\n\t//Get user info from email given/check they actually exist\n\t$users = $this->db->query_read_slave(\"\n\t\tSELECT user.userid, user.usergroupid, username, email, activationid, languageid\n\t\tFROM \".TABLE_PREFIX.\"user AS user\n\t\tLEFT JOIN useractivation AS useractivation ON(user.userid = useractivation.userid AND type = 0)\n\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\"\n\t);\n\t//If they exist then carry on\n\tif ($this->db->num_rows($users))\n\t{\n\t\t//Loop through everyone with the same email address\n\t\twhile ($user = $this->db->fetch_array($users))\n\t\t{\n\t\t\t//Only work on those who are still not activated\n\t\t\tif ($user['usergroupid'] == NOACTIVATION_USERGROUP)\n\t\t\t{ \n\t\t\t\t//If they for some crazy reason do not have an activation ID then...\n\t\t\t\tif (empty($user['activationid']))\n\t\t\t\t{ \n\t\t\t\t\t//Create a new activation ID for the user\n\t\t\t\t\t$user['activationid'] = build_user_activation_id($user['userid'], 2, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//If they already have an activation ID we'll update the current entry with a new ID\n\t\t\t\t\t$user['activationid'] = fetch_random_string(40);\n\t\t\t\t\t$this->db->query_write(\"\n\t\t\t\t\t\tUPDATE \".TABLE_PREFIX.\"useractivation SET\n\t\t\t\t\t\t\tdateline = \" . TIMENOW . \",\n\t\t\t\t\t\t\tactivationid = '$user[activationid]'\n\t\t\t\t\t\tWHERE userid = $user[userid]\n\t\t\t\t\t\t\tAND type = 0\n\t\t\t\t\t\");\n\t\t\t\t}\n\t\t\t\t//Set some required VB variables (for the email)\n\t\t\t\t$userid = $user['userid'];\n\t\t\t\t$username = $user['username'];\n\t\t\t\t$activateid = $user['activationid'];\n\t\t\t\t//Send out activation email, note the custom vbulletin phrase for the \"main\" site!\n\t\t\t\teval(fetch_email_phrases('activateaccount', $user['languageid']));\n\t\t\t\t//Actually send the email\n\t\t\t\tvbmail($user['email'], $subject, $message, true);\n\t\t\t}\n\t\t}\n\t\t//Return as a success\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn \"No account with that email address exists, please try again.\";\n\t}\n\t}",
"public function actionVerifyRegistration()\n {\n // get hash code from url\n $hash = Yii::app()->getRequest()->getQuery('hash');\n // activate account\n $model = Profiles::model()->findByAttributes(array('PRF_RND'=>$hash));\n if($model!==null){\n $model->PRF_ACTIVE = '1';\n $model->save();\n\t\tYii::app()->user->setFlash('register','Thank you for your verification. You can now login using the following link.');\n//$this->refresh();\n } else {\n\t\tYii::app()->user->setFlash('register','Hash value invalid, cannot verification user.');\n\t }\n\t //echo $hash . \"<br>\\r\\n\";\n\t //print_r($model);\n $this->checkRenderAjax('register',array('model'=>$model,));\n }",
"public function verify(){\n\t\t// getting the username and code from url\n\t\t$code=$_GET['c'];\n\t\t$user=$_GET['u'];\n\t\t// load the regmod model\n\t\t$this->load->model('regmod');\n\t\t// calling the function Vemail that check the valodation code with the username\n\t\t$flag=$this->regmod->Vemail($user,$code);\n\t\t// checking the Vemail the respond\n\t\tif($flag)\n\t\t\t{$data['res']= \"You have successfully verified your email. You may login to Hungry.lk with your username and password\";}\n\t\telse\n\t\t\t{$data['res']= \"Opps An error occurred in our system, try again later\";}\n\t\t$this->load->view(\"register_status_view\",$data);\n\t}",
"public function setInactive(){\n\t\t\t \t$this->isActive = false;\n\t\t\t \t$this->save();// Make sure the record is saved\n\t\t\t \t\n\t\t\t \t$token = random_text(5);\n\t\t\t \t$query = sprintf('INSERT INTO %sPENDING (USER_ID, TOKEN) VALUES (%d, \"%s\")', DB_TBL_PREFIX, $this->uid, $token);\n\t\t\t \treturn (mysql_query($query, $GLOBALS['DB'])) ? $token : false;\n\t\t\t }",
"function setUserActive($token) // activate-account.php, admin_user.php\r\n \r\n{\r\n global $mysqli,$db_table_prefix;\r\n\r\n\t$stmt = $mysqli->prepare(\"UPDATE \".$db_table_prefix.\"users\r\n\r\n\t\tSET active = 1\r\n\r\n\t\tWHERE\r\n\r\n\t\tactivation_token = ?\r\n\r\n\t\tLIMIT 1\");\r\n\r\n\t$stmt->bind_param(\"s\", $token);\r\n\r\n\t$result = $stmt->execute();\r\n\r\n\t$stmt->close();\t\r\n\r\n\treturn $result;\r\n\t\r\n}",
"function emailVerification($conn){\r\n\t\t@extract($_REQUEST);\r\n\t\t$query =\"select email,id,verified_status from user where encryption_key='\".$q.\"'\";\r\n\t\t$result =$conn->query($query);\r\n\t\tif($result->num_rows > 0){\r\n\t\t\twhile($row = $result->fetch_object()) {\r\n\t\t\t\t//session_destroy();\r\n\t\t\t\t$update=\"update user set encryption_key='',verified_status=0 where id='\".$row->id.\"'\";\r\n\t\t\t\t$conn->query($update);\r\n\t\t\t\t$_SESSION['email']=$row->email;\r\n\t\t\t\t$_SESSION['userId']=$row->id;\r\n\t\t\t}\r\n\t\t\theader(\"Location:index.php?page=createPassword\");\r\n\t\t\texit;\r\n\t\t} else {\r\n\t\t\techo \"<h3 style='text-align:center'>This link valid one time only.</h3>\"; \r\n\t\t}\r\n\t}",
"function activateMember($username, $password, $code, $adv=0)\r\n\t{\r\n\t\t$username = funcs::check_input($username);\r\n\t\t$password = funcs::check_input($password);\r\n\t\t$code = funcs::check_input($code);\r\n\t\t$adv = funcs::check_input($adv);\r\n\r\n\t\t$sql = \"SELECT COUNT(*) FROM \".TABLE_MEMBER.\"\r\n\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_PASSWORD.\"='\".$password.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_VALIDATION.\"='\".$code.\"'\r\n\t\t\t\t\t\tAND \".TABLE_MEMBER_ISACTIVE.\"=0\r\n\t\t\t\t\t\tAND signin_datetime = '0000-00-00 00:00:00'\";\r\n\t\t$row = DBconnect::get_nbr($sql);\r\n\r\n\t\tif($row > 0)\r\n\t\t{\r\n\t\t\t$vcode = funcs::randomPassword(6);\r\n\t\t\t$sql = \"UPDATE \".TABLE_MEMBER.\" SET \".TABLE_MEMBER_ISACTIVE.\"=1, coin='\".FREECOINS.\"', validation_code = '$vcode', isactive_datetime=NOW()\r\n\t\t\t\t\t\tWHERE \".TABLE_MEMBER_USERNAME.\"='\".$username.\"' LIMIT 1\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\t$userid = funcs::getUserid($username);\r\n\t\t\t//INSERT COIN LOG\r\n\t\t\t$coinVal = funcs::checkCoin($username);\r\n\t\t\t$sqlAddCoinLog = \"INSERT INTO coin_log (member_id, send_to, coin_field, coin, coin_remain, log_date) VALUES ('1','$userid','Activate Member',\".FREECOINS.\",\".$coinVal.\", NOW())\";\r\n\t\t\tDBconnect::execute($sqlAddCoinLog);\r\n\r\n\t\t\t$subject = funcs::getText($_SESSION['lang'], '$first_time_inbox_subject');\r\n\t\t\t$message = funcs::getText($_SESSION['lang'], '$first_time_inbox_message');\r\n\t\t\t$sql = \"INSERT INTO \".TABLE_MESSAGE_INBOX.\"\r\n\t\t\t\t\tSET \".TABLE_MESSAGE_INBOX_TO.\"=\".$userid.\",\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_FROM.\"=2,\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_SUBJECT.\"='\".mysql_real_escape_string($subject).\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_MESSAGE.\"='\".mysql_real_escape_string($message).\"',\r\n\t\t\t\t\t\".TABLE_MESSAGE_INBOX_DATETIME.\"='\".funcs::getDateTime().\"'\";\r\n\t\t\tDBconnect::execute($sql);\r\n\r\n\t\t\tfuncs::preventMultipleRegister($username);\r\n\r\n\t\t\t#Pakin Change this function\r\n\t\t\tself::NewSorting($username);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public function _checkAndGetUserActive()\n {\n return $this->find('id_user,name,lastname,email,salt,password', [\n 'username' => $this->username,\n 'sw_active' => 1\n ]);\n }",
"function checkRegistered(){\n $registered_user=User::find('all',array('conditions' => array('email=? and active=1',$this->email)));\n $registered_user_id='';\n if(!empty($registered_user)){\n foreach($registered_user as $user){\n $registered_user_id=$user->id;\n }\n $this->user_id=$registered_user_id;\n }\n return null;\n }",
"public function activate($id, $code)\n {\n if(!is_numeric($id))\n {\n // @codeCoverageIgnoreStart\n return \\App::abort(404);\n // @codeCoverageIgnoreEnd\n }\n\n $result = $this->user->activate($id, $code);\n\n if( $result['success'] )\n {\n // Success!\n Session::flash('success', $result['message']);\n return Redirect::route('home');\n\n } else {\n Session::flash('error', $result['message']);\n return Redirect::route('home');\n }\n \n }",
"public function user_activation($data) {\n $usersDetails = ClassRegistry::init('User')->find('first', array('conditions' => array('User.id' => $data['user_id'])));\n\n if(isset($data['password']) && !empty($data['password'])) {\n $userPass = $data['password'];\n }\n else{\n $userPass = $usersDetails['UserDetail']['org_password'];\n\t\t\t$sqlN = \"select AES_DECRYPT(org_password, 'secret') as org_password from user_details WHERE user_details.user_id =\".$data['user_id'];\n\n\t\t $dd = ClassRegistry::init('User')->query($sqlN);\n\n\t\t\t$userPass = $dd[0][0]['org_password'];\n\n }\n\n $domain_url = SITEURL;\n\n $endc = safeEncrypt($usersDetails['User']['email']);\n $activation_url = 'users/activate_account/'.$endc;\n\n $emailAddress = $usersDetails['User']['email'];\n $email = new CakeEmail();\n $email->config('Smtp');\n $email->from(array(ADMIN_FROM_EMAIL => MAIL_SITENAME));\n $email->to($emailAddress);\n $email->subject(\"OpusView: Account activation\");\n $email->template('user_activation');\n $email->emailFormat('html');\n $email->viewVars(array('receiver' => $usersDetails['UserDetail']['first_name'] . ' ' . $usersDetails['UserDetail']['last_name'], 'username' => $usersDetails['User']['email'], 'password' => $userPass, 'domain_url' => $domain_url, 'activation_url' => $activation_url));\n $email->send();\n return true;\n }",
"public function activate($token, $id){\n $conn = Db::getConnection();\n $statement = $conn->prepare('update user set active=1 where userID = :userID and token = :token');\n $statement->bindParam(':userID', $id);\n $statement->bindParam(':token', $token);\n $result = $statement->execute();\n if($result){\n $user = $this->getUserById($id);\n $_SESSION['user_id'] = $user;\n //$_SESSION['user_id'] = $id;\n header(\"Location: hobby.php\");\n }\n\n return $result;\n }",
"public function activate()\n {\n $activate = new updates;\n $activate->userid =Auth::User()->id;\n $activate->save();\n\n DB::update('update users set userlevel = ? where id = ?',[2,1]);\n \n return redirect('editor')->with('status',' First id changed');\n }",
"private static function verify() {\r\n\t\t// create code object for the given code we will be verifying\r\n\t\tif (!isset($_SESSION['user'])) {\r\n\t\t\tself::alertMessage('danger', 'Unable to find session user data. Try logging out and logging in again.');\r\n\t\t\tVerificationView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$userID = $_POST['userID'] = $_SESSION['user']->getUserID();\r\n\t\t$code = new VerificationCode($_POST);\r\n\r\n\t\t// load and validate expected code from database\r\n\t\t$codeInDatabase = VerificationCodesDB::get($userID);\r\n\t\tif (is_null($codeInDatabase)) {\r\n\t\t\tself::alertMessage('danger', 'No active verification code found. Your code may have expired. Click \"Resend Code\" to send a new code to your phone.');\r\n\t\t\tVerificationView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// compare given/expected codes\r\n\t\tif ($code->getCode() !== $codeInDatabase->getCode()) {\r\n\t\t\tself::alertMessage('danger', 'The code you entered is incorrect. Please check your code and try again.');\r\n\t\t\tVerificationView::show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// verification successful. mark phone number as verified\r\n\t\t$user = UsersDB::getUser($userID);\r\n\t\t$user->setIsPhoneVerified(true);\r\n\t\tUsersDB::edit($user);\r\n\t\t$_SESSION['user'] = $user;\r\n\r\n\t\t// clean up and show dashboard\r\n\t\tVerificationCodesDB::clear($userID);\r\n\t\tDashboardView::show();\r\n\t}",
"function register_user($first_name, $last_name, $username, $password, $email){\n\n // call the escape function to escape the variable \n // to prevent sql injecction \n\n $first_name = escape($first_name); \n $last_name = escape($last_name);\n $username = escape($username);\n $password = escape($password);\n $email = escape($email);\n \n\n // if the user enters an email that is already taken \n // deny the registration\n\n if(email_exists($email)){\n \n return false; \n }\n\n // if the user enters a username that is already taken\n // deny the registration \n else if(username_exists($username)){\n\n return false; \n\n } \n else \n { // if the user information is verified proceed to insertion in the user table \n\n\n // encrypt the message using password to encrypt the message \n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12));\n\n $validation_code = md5($username . microtime()); // create random validation codes\n\n // insert the user information to the user table with the validation code\n // Also make sure that the user activation state is set to 0 for this moment \n $sql = \"INSERT INTO users(first_name, last_name, username, password ,validation_code, active, email)\";\n $sql.= \"VALUES('$first_name','$last_name','$username','$password','$validation_code',0, '$email')\";\n\n $result = query($sql); // send the information\n\n // send a link to the user email with the validation code\n $subject = \"Activate Account\";\n $msg = \"Please click the link below to activate your account \n \n <a href =\\\"\".Config::DEVELOPMENT_URL.\"/activate.php?email=$email&code=$validation_code\\\">\n \n LINK HERE</a>\"; \n \n \n // setup a email header \n $headers = \"From: noreply@localhost\";\n\n // send the link\n send_email($email, $subject, $msg, $headers);\n\n return true;\n \n }\n}",
"public function verify_user_post()\n {\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $id = $data['id'];\n $status = $data['status'];\n $data = array(\n 'is_verified' => $status\n );\n $where = array(\n 'id' => $id\n );\n $this->model->update('users', $data, $where);\n \n $resp = array('rccode' => 200,'message' =>'success');\n $this->response($resp);\n }",
"function register_user($first_name,$last_name,$username,$email,$password)\n{\n $first_name = escape($first_name);\n $last_name = escape($last_name);\n $username = escape($username);\n $email = escape($email);\n $password = escape($password);\n if (email_exists($email)) {\n return false;\n } elseif (username_exists($username)) {\n return false;\n } else {\n $password = md5($password);\n $validation_code = md5($username . microtime());\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\n $sql .= \" VALUES('$first_name','$last_name','$username','$email','$password','$validation_code',0)\";\n $result = query($sql);\n\n ///// sending email////////\n $subject = \"Activate Account\";\n $msg = \" Please click the link below to activate your account\n http://localhost/login/activate.php?email=$email&code=$validation_code \n \";\n $headers = \"From: [email protected]\";\n send_email($email, $subject, $msg, $headers);\n\n return true;\n }\n\n}",
"public function actionActivation() {\n\t\t$email = NData::base64UrlDecode($_GET['e']);\n\t\t$activekey = $_GET['activekey'];\n\t\tif ($email&&$activekey) {\n\t\t\t$user = UserModule::userModel()->notsafe()->findByAttributes(array('email'=>$email));\n\t\t\tif(isset($user) && $user->email_verified == 0 && $user->status == 1){\n\t\t\t\t// user is active but has not verified his email\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t\t$this->render('message',array('title'=>UserModule::t(\"Email Verfied\"),'content'=>UserModule::t(\"Thank you! We now know you are you!\")));\n\t\t\t} elseif (isset($user) && $user->status==1 && $user->email_verified==1) {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Your account is active.\")));\n\t\t\t} elseif(isset($user->activekey) && $this->checkActivationKey($user, $activekey)) {\n\t\t\t\t$user->activekey = crypt(microtime());\n\t\t\t\t$user->status = 1;\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t $this->render('activation');\n\t\t\t\t$e = new CEvent($this, array('user'=>$user));\n\t\t\t\tUserModule::get()->onActivation($e);\n\t\t\t} else {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t}\n\t}",
"public function checkoutInvite($id,$status,$cell_number){\n // return $changeStatus;\n return DB::table('visitor_pass')->where('id', $id)->update(['invitation_status'=>$status]);\n }",
"public function actionEmailverification() {\n if (Yii::$app->request->get('id') && Yii::$app->request->get('key')) {\n\n $access_token = Yii::$app->request->get('id');\n $key = Yii::$app->request->get('key');\n\n $customers = \\app\\models\\Customers::find()\n ->leftjoin('user_token', 'user_token.user_id=users.id')\n ->where(['access_token' => $access_token])\n ->andWhere(['token' => $key])\n ->one();\n\n\n if (count($customers)) {\n\n $customers->profile_status = 'ACTIVE';\n $customers->save();\n $user_token = \\app\\models\\UserToken::find()\n ->where(['token' => $key])\n ->andWhere(['user_id' => $customers->id])\n ->one();\n $user_token->delete();\n Yii::$app->session->setFlash('success', 'Your account verified successfully.');\n \\app\\components\\EmailHelper::welcomeEmail($customers->id);\n } else {\n Yii::$app->session->setFlash('danger', 'Illegal attempt1.');\n }\n } else {\n Yii::$app->session->setFlash('danger', 'Illegal attempt2.');\n }\n return $this->render('emailverification');\n }",
"private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }",
"function activate($uID=\"\") {\n if(!$uID) {\n echo \"Need uID to deactivate!! - error dump from User_class.php\";\n exit;\n }\n $SQL = \"UPDATE User \".\n \"SET Active = '1' \".\n \"WHERE ID = $uID\";\n mysqli_query($this->db_link, $SQL);\n\n }",
"function activate_member($email){\n $email = trim($email);\n $con=mysqli_connect(DB_SERVER,DBASE_USER,DBASE_PASS,DBASE_NAME);\n $query=\"UPDATE member SET member_active = 1 WHERE email='$email'\";\n (mysqli_query($con,$query))?TRUE: FALSE;\n}",
"function setUserActive($token) {\n global $mysqli, $db_table_prefix;\n $stmt = $mysqli->prepare(\"UPDATE \" . $db_table_prefix . \"users\n\t\tSET active = 1\n\t\tWHERE\n\t\tactivation_token = ?\n\t\tLIMIT 1\");\n $stmt->bind_param(\"s\", $token);\n $result = $stmt->execute();\n $stmt->close();\n return $result;\n}",
"function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key))\n\t\t{\n\t\t\t// success\n\t\t\t//Add it into newletter\n\t\t\t$user = $this->database->GetUserById($user_id);\n\t\t\tadd_subscriber($user['email'], $user['username']);\n\t\t\t\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}",
"public function reActivate()\n {\n $response = $this->response();\n $config = [\n ['field' => 'userid', 'label' => '', 'rules' => 'trim|required|integer'],\n ['field' => 'activationemail', 'label' => '', 'rules' => 'trim|required|min_length[4]|max_length[100]|valid_email']\n ];\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() === false) {\n $response[\"errors\"] = $this->form_validation->error_array();\n $this->output->set_output(json_encode($response));\n return false;\n }\n $userID = $this->input->post('userid');\n $email = $this->input->post('activationemail');\n if ($this->oauth_web->reActivate($userID, $email) === true) {\n $response[\"status\"] = true;\n $response[\"msg\"] = $this->lang->line(\"reActivate_ok\");\n }\n $this->output->set_output(json_encode($response));\n }",
"public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }",
"function register_user($first_name, $last_name, $username, $email, $password){\r\n\r\n $first_name = escape($first_name);\r\n $last_name = escape($last_name);\r\n $username = escape($username);\r\n $email = escape($email);\r\n $password = escape($password);\r\n\r\n if(email_exists($email)){\r\n return false;\r\n } elseif (username_exists($username)) {\r\n return false;\r\n } else {\r\n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12)); //md5($password);\r\n $validation_code = md5($username . microtime());\r\n\r\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\r\n $sql.= \" VALUES('$first_name', '$last_name', '$username', '$email', '$password', '$validation_code', 0)\";\r\n $result = query($sql);\r\n confirm($result);\r\n \r\n $subject = \"Activate account\";\r\n $msg = \" Please click the link below to activate your Account\r\n\r\n <a href=\\\"\".Config::DEV_URL.\"/activate.php?email={$email}&code={$validation_code}\\\">Reset Password</a>\r\n \";\r\n\r\n $headers = \"From: [email protected]\";\r\n\r\n send_email($email, $subject, $msg, $headers);\r\n\r\n return true;\r\n }\r\n return false;\r\n}",
"function testActivateSuccess() {\r\n $this->User =& new User();\r\n \r\n \t//check if the user is not activated yet\r\n \t$activated = $this->User->field('activated', array('id'=>'1'));\r\n \t$this->assertEqual('no', $activated);\r\n \r\n \t// should activate the first user.\r\n $result = $this->User->activate('1bc29b36f623ba82aaf6724fd3b16718');\r\n $this->assertTrue($result);\r\n \t\t\r\n \t\t//check if the activation really worked\r\n \t$activated = $this->User->field('activated', array('id'=>'1'));\r\n \t$this->assertEqual('yes', $activated);\r\n \t\r\n \t\r\n \t\r\n \t//test done, set data back to original values...\r\n \t$this->User->id = 1;\r\n \t$this->User->saveField('activated', 'no');\r\n }",
"function setUserActive($token) {\n // Check that token exists\n if (!valueExists('users', 'activation_token', $token)){\n addAlert(\"danger\", \"Invalid token specified.\");\n return false;\n }\n\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $sqlVars = array();\n\n $query = \"UPDATE \".$db_table_prefix.\"users\n SET active = 1\n WHERE\n activation_token = :token\n LIMIT 1\";\n\n $stmt = $db->prepare($query);\n\n $sqlVars[':token'] = $token;\n\n if (!$stmt->execute($sqlVars)){\n // Error: column does not exist\n return false;\n }\n\n return true;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n } catch (RuntimeException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n }\n}",
"function check_activation($email,$activation)\n {\n return $q = DB::table(\"admin_tbl\")->where(\"email\",$email)->where(\"status\",$activation)->first();\n }",
"function acceptInvite($invite_id,$user_id,$status)\n\t\t{\n\t\t\t\n\t\t\t$where_cond = array(\"status\"=>$status);\n\t\t\t$this->db->where('id',$invite_id);\n\t\t\tif($this->db->update('da_invite_milking_machine_cleaning',$where_cond))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"function validate($userId){ \n try{\n $validateUserQuery = $this->db->query(\"UPDATE user set verificationCode='DONE' where user.id='\".$userId.\"'\");\n }catch(Exception $e){\n throw new Exception('Error: ' . $e->getMessage());\n }\n }",
"public function verifyUserbyHash($hash){\r\n $this->db->query('SELECT * FROM users WHERE reset=:hash');\r\n $this->db->bind(':hash', $hash);\r\n\r\n if($row = $this->db->fetcher()){\r\n if($row['active'] == 1){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n else\r\n return false;\r\n}",
"public function active_userstatus($id)\n {\n \n $query = new Query;\n\n $result = $query->createCommand()->update('core_users', ['user_status' => '2'], 'user_id = \"'.$id.'\"')->execute();\n\n if ($result == 1){\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\n }",
"function activateUserById($user_id){\n if (!userIdExists($user_id)){\n addAlert(\"danger\", lang(\"ACCOUNT_INVALID_USER_ID\"));\n return false;\n }\n\n try {\n global $db_table_prefix;\n\n $db = pdoConnect();\n\n $sqlVars = array();\n\n $query = \"UPDATE \".$db_table_prefix.\"users\n SET active = 1\n WHERE\n id = :user_id\n LIMIT 1\";\n\n $stmt = $db->prepare($query);\n $sqlVars[':user_id'] = $user_id;\n $stmt->execute($sqlVars);\n\n return true;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n } catch (RuntimeException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n }\n}",
"public function verify($user_id, $user_activation_verification_code)\n {\n if (isset($user_id) && isset($user_activation_verification_code)) {\n RegistrationModel::verifyNewUser($user_id, $user_activation_verification_code);\n $this->View->render('user/verify');\n } else {\n Redirect::to('index');\n }\n }",
"public function send_sms_verification_code()\n\t{\n\t\t$user_id = Input::get('userId');\n\t\t$phone_number = Input::get('phoneNumber');\n\n\t\t// check if a verify record already exists\n\t\t$verify_record = $this->notifyRepo->smsVerificationCodeByUserId($user_id);\n\n\t\t// create the code, save it, send to user\n\t\t$verify_record = $this->notifyRepo->smsSendVerifyCode($user_id, $phone_number, $verify_record);\n\n\t\t$result = Twilio::message('+'.$phone_number, 'EriePaJobs - Your verification code is '.$verify_record->verification_code);\n\t}",
"public function update_new_user(){\n\t\t$this->data[\"activationCode\"] = $this->make_activation_code();\n\t\tif( $this->send_email($this->get_activation_msg($this->data[\"activationCode\"])) ){\n\t\t\t$mysql = New Mysql();\n\t\t\treturn( $mysql->update_user($this->data[\"name\"], $this->data[\"lastname\"], $this->data[\"email\"], $this->data[\"password\"], $this->data[\"joinDate\"], $this->data[\"lastAccess\"], $this->data[\"activationCode\"]) );\n\t\t}\t\n\t}",
"public function adminConfirmUserReg($id)\n\t\t{\n\t\t\t$query = \"SELECT id,active,act_key FROM users WHERE id = '\".$id.\"' AND act_key !='' \";\n\n\t\t\tif($this->resultNum($query)==1)\n\t\t\t{\n\t\t\t\t$row = $this->fetchOne($query);\n\t\t\t\t$id = $row['id'];\n\t\t\t\tif($row['active']==0)\n\t\t\t\t{\n\t\t\t\t\t$update = $this->processSql(\"UPDATE users SET active=1,act_key='',online='OFF' WHERE id = '\".$id.\"'\");\n\t\t\t\t\tif($update){\n\t\t\t\t\t\treturn 99;\n\t\t\t\t\t} else return 1;\n\t\t\t\t}\n\t\t\t\tif($row['active']==1)\n\t\t\t\t{\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}",
"public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }",
"public function confirmation(Request $req, $id)\n { \n $this->check_account($req);\n\n $user = User::find($id);\n $user->status = 'active';\n $user->save();\n\n echo \"Your account Already Activated! Please Login on Apps\";\n }",
"public function testIsVerificationCodeValidForUser()\n {\n $this->ensurePasswordValidationReturns(true);\n Craft::$app->getConfig()->getGeneral()->verificationCodeDuration = 172800;\n\n $this->updateUser([\n // The past.\n 'verificationCodeIssuedDate' => '2018-06-06 20:00:00',\n ], ['id' => $this->activeUser->id]);\n\n $this->assertFalse(\n $this->users->isVerificationCodeValidForUser($this->activeUser, 'irrelevant_code')\n );\n\n // Now the code should be present - within 2 day window\n $this->updateUser([\n // The present.\n 'verificationCodeIssuedDate' => Db::prepareDateForDb(new DateTime('now')),\n ], ['id' => $this->activeUser->id]);\n\n $this->assertTrue(\n $this->users->isVerificationCodeValidForUser($this->activeUser, 'irrelevant_code')\n );\n }",
"function register_member($username, $password, $email) {\r $dat = $this->get_member($username);\r $row = $this->db->fetch_array($dat);\r \r if ($row[\"id\"]) {\r ## user already exists, return..\r return -10;\r } else {\r ## not found, good to add..\r $code = $this->rand_str(20);\r $pass = md5($password);\r $sql = \"INSERT INTO \".$GLOBALS[\"c_ext\"].\".members \r (email, username, password, full_name, status, accesslevel, auth_key) \r VALUES (\r '\" . addslashes($email) . \"',\r '\" . addslashes($username) . \"',\r '\" . addslashes($pass) . \"',\r '',\r 0,\r 0,\r '\" . $code . \"')\";\r $this->debug .= $sql . \"<br>\";\r $r = $this->db->query($sql);\r if (!$r) {\r handleError($GLOBALS[\"SCRIPT_NAME\"], $this->db->errors);\r } else {\r $_id = $this->db->insert_id();\r }\r\r ### send an email... \r $subject = \"Armory Lite - Account Activation\";\r $headers = \"From: no-reply@\".$GLOBALS[\"g_ext\"].\".com\";\r $body = \"\r\r Hi \" . ucfirst($username) . \" - welcome to Armorylite!\r \r To activate your account, please visit the following link:\r \r http://armorylite.com/activate.php?c=\" . $code . \"\r \r Thanks for using Armory Lite! \r \r \";\r if (mail($email, $subject, $body, $headers)) {\r return 1;\r } else {\r return -11; \r }\r }\r }",
"function activateNewsletter() {\n\t\t$hash = t3lib_div::_GP('nlAuth');\n\t\t$userID = t3lib_div::_GP('u');\n\n\t\t// get the whole row\n\t\t$row = current($GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', 'fe_users', 'uid=' . $userID ));\n\t\t$realHash = substr(sha1(serialize($row)), 1, 6); // first 6 letters from hash\n\t\tif ( $row['disable'] && ($realHash == $hash) ) { // hash matches\n\t\t\t// enable the user\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery( 'fe_users', 'uid=' . $userID, array(\n\t\t\t\t'uid' => $userID,\n\t\t\t\t'disable' => '0' ) );\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function addUser($data)\n{\n global $link;\n $username = $data['Username'];\n $hashedPassword = password_hash($data['Password'], PASSWORD_BCRYPT);\n $firstName = $data['FirstName'];\n $lastName = $data['LastName'];\n $address = $data['Address'];\n $email = $data['EmailAddress'];\n $activationCode = uniqid($username);\n $query = \"insert into Users(username,password,firstname,lastname,address,emailaddress,roleID,activationCode) values('$username','$hashedPassword','$firstName','$lastName','$address','$email',2,'$activationCode');\";\n if (mysqli_query($link, $query)) {\n sendEmailVerification(mysqli_insert_id($link), $email, $activationCode);\n } else {\n printError($link);\n }\n}",
"function activateUser($email) {\n $stmt = $this->connection->prepare(\"UPDATE \".DB_USER_TABLE.\"\n SET\n \".COL_USER_RANK.\" = 1\n WHERE \".COL_USER_EMAIL.\" = ?\");\n $stmt->bind_param(\"s\", $email);\n return $stmt->execute();\n }"
] | [
"0.72398067",
"0.70517457",
"0.70087266",
"0.70011276",
"0.69078094",
"0.6879758",
"0.67924815",
"0.67737544",
"0.6770032",
"0.6704799",
"0.6689967",
"0.6659004",
"0.659927",
"0.6586354",
"0.65828675",
"0.6580857",
"0.65530944",
"0.65491647",
"0.6547932",
"0.65355414",
"0.6533093",
"0.64695966",
"0.6463507",
"0.64543086",
"0.6454009",
"0.6435604",
"0.6427195",
"0.64178735",
"0.6414156",
"0.6411963",
"0.64118123",
"0.64094263",
"0.64005405",
"0.63896877",
"0.6378747",
"0.6357029",
"0.63568664",
"0.6346439",
"0.63386166",
"0.63266474",
"0.63240594",
"0.631382",
"0.63128936",
"0.6312386",
"0.63054514",
"0.62851524",
"0.6283527",
"0.62577236",
"0.6245776",
"0.62430453",
"0.6232153",
"0.6226483",
"0.62229353",
"0.6217657",
"0.62108386",
"0.6207048",
"0.6203915",
"0.6200658",
"0.6200568",
"0.6199295",
"0.6198076",
"0.6195465",
"0.619007",
"0.61879516",
"0.6186386",
"0.61836946",
"0.6178069",
"0.617519",
"0.6169283",
"0.6167308",
"0.61545324",
"0.6134284",
"0.6131573",
"0.6121105",
"0.6120434",
"0.6118286",
"0.6115468",
"0.6112616",
"0.61013246",
"0.60972387",
"0.6081687",
"0.6077071",
"0.60751957",
"0.60743177",
"0.60732746",
"0.60670877",
"0.60628",
"0.60627437",
"0.6060456",
"0.60592717",
"0.6053017",
"0.6047201",
"0.6038507",
"0.6033604",
"0.6014191",
"0.6012855",
"0.5996059",
"0.5986955",
"0.59840685",
"0.597971",
"0.5972213"
] | 0.0 | -1 |
Static function to calculate age with a birth date | static function calculateAge($birthDate) {
if (empty($birthDate)) {
return 0;
}
$birthDay = new DateTime($birthDate);
$toDay = new DateTime(date('Y-m-d'));
$dateDiff = $toDay->diff($birthDay);
$age = $dateDiff->y;
return $age;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ageCalculator($dob)\n{\n\tif(!empty($dob))\n\t{\n\t\t$birthdate = new DateTime($dob);\n\t\t$today = new DateTime('today');\n\t\t$age = $birthdate->diff($today)->y;\n\t\treturn $age;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n}",
"function get_age($date_of_birth) //day-month-year\n\t\t{\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\t\t\tif ($year)\n\t\t\t{\n\t\t\t\t$age = date(\"Y\") - $year;\n\t\t\t\tif (($month > date(\"m\")) || ($month == date(\"m\") && date(\"d\") < $day))\n\t\t\t\t{\n\t\t\t\t\t$age -= 1;\n\t\t\t\t}\n\t\t\t\treturn $age;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function get_age($dob){\n\t\treturn floor((time() - strtotime($dob))/31556926);\n\t}",
"function ageCalculator($dob){\n if(!empty($dob)){\n $birthdate = new DateTime($dob);\n $today = new DateTime('today');\n $age = $birthdate->diff($today)->y;\n return $age;\n }else{\n return 0;\n }\n}",
"public function getAge() {\n date_default_timezone_set('America/New_York');\n list($year,$month,$day) = explode(\"-\",$this->birthDate);\n $year_diff = date(\"Y\") - $year;\n $month_diff = date(\"m\") - $month;\n $day_diff = date(\"d\") - $day;\n if ($month_diff < 0 || ($month_diff == 0 && $day_diff < 0)) {\n $year_diff--;\n }\n return $year_diff;\n }",
"public function getAge()\n\t{\n\t\t$date_birthday = $this->getAnswer('birthday');\n\t\t$date_birthday = convert_date_to_age($date_birthday);\n\t\treturn $date_birthday;\n\n\t}",
"public function getAge() {\n\t\tif ($this->birthday) {\n\t\t\t// split date\n\t\t\t$year = $month = $day = 0;\n\t\t\t$optionValue = explode('-', $this->birthday);\n\t\t\tif (isset($optionValue[0])) $year = intval($optionValue[0]);\n\t\t\tif (isset($optionValue[1])) $month = intval($optionValue[1]);\n\t\t\tif (isset($optionValue[2])) $day = intval($optionValue[2]);\n\t\t\t\n\t\t\t// calc\n\t\t\tif ($year) {\n\t\t\t\t$age = DateUtil::formatDate('%Y', null, false, true) - $year;\n\t\t\t\tif (intval(DateUtil::formatDate('%m', null, false, true)) < intval($month)) $age--;\n\t\t\t\telse if (intval(DateUtil::formatDate('%m', null, false, true)) == intval($month) && DateUtil::formatDate('%e', null, false, true) < intval($day)) $age--;\n\t\t\t\treturn $age;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 0;\n\t}",
"function GetAge($dob) \r\n\t\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t\t$dob=explode(\"/\",$dob); \r\n\t\t\t\t\t\t\t\t\t\t$curMonth = date(\"m\");\r\n\t\t\t\t\t\t\t\t\t\t$curDay = date(\"j\");\r\n\t\t\t\t\t\t\t\t\t\t$curYear = date(\"Y\");\r\n\t\t\t\t\t\t\t\t\t\t$age = $curYear - $dob[2]; \r\n\t\t\t\t\t\t\t\t\t\tif($curMonth<$dob[1] || ($curMonth==$dob[1] && $curDay<$dob[0])) \r\n\t\t\t\t\t\t\t\t\t\t\t$age--; \r\n\t\t\t\t\t\t\t\t\t\treturn $age; \r\n\t\t\t\t\t\t\t\t\t}",
"function getAge($birthDate){\n $birthDate = explode('/', $birthDate);\n $birthYear = $birthDate[2];\n $date = date('Y');\n $age = date_diff(date_create($birthYear), date_create($date));\n \n return $age->format('%Y');\n}",
"private function getAge()\n {\n return $this->getAge($this->dob);\n }",
"function getAge($dob) { \n $dob = explode(\"/\", $dob); \n $curMonth = date(\"m\");\n $curDay = date(\"j\");\n $curYear = date(\"Y\");\n // echo \"curYear: $curYear\";\n $age = $curYear - $dob[2]; \n if($curMonth<$dob[0] || ($curMonth==$dob[0] && $curDay<$dob[1])) \n $age--; \n return $age; \n}",
"function getAge($birthday)\n{\n if (strtotime($birthday)) {\n $date = new DateTime($birthday);\n $now = new DateTime();\n $interval = $now->diff($date);\n return $interval;\n }\n}",
"function age_to_birthdate($age)\n{\n $age_int = intval(trim((string)$age));\n $now = new \\DateTime();\n $bday = $now->sub(new \\DateInterval(\"P\" . $age_int . \"Y6M\"));\n return $bday->format(\\DateTime::ATOM);\n}",
"function setAge($dob){ #calculate current age\n/**\n * Simple PHP age Calculator\n *\n * Calculate and returns age based on the date provided by the user.\n * @param date of birth('Format:yyyy-mm-dd').\n * @return age based on date of birth\n */\n\n\t#dumpDie($dob);\n\tif((!empty($dob)) || ($dob != '--') ){\n\t\t$birthdate = new DateTime($dob);\n\t\t#$today = new DateTime('today');\n\t\t$today = new DateTime(DATE_CURRENT);\n\t\t$age = $birthdate->diff($today)->y;\n\t\treturn $age;\n\t}else{\n\t\treturn 0;\n\t}\n}",
"public function age()\r\n {\r\n\r\n // Note that A DOB object is based on a date-range and the exact date is\r\n // usually unknown so for age calculation the the middle of the range is\r\n // assumed to be the real date-of-birth.\r\n\r\n if (!empty($this->date_range))\r\n {\r\n $dob = $this->date_range->middle();\r\n $today = new DateTime('now', new DateTimeZone('GMT'));\r\n\r\n $diff = $today->format('Y') - $dob->format('Y');\r\n\r\n if ($dob->format('z') > $today->format('z'))\r\n {\r\n $diff -= 1;\r\n }\r\n\r\n return $diff;\r\n }\r\n return;\r\n }",
"public function getAge()\n {\n $this->checkJMBG();\n\n $timestamp = $this->getBirthdayTimeStamp();\n $now = time();\n $diff = $now - $timestamp;\n return date('Y', $diff) - 1970;\n }",
"function calcAge($birthday)\n{\n\n \n if (strtotime($birthday)) {\n\n $birthday = date_parse($birthday);\n $currentDate = date_parse(date(\"Y-m-d\", time()));\n\n $year = $currentDate['year'] - $birthday['year'];\n $month = $currentDate['month'] - $birthday['month'];\n $day = $currentDate['day'] - $birthday['day'];\n\n if ($day < 0) {\n $day = 30 + $day;\n $month--;\n }\n\n if ($month < 0) {\n $month = 12 + $month;\n $year--;\n }\n\n return [\n 'year' => $year,\n 'month' => $month,\n 'day' => $day,\n ];\n\n }\n\n\n}",
"function Age ($date, $year = true, $month = false, $day = false)\r{\r\t$byear = substr ($date, 0, 4);\r\t$bmonth = substr ($date, 5, 2);\r\t$bday = substr ($date, 7, 2);\r\r\t$today = getdate();\r\t$tyear = $today['year'];\r\t$tmonth = $today['mon'];\r\t$tday = $today['mday'];\r\r\t$years = $tyear - $byear + ($bmonth > $tmonth ? -1 : 0);\r\t$months = $tmonth - $bmonth;\r\tif ($months < 0) $months += 12;\r\t$days = $tday - $bday;\r\tif ($days < 0) $months += 31;\r\r\tif ($year) $result = $years . ' years';\r\telse $months += 12 * $years;\r\r\tif ($month) $result .= ' ' . $months . ' months';\r\telse $days += $months * 31;\r\r\tif ($day) $result .= ' ' . $days . ' days';\r\r\treturn $result;\r}",
"function dob2age($myTimestamp) {\n // Separate parts of DOB timestamp\n $matches = array();\n preg_match('/(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)/',\n $myTimestamp, $matches\n );\n //var_dump($matches);\n $dobYear = (int)$matches[1];\n $dobMonth = (int)$matches[2];\n $dobDay = (int)$matches[3];\n //echo \"DOB year=$dobYear month=$dobMonth day=$dobDay<br>\";\n\n $nowYear = (int)strftime('%Y');\n $nowMonth = (int)strftime('%m');\n $nowDay = (int)strftime('%d');\n //echo \"Now year=$nowYear month=$nowMonth day=$nowDay<br>\";\n // Calculate age\n if ($dobMonth < $nowMonth) {\n\n // Born in a month before this month\n $age = $nowYear - $dobYear;\n }\n elseif ($dobMonth == $nowMonth) {\n // Born in this month\n if ($dobDay <= $nowDay) {\n // Born before or on this day\n $age = $nowYear - $dobYear;\n }\n else {\n // Born after today in this month\n $age = $nowYear - $dobYear - 1;\n }\n }\n else {\n // Born in a month after this month\n $age = $nowYear - $dobYear - 1;\n }\n //echo \"age=$age years<br>\";\n return $age;\n }",
"public function birthday(bool $age = false)\n {\n // If age is requested calculate it\n if ($age) {\n // Create dates\n $birthday = date_create($this->birthday);\n $now = date_create(date('Y-m-d'));\n\n // Get the difference\n $diff = date_diff($birthday, $now);\n\n // Return the difference in years\n return (int) $diff->format('%Y');\n }\n\n // Otherwise just return the birthday value\n return $this->birthday;\n }",
"function DetermineAgeFromDOB ($YYYYMMDD_In)\n{\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n}",
"function DetermineAgeGET_DOB_Prod ($YYYYMMDD_In) {\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n }",
"function getAge($DOB) \n{\n $birth = explode(\"-\", $DOB);\n $age = date(\"Y\") - $birth[0];\n if(($birth[1] > date(\"m\")) || ($birth[1] == date(\"m\") && date(\"d\") < $birth[2]))\n {\n $age -= 1;\n }\n return $age;\n}",
"function calcularIdade($birthDate){\n\n\t\t\t\t//explode the date to get month, day and year\n\t\t\t\t$birthDate = explode(\"/\", $birthDate);\n\n\t\t\t\t//get age from date or birthdate\n\t\t\t\t$age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date(\"md\") ? ((date(\"Y\") - $birthDate[2]) - 1) : (date(\"Y\") - $birthDate[2]));\n\t\t\t\treturn $age;\n\t\t}",
"function calculate_age( $y, $m, $d, $death_y = NULL, $death_m = NULL, $death_d = NULL )\n\t{\n\t\tif (is_null($death_y) || is_null($death_m) || is_null($death_d)) {\n\n\t\t\t$death_y = date( 'Y' );\n\t\t\t$death_m = date( 'm' );\n\t\t\t$death_d = date( 'd' );\n\t\t}\n\n\t\t// --------------------------------------------------------------------------\n\n\t\t$_birth_time = mktime( 0, 0, 0, $m, $d, $y );\n\t\t$_death_time = mktime( 0, 0, 0, $death_m, $death_d, $death_y );\n\n\t\t// --------------------------------------------------------------------------\n\n\t\t//\tIf $_death_time is smaller than $_birth_time then something's wrong\n\t\tif ( $_death_time < $_birth_time )\n\t\t\treturn FALSE;\n\n\t\t// --------------------------------------------------------------------------\n\n\t\t//\tCalculate age\n\t\t$_age\t\t= ( $_birth_time < 0 ) ? ( $_death_time + ( $_birth_time * -1 ) ) : $_death_time - $_birth_time;\n\t\t$_age_years\t= floor( $_age / ( 31536000 ) );\t//\tDivide by number of seconds in a year\n\n\t\t// --------------------------------------------------------------------------\n\n\t\treturn $_age_years;\n\t}",
"public function getAge()\n {\n //function qui calcule l'age de leleve \n $now = new \\DateTime('now');\n $age = $this->getDateNaissance();\n $difference = $now->diff($age);\n\n return $difference->format('%y Ans');\n }",
"public function getAge()\n {\n if ($dob = $this->getDob()) {\n $now = new \\Datetime('now');\n $today['month'] = $now->format('m');\n $today['day'] = $now->format('d');\n $today['year'] = $now->format('Y');\n\n $years = $today['year'] - $dob->format('Y');\n\n if ($today['month'] <= $dob->format('m')) {\n if ($dob->format('m') == $today['month']) {\n if ($dob->format('d') > $today['day'])\n $years--;\n } else\n $years--;\n }\n\n return $years;\n }\n\n return null;\n }",
"public function dateOfBirthToAge($birthdate) {\n // $birthdate = \"2016-08-01\";\n //explode the date to get month, day and year\n $birthdate = explode(\"-\", $birthdate);\n //get age from date or birthdate\n $age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $birthdate[1], $birthdate[2], $birthdate[0]))) > date(\"md\")\n ? ((date(\"Y\") - $birthdate[0]) - 1)\n : (date(\"Y\") - $birthdate[0]));\n return $age;\n }",
"public function getAge()\n {\n if ($this->age) {\n return $this->age;\n }\n\n $this->age = $this->getBirthDate()->diff(new \\DateTime())->y;\n\n return $this->age;\n }",
"public function age(){\n return $this->dob->age;\n }",
"function age($d, $m, $y){\n //get age from date or birthdate\n $age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $m, $d, $y))) > date(\"md\")\n ? ((date(\"Y\") - $y) - 1)\n : (date(\"Y\") - $y));\n return $age;\n}",
"public static function calAge($bdate, $year = true, $month = true, $day = true, $label = true)\n {\n //$age = date_diff(date('Y-m-d'), $bdate);\n// \\appxq\\sdii\\utils\\VarDumper::dump($bdate);\n $age = '';\n if ($bdate != null || $bdate != '') {\n $diff = abs(strtotime(date('Y-m-d')) - strtotime($bdate));\n if ($year) {\n $years = floor($diff / (365 * 60 * 60 * 24));\n $label ? $age .= $years . ' ปี ' : $age .= $years;\n }\n if ($month) {\n $months = floor(($diff - $years * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24));\n $label ? $age .= $months . ' เดือน ' : $age .= $months;\n }\n if ($day) {\n $days = floor(($diff - $years * 365 * 60 * 60 * 24 - $months * 30 * 60 * 60 * 24) / (60 * 60 * 24));\n $label ? $age .= $days . ' วัน ' : $age .= $days . ' วัน ';\n }\n }\n return $age;\n }",
"function getAge($iBirthdayTimestamp, $iCurrentTimestamp = false, $padZeros = 2) {\t//\tby default, it pads it left to a length of 2 (zerofill)\r\n\t$iBirthdayTimestamp = preg_match('/^\\d{4}-\\d{2}-\\d{2}$/', $iBirthdayTimestamp) ? strtotime($iBirthdayTimestamp) : $iBirthdayTimestamp;\r\n\t$iCurrentTimestamp = $iCurrentTimestamp ? $iCurrentTimestamp : time();\t//\tdefault is today\r\n\t\r\n\t$iDiffYear = date('Y', $iCurrentTimestamp) - date('Y', $iBirthdayTimestamp);\r\n\t$iDiffMonth = date('n', $iCurrentTimestamp) - date('n', $iBirthdayTimestamp);\r\n\t$iDiffDay = date('j', $iCurrentTimestamp) - date('j', $iBirthdayTimestamp);\r\n\t\r\n\t// If birthday has not happen yet for this year, subtract 1.\r\n\tif ($iDiffMonth < 0 || ($iDiffMonth == 0 && $iDiffDay < 0)) {\r\n\t\t$iDiffYear--;\r\n\t}\r\n\t\r\n\t$iDiffYear = str_pad($iDiffYear, $padZeros, '0', STR_PAD_LEFT);\t//\tpad the age\r\n\treturn $iDiffYear;\r\n}",
"function age($date)\n{\n\t// PHP décompose la date saisie dans l'ordre défini\n list($annee, $mois, $jour) = explode ('/', $date);\n $TSN = strtotime($annee.\"/\".$mois.\"/\".$jour);\n $TS = strtotime(date(\"Y/m/d\"));\n\n $Age = ($TS-$TSN)/(365*3600*24);\n return round($Age);\n}",
"public function getUserAge();",
"public function getAge();",
"public function getAge();",
"public function determineAge() {\n $timeInOneYear = 365.256 * 24 * 60 * 60;\n $yearsofAge = floor((strtotime(date('Y')) - strtotime($this->year.'-12-31'))/ $timeInOneYear);\n\n $this->age = $yearsofAge;\n\n return (int) $yearsofAge;\n }",
"function getYearOfBirth() {\n global $USER;\n\t$yearOfBirth = date(\"Y\", $USER['dob']);\n\treturn $yearOfBirth;\n}",
"public static function calculateAge( $birthDate = false )\n\t{\n\t\tif( !$birthDate )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//explode the date to get month, day and year\n\t\t$birthDate = explode( \"-\", $birthDate );\n\n\t\tif( count( $birthDate ) != 3 )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//get age from date or birthDate\n\t\t$age = ( date( \"md\", date( \"U\", mktime( 0, 0, 0, $birthDate[ 0 ], $birthDate[ 1 ], $birthDate[ 2 ] ) ) ) > date( \"md\" ) ? ( ( date( \"Y\" ) - $birthDate[ 0 ] ) - 1 ) : ( date( \"Y\" ) - $birthDate[ 0 ] ) );\n\n\t\treturn (int)$age;\n\t}",
"function get_specified_age($age_str, $dob)\n {\n $today = new DateTime();\n $age = $dob->diff($today);\n\n $age_d = $dob->diffInDays();\n $age_y = $dob->age;\n $age_m = ($age->format('%y') * 12) + $age->format('%m');\n\n $patient_age = null;\n if (substr($age_str, -1) == 'd') {\n $patient_age = $age_d;\n } elseif (substr($age_str, -1) == 'm') {\n $patient_age = $age_m;\n } elseif (substr($age_str, -1) == 'y') {\n $patient_age = $age_y;\n }\n return $patient_age;\n }",
"public function age() {\n $years = ((integer) date('Y')) - $this->year;\n\n if (((integer) date('n')) < $this->month) {\n $years -= 1;\n }\n else if (((integer) date('n')) == $this->month) {\n if (((integer) date('j')) < $this->day) {\n $years -= 1;\n }\n }\n\n return $years;\n }",
"public function isValidAge($dob)\n {\n $customerDob = new Zend_Date($dob); // Zend_Date::ISO_8601\n if (!Zend_Date::isDate($customerDob)) {\n return 'wrongdate';\n }\n $currentDate = new Zend_Date(Mage::getModel('core/date')->timestamp(time()), Zend_Date::TIMESTAMP);\n $minDob = clone $currentDate;\n $minDob->subYear(18);\n $maxDob = clone $currentDate;\n $maxDob->subYear(125);\n\n if(!$customerDob->isEarlier($minDob)) {\n return 'young';\n } else if(!$customerDob->isLater($maxDob)) {\n return 'old';\n } else {\n return 'success';\n }\n }",
"public function isValidAge($dob)\n {\n $customerDob = new Zend_Date($dob); // Zend_Date::ISO_8601\n if (!Zend_Date::isDate($customerDob)) {\n return 'wrongdate';\n }\n $currentDate = new Zend_Date(Mage::getModel('core/date')->timestamp(time()), Zend_Date::TIMESTAMP);\n $minDob = clone $currentDate;\n $minDob->subYear(18);\n $maxDob = clone $currentDate;\n $maxDob->subYear(125);\n\n if(!$customerDob->isEarlier($minDob)) {\n return 'young';\n } else if(!$customerDob->isLater($maxDob)) {\n return 'old';\n } else {\n return 'success';\n }\n }",
"function findAge(\\DateTimeInterface $birthDate)\n {\n return $birthDate->diff(new DateTime())->y;\n }",
"private function calculateBirthDateAndGender()\n {\n $year = $this->subject->getBirthDate()->format('y');\n $month = $this->months[$this->subject->getBirthDate()->format('n')];\n $day = $this->subject->getBirthDate()->format('d');\n if (strtoupper($this->subject->getGender()) == self::CHR_WOMEN) {\n $day += 40;\n }\n\n return $year . $month . $day;\n }",
"public function getAgeAttribute ()\n\t{\n\t\treturn \\Carbon\\Carbon::parse($this->birthdate)->age;\n\t}",
"public function cheffism_age_function($atts) {\n extract(shortcode_atts(array(\n 'date' => '11/04/1985',\n 'format' => 'dd/MM/YYYY'\n ), $atts));\n\n //explode the date to get month, day and year\n $date = explode(\"/\", $date);\n //get age from date or birthdate\n $age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $date[1], $date[0], $date[2]))) > date(\"md\")\n ? ((date(\"Y\") - $date[2]) - 1)\n : (date(\"Y\") - $date[2]));\n\n return $age;\n }",
"public function getAge()\n {\n // future dates have no age\n return max(0, $this->difference(self::now())->getYears());\n }",
"public function getAgeAttribute()\n\t{\n\t\treturn now()->diffInYears($this->birthdate);\n\t}",
"public function getAgeAttribute() {\n return Carbon::createFromDate($this->attributes['DOB'])->age;\n }",
"function date_to_age($day, $month, $year) {\n\t$offset = -5;\n\n\t$now = gmdate(\"Y m d\", time() + (60*60*$offset));\n\n\t$now_year = intval(substr($now,0,4));\n\t$now_month = intval(substr($now,5,2));\n\t$now_day = intval(substr($now,8,2));\n\n\t$age = $now_year - $year;\n\tif($now_month == $month && $now_day >= $day) $age++;\n\n\treturn $age;\n}",
"function calculAge($date){\n\n$timestamp = strtotime($date); // en seconde\nreturn ceil((time() - $timestamp) / (60 * 60 * 24 * 365)); //calcul de l'age en arrondit\n}",
"function ageCalculator($age)\n{\n echo \"please enter your birthday\";\n// $birthDate = $_POST;\n $age = $_POST['number0'];\n\n// $user = $_POST[$birthDate];\n if (is_numeric(str_replace('.', '/', $user))) {\n $birthDate = is_numeric('mm/dd/yyyy');\n $user = sprintf('int', $birthDate);\n echo $user;\n } else {\n echo 'wrong';\n }\n$age = $_POST['number0'];\n//$birthDate = \"12/30/1998\";\n $birthDate = explode(\"/\", $birthDate);\n $age = (date(\"md\", date(\"U\",\n mktime(0, 0, 0, $birthDate[0], $birthDate[1],\n $birthDate[2]))) > date(\"md\")\n ? ((date(\"Y\") - $birthDate[2]) - 1)\n : (date(\"Y\") - $birthDate[2]));\n echo \"Age is:\" . $user;\n}",
"function hitungumurdalambulan($birthday){\n\t\n\t$biday = new DateTime($birthday);\n\t$today = new DateTime('Y-m-d');\n\t\n\t$diff = $today->diff($biday);\n\treturn ($diff->y * 12 ) + $diff->m;\n\n}",
"public function getAgeAttribute($value)\n {\n return Carbon::parse($this->birthdate)->age;\n }",
"function checkAge($thisAge, $listDate){\r\n\t$date = new DateTime($thisAge);\r\n\t$now = new DateTime($listDate);\r\n\t$interval = $now->diff($date);\r\n\t$age = $interval->y;\r\n\treturn $age;\r\n}",
"function getDayOfBirth() {\n global $USER;\n\t$dayOfBirth = date(\"d\", $USER['dob']);\n\treturn $dayOfBirth;\n}",
"public function calcAgeCalculatesAgeOfTimestampDataProvider() {}",
"function age($year){\n\n $age = date(\"Y\") - $year;\n\n echo \"You are $age years old\";\n}",
"public function getBirthDate()\n {\n if ($this->birthDate) {\n return $this->birthDate;\n }\n\n $centuryCode = substr($this->personal_code, 0, 1);\n if ($centuryCode < 3) {\n $century = 19;\n } elseif ($centuryCode < 5) {\n $century = 20;\n } else {\n $century = 21;\n }\n\n $this->birthDate = new \\DateTime(($century - 1) . substr($this->personal_code, 1, 6));\n\n return $this->birthDate;\n }",
"public static function getAge($date) {\r\n $d = new DateTime($date);\r\n $t = new DateTime(self::currentDateTime(self::datePattern));\r\n $interval = $t->diff($d);\r\n \r\n $years = $interval->format(\"%Y\");\r\n if($years == date(self::dateYear,time()))\r\n {\r\n return 0;\r\n }\r\n else\r\n {\r\n return $years;\r\n } \r\n }",
"function age($naiss){\n list($y,$m,$d) = explode('-',$naiss);// list créer un tableau\n $diff = date('m') - $m;\n if( $diff < 0 ){\n //le mois de naissance de la personne n'est pas encore le bon, par rapport au mois en cours, donc elle \"perd\" 1an (y++)\n $y++;\n }elseif($diff == 0 && (date('d') - $d < 0)){\n $y++;\n }\n return date('Y') - $y;\n }",
"function twig_age_filter($birthdate)\n{\n if (!$birthdate instanceof \\DateTime) $birthdate = new \\DateTime($birthdate);\n $age = $birthdate->diff(new \\DateTime())->y;\n\n return $age;\n}",
"public function getAge()\n {\n return 14;\n }",
"public function getAge()\n {\n return 14;\n }",
"public function age($date){\n $date = str_replace(\"/\",\"-\",$date);\n $date = date('Y/m/d',strtotime($date));\n $today = date('Y/m/d');\n $age = $today - $date;\n return $age;\n}",
"public function calculateAge($student_id){\n\t\t\t$table='student';\n\t\t\t$student=$this->findById($student_id, $table);\n\t\t\t$birth_date=$student['birth_date'];\n\t\t\t$get_birth_year=explode('/', $birth_date);\n\t\t\t$birth_year=$get_birth_year['2'];\n\t\t\t$current_year=date('Y');\n\t\t\t$age=$current_year - $birth_year;\n\t\t\treturn $age;\n\t\t}",
"public function checkAge()\n {\n Validator::extend('check_age', function ($attribute, $value, $parameters, $validator) {\n $request = app(\\Illuminate\\Http\\Request::class);\n $dob = $request->date_of_birth;\n $dobValue = explode('-', $dob);\n if ($dobValue[0] && $dobValue[1] && $dobValue[2]) {\n $today = new DateTime();\n $birthdate = new DateTime($dob);\n $interval = $today->diff($birthdate);\n $age = (int)$interval->format('%y');\n if ($age>=18) {\n return true;\n } else {\n return false;\n }\n }\n });\n }",
"function showAge($title, $dob, $appAge, $year, $month, $day, $realAge='', $str=''){#Show age\n/**\n * Display actual and apparent age\n *\n * If ages are the same, show apparent age if available, else show actual.\n * @param date of birth('Format:yyyy-mm-dd').\n * @return age based on date of birth\n */\n\n\tif(($dob == '--') ||($dob == '0-0-0')){$dob ='';}\n\t$zSign = set_zodiacSign($dob, $year, $month, $day);\n\n\t$realAge = setAge($dob);\n\n\n\t#all is good...\n\tif(($realAge != '') || ($realAge != 0) && ($appAge != '') || ($appAge != 0)){\n\n\n\t\t$dob = $day . ' / ' . $month . ' / ' . $year . ' <small class=\"text-muted\">('\n\t\t\t\t\t\t\t\t. $realAge\n\t\t\t\t\t\t\t\t. ' / '\n\t\t\t\t\t\t\t\t. $appAge . ' - <em>' . $zSign . '</em>)</small>'; #Add 0 back for troublshooting...\n\t}\n\n\n\n\n\t$str .= '\n\t<div class=\"row hoverHighlight\">\n\t\t\t<div class=\"col-sm-3 text-right text-muted\">\n\t\t\t\t<p class=\"text-right\"><strong>' . ucwords($title) . ':</strong></p>\n\t\t\t</div>\n\t\t\t<div class=\"col-sm-9\">\n\t\t\t\t<p>' . $dob . '</p>\n\t\t\t</div>\n\t\t</div>';\n\n\n#\tif(($realAge == '') && (($appAge == 0) || ($appAge == ''))){ $str=''; }\n\treturn $str;\n\n}",
"public function getAge()\n {\n\n return $this->age;\n \n }",
"function hitungumurtahunbulan($birthday){\n\t\n\t$biday = new DateTime($birthday);\n\t$today = new DateTime();\n\t\n\t$diff = $today->diff($biday);\n\treturn $diff->y.\" Thn \".$diff->m.\" Bln\";\n\n}",
"public function getFullAge()\n\t{\n\t\t$birthDate = $this->birthDate;\n\t\t$span = $birthDate->diff(new DateTime());\n\t\t$delimeter = \", \"; // string used to separate time span denominaotrs\n\t\t$output = false;\n\t\t\n\t\t$map = array(\n\t\t\t'years' => $span->y,\n\t\t\t'months' => $span->m,\n\t\t\t'days' => $span->d,\n\t\t\t'hours' => $span->h,\n\t\t\t'minutes' => $span->i,\n\t\t\t'seconds' => $span->s,\n\t\t);\n\t\t\n\t\t// parse the map array to format the time denominators for output\n\t\tforeach($map as $denominator=>$value) {\n\t\t\t// if the value for the denominator is 0 then skip it\n\t\t\tif ($value == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// if there is output already then add delimeter string\n\t\t\tif ($output) {\n\t\t\t\t$output .= $delimeter;\n\t\t\t}\n\t\t\t\n\t\t\t$output .= sprintf('%s %s',\n\t\t\t\t$value,\n\t\t\t\t$denominator\n\t\t\t);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t}",
"public function getAge()\n {\n return $this->age;\n }",
"public function getAge()\n {\n return $this->age;\n }",
"public function getAge()\n {\n return $this->age;\n }",
"public function getAge()\n {\n return $this->age;\n }",
"public function getAge()\n {\n return $this->age;\n }",
"public function getAge()\n {\n return $this->age;\n }",
"public function getAge() {\n return $this->age;\n }",
"public static function from_age($age)\r\n {\r\n # suitable for him.\r\n return (PiplApi_DOB::from_age_range($age, $age));\r\n }",
"public function determineGradeByAge() {\n $grade = false;\n switch ($this->age) {\n case 10:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 4;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 5;\n }\n break;\n case 11:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 5;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 6;\n }\n break;\n case 12:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 6;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 7;\n }\n break;\n case 13:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 7;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 8;\n }\n break;\n case 14:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 8;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 9;\n }\n break;\n case 15:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 9;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 10;\n }\n break;\n case 16:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 10;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 11;\n }\n break;\n case 17:\n if ($this->month >= 1 && $this->month <= 6) {\n $grade = 11;\n } elseif ($this->month >= 7 && $this->month <= 12) {\n $grade = 12;\n }\n break;\n default:\n $grade = 0;\n break;\n }\n $this->grade = $grade;\n return (int) $grade;\n }",
"public function getAge() { return $this->age; }",
"function getAge() {\n return $this->age;\n }",
"public function getAge()\n {\n return 20;\n }",
"public function getProfileAge() {\n\t\treturn (TIME_NOW - $this->registrationDate) / 86400;\n\t}",
"public function getage()\n {\n return $this->age;\n }",
"public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }",
"public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }",
"public function calcAgeDataProvider() {}",
"public function getBirthDate()\n {\n return $this->birth_date;\n }",
"function age($date){\n\t$previousDate = strtotime($date);\n\t$currentDate = time(); // for the second date we are going to use the current Unix system time\n\t$nrSeconds = $currentDate - $previousDate; // subtract the previousDate from the currentDate to see how many seconds have passed between these two dates\n\t$nrSeconds = abs($nrSeconds); // in some cases, because of a user input error, the second date which should be smaller then the current one\n\tswitch ($nrSeconds) {\n\t\tcase ($nrSeconds < 60):\n\t\t\t$return = \"$nrSeconds second\";\n\t\t\tif ($nrSeconds != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\t\tbreak;\n\t\tcase ($nrSeconds < 3600):\n\t\t\t$nrMinutesPassed = floor($nrSeconds / 60);\n\t\t\t$return = \"$nrMinutesPassed minute\";\n\t\t\tif ($nrMinutesPassed != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\tcase ($nrSeconds < 86400):\n\t\t\t$nrHoursPassed = floor($nrSeconds / 3600);\n\t\t\t$return = \"$nrHoursPassed hour\";\n\t\t\tif ($nrHoursPassed != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\t\tbreak;\n\t\tcase ($nrSeconds < 604800):\n\t\t\t$nrDaysPassed = floor($nrSeconds / 86400); // see explanations below to see what this does\n\t\t\t$return = \"$nrDaysPassed day\";\n\t\t\tif ($nrDaysPassed != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\t\tbreak;\n\t\tcase ($nrSeconds < 2620800):\n\t\t\t$nrWeeksPassed = floor($nrSeconds / 604800); // same as above\n\t\t\t$return = \"$nrWeeksPassed week\";\n\t\t\tif ($nrWeeksPassed != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\t\tbreak;\n\t\tcase ($nrSeconds < 31536000):\n\t\t\t$nrMonthsPassed = floor($nrSeconds / 2620800);\n\t\t\t$return = \"$nrMonthsPassed month\";\n\t\t\tif ($nrMonthsPassed != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$nrYearsPassed = floor($nrSeconds / 31536000); // same as above\n\t\t\t$return = \"$nrYearsPassed year\";\n\t\t\tif ($nrYearsPassed != 1) $return.=\"s\";\n\t\t\treturn $return;\n\t\t\tbreak;\n\t}\n}",
"public function getDateofBirth() {\n return $this->dateOfBirth;\n }",
"function born() {\n if (empty($this->birthday)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match(\"/Date of Birth:<\\/h5>\\s*<a href=\\\"\\/OnThisDay\\?day\\=(\\d{1,2})&month\\=(.*?)\\\">.*?<a href\\=\\\"\\/BornInYear\\?(\\d{4}).*?href\\=\\\"\\/BornWhere\\?.*?\\\">(.*?)<\\/a>/ms\",$this->page[\"Name\"],$match))\n $this->birthday = array(\"day\"=>$match[1],\"month\"=>$match[2],\"year\"=>$match[3],\"place\"=>$match[4]);\n }\n return $this->birthday;\n }",
"public static function validateAge($birthday, $age = 18) {\n\t\tif(is_string($birthday)) {\n\t\t\t$birthday = strtotime($birthday);\n\t\t}\n\n\t\t// check\n\t\t// 31536000 is the number of seconds in a 365 days year.\n\t\tif($returnage = time() - $birthday < $age * 31536000) {\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"public function testCanGetBirthYear() : void\n {\n $this->assertSame('1990', $this->personalCodeObj->getBirthYear());\n\n $formatsAndExpectedValues = [\n 'L' => 0, // Whether it's a leap year\n 'o' => 1990, // ISO-8601 week-numbering year.\n 'y' => 90, // A two digit representation of a year\n ];\n\n foreach ($formatsAndExpectedValues as $format => $expectedValue) {\n $this->assertEquals($expectedValue, $this->personalCodeObj->getBirthYear($format));\n }\n }",
"public function getBirthCentury() : int\n {\n $firstNo = substr($this->code, 0, 1);\n return 1700 + ceil($firstNo / 2) * 100;\n }",
"public function getBirthDate()\n\t{\n\t\treturn $this->birthDate;\n\t}",
"public function getBirthDate()\n {\n return $this->birthDate;\n }",
"public function getUserDateOfBirth () {\n\t\treturn ($this->userDateOfBirth);\n\t}"
] | [
"0.83211786",
"0.82315415",
"0.8100732",
"0.8084519",
"0.80513287",
"0.80364805",
"0.79857326",
"0.793816",
"0.7904201",
"0.79014033",
"0.78561753",
"0.78420603",
"0.7822622",
"0.7777678",
"0.77693295",
"0.7754276",
"0.77417105",
"0.7737767",
"0.7717078",
"0.7714205",
"0.76895773",
"0.7640672",
"0.7625807",
"0.75830996",
"0.7495339",
"0.746469",
"0.7453574",
"0.7440797",
"0.7428819",
"0.74267125",
"0.7396969",
"0.7329308",
"0.7307106",
"0.730433",
"0.7282584",
"0.7253754",
"0.7253754",
"0.72483575",
"0.7243884",
"0.7231945",
"0.72221303",
"0.72200763",
"0.721376",
"0.721376",
"0.7190346",
"0.71717644",
"0.71616715",
"0.71172184",
"0.7084898",
"0.706782",
"0.7047669",
"0.70358145",
"0.70065814",
"0.69850475",
"0.6980547",
"0.69422966",
"0.6922116",
"0.689087",
"0.6878477",
"0.6852504",
"0.68262726",
"0.6803295",
"0.6799474",
"0.67363197",
"0.6725693",
"0.6725693",
"0.67126274",
"0.6698621",
"0.6682893",
"0.6650963",
"0.66253716",
"0.6621374",
"0.66144556",
"0.6604351",
"0.6604351",
"0.6604351",
"0.6604351",
"0.6604351",
"0.6604351",
"0.65741456",
"0.6573935",
"0.6528706",
"0.6520667",
"0.6514591",
"0.6512006",
"0.6486592",
"0.64662194",
"0.6434355",
"0.6434355",
"0.64203435",
"0.63970083",
"0.63849187",
"0.63476115",
"0.63446903",
"0.6322799",
"0.6310939",
"0.6307633",
"0.6306339",
"0.6292455",
"0.62707597"
] | 0.7704629 | 20 |
Static function to retrieve custom value with entity id and field label | static function getSingleCustomValue( $entityId, $customFieldLabel, $entityType = "Contact") {
$value = '';
if (empty($entityId) || empty($customFieldLabel)) {
return $value;
}
$apiParams = array(
'version' => 3,
'entity_id' => $entityId,
'entity_table' => $entityType
);
$apiCustomValues = civicrm_api('CustomValue', 'Get', $apiParams);
if (isset($apiCustomValues['is_error']) && $apiCustomValues['is_error'] == 0) {
foreach ($apiCustomValues['values'] as $customId => $customValue) {
if ($customId != 0) {
$apiParams = array(
'version' => 3,
'id' => $customId
);
$apiCustomField = civicrm_api('CustomField', 'Getsingle', $apiParams);
if (!isset($apiCustomField['is_error']) || $apiCustomField['is_error'] == 0) {
if (isset($apiCustomField['label']) && $apiCustomField['label'] == $customFieldLabel) {
/*
* Further processing depending on data type
*/
switch($apiCustomField['data_type']) {
case "Country":
$value = $customValue['latest'];
$apiParams = array(
'version' => 3,
'id' => $customValue['latest']
);
$apiCountries = civicrm_api('Country','Get', $apiParams);
if (isset($apiCountries['is_error']) && $apiCountries['is_error'] == 0) {
foreach ($apiCountries['values'] as $countryId => $apiCountry) {
if(isset($apiCountry['name'])) {
$value = ts($apiCountry['name']);
}
}
}
break;
case "String":
/*
* Process depending on html_type
*/
switch($apiCustomField['html_type']) {
case "Select":
$apiParams = array(
'version' => 3,
'option_group_id' => $apiCustomField['option_group_id'],
'value' => $customValue['latest']
);
$apiOptionValues = civicrm_api('OptionValue', 'Getsingle', $apiParams);
if (!isset($apiOptionValues['is_error']) || $apiOptionValues['is_error'] == 0 ) {
if (isset($apiOptionValues['label'])) {
$value = $apiOptionValues['label'];
} else {
$value = $customValue['latest'];
}
}
break;
case "CheckBox":
$apiParams = array(
'version' => 3,
'option_group_id' => $apiCustomField['option_group_id']
);
if (isset($customValue['latest'][0])) {
$apiParams['value'] = $customValue['latest'][0];
}
$apiOptionValues = civicrm_api('OptionValue', 'Getsingle', $apiParams);
if (!isset($apiOptionValues['is_error']) || $apiOptionValues['is_error'] == 0 ) {
if (isset($apiOptionValues['label'])) {
$value = $apiOptionValues['label'];
} else {
$value = $customValue['latest'][0];
}
}
break;
default:
$value = $customValue['latest'];
}
break;
default:
$value = $customValue['latest'];
}
}
}
}
}
}
return $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValue(ContentEntityInterface $entity, $field);",
"function _doesoe_theme_entity_get_value($entity_type, $entity, $field) {\n if (empty($entity)) {\n return NULL;\n }\n $entity_w = entity_metadata_wrapper($entity_type, $entity);\n if (isset($entity_w->{$field}) && !empty($entity_w->{$field}->value())) {\n $term = $entity_w->{$field}->value();\n return $term;\n }\n return NULL;\n}",
"function getFieldValue($field);",
"function get_value_by_label( $form, $entry, $label ) {\n \n\tforeach ( $form['fields'] as $field ) {\n $lead_key = $field->label;\n\t\tif ( strToLower( $lead_key ) == strToLower( $label ) ) {\n\t\t\treturn $entry[$field->id];\n\t\t}\n\t}\n\treturn false;\n}",
"function civicrm_api3_custom_value_get($params) {\n\n $getParams = array(\n 'entityID' => $params['entity_id'],\n 'entityType' => CRM_Utils_Array::value('entity_table', $params, ''),\n );\n if (strstr($getParams['entityType'], 'civicrm_')) {\n $getParams['entityType'] = ucfirst(substr($getParams['entityType'], 8));\n }\n unset($params['entity_id'], $params['entity_table']);\n foreach ($params as $id => $param) {\n if ($param && substr($id, 0, 6) == 'return') {\n $id = substr($id, 7);\n list($c, $i) = CRM_Utils_System::explode('_', $id, 2);\n if ($c == 'custom' && is_numeric($i)) {\n $names['custom_' . $i] = 'custom_' . $i;\n $id = $i;\n }\n else {\n // Lookup names if ID was not supplied\n list($group, $field) = CRM_Utils_System::explode(':', $id, 2);\n $id = CRM_Core_BAO_CustomField::getCustomFieldID($field, $group);\n if (!$id) {\n continue;\n }\n $names['custom_' . $id] = 'custom_' . $i;\n }\n $getParams['custom_' . $id] = 1;\n }\n }\n if (isset($params['onlyActiveFields'])) {\n \t$getParams['onlyActiveFields'] = $params['onlyActiveFields'];\n }\n $result = CRM_Core_BAO_CustomValueTable::getValues($getParams);\n\n if ($result['is_error']) {\n if ($result['error_message'] == \"No values found for the specified entity ID and custom field(s).\") {\n $values = array();\n return civicrm_api3_create_success($values, $params);\n }\n else {\n return civicrm_api3_create_error($result['error_message']);\n }\n }\n else {\n $entity_id = $result['entityID'];\n unset($result['is_error'], $result['entityID']);\n // Convert multi-value strings to arrays\n $sp = CRM_Core_DAO::VALUE_SEPARATOR;\n foreach ($result as $id => $value) {\n if (strpos($value, $sp) !== FALSE) {\n $value = explode($sp, trim($value, $sp));\n }\n\n $idArray = explode('_', $id);\n if ($idArray[0] != 'custom') {\n continue;\n }\n $fieldNumber = $idArray[1];\n $info = array_pop(CRM_Core_BAO_CustomField::getNameFromID($fieldNumber));\n // id is the index for returned results\n\n if (empty($idArray[2])) {\n $n = 0;\n $id = $fieldNumber;\n }\n else{\n $n = $idArray[2];\n $id = $fieldNumber . \".\" . $idArray[2];\n }\n if (CRM_Utils_Array::value('format.field_names', $params)) {\n $id = $info['field_name'];\n }\n else {\n $id = $fieldNumber;\n }\n $values[$id]['entity_id'] = $getParams['entityID'];\n if (CRM_Utils_Array::value('entityType', $getParams)) {\n $values[$n]['entity_table'] = $getParams['entityType'];\n }\n //set 'latest' -useful for multi fields but set for single for consistency\n $values[$id]['latest'] = $value;\n $values[$id]['id'] = $id;\n $values[$id][$n] = $value;\n }\n return civicrm_api3_create_success($values, $params);\n }\n}",
"public function fetchField();",
"public function getLabel($label=null)\n {\n if ($label != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE label = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$label]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->label;\n }\n \n }",
"public function retrieveFieldValue(Field $field, $model);",
"public function getFieldValue(Field $field, $model);",
"function get_val($id, $field){\n if($id){\n $q = sql_query(\"SELECT `$field` FROM `entities` WHERE `ID` = '$id'\");\n $r = mysqli_fetch_row($q);\n mysqli_free_result($q);\n return $r[0];\n }\n else{\n return \"\";\n }\n}",
"protected function _getInputFieldValueFromLabel( $aField ) { \n \n // If the value key is explicitly set, use it. But the empty string will be ignored.\n if ( isset( $aField['value'] ) && $aField['value'] != '' ) { return $aField['value']; }\n \n if ( isset( $aField['label'] ) ) { return $aField['label']; }\n \n // If the default value is set,\n if ( isset( $aField['default'] ) ) { return $aField['default']; }\n \n }",
"function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}",
"public function getCustomFieldValue($field) {\n $customFieldValue = Doctrine::getTable('ArticleCustomFieldValue')->getByArticleAndName($this, $field);\n return $customFieldValue ? $customFieldValue->getValue() : '';\n }",
"public abstract function FetchField();",
"function getValue(int $field);",
"function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }",
"function get_field_label($field_instance) {\n return $field_instance['label'];\n }",
"public function getLabelField() {}",
"public function getLookupField() {}",
"public function getFieldValue($entity, $field_name, $langcode) {\n if ($entity->hasTranslation($langcode)) {\n // If the entity has translation, fetch the translated value.\n return $entity->getTranslation($langcode)->get($field_name)->getValue();\n }\n\n // Entity doesn't have translation, fetch original value.\n return $entity->get($field_name)->getValue();\n }",
"function acf_get_field_label($field, $context = '')\n{\n}",
"public function getValueIdentifier(): string;",
"public function getListModuleValueLabel()\n {\n if (isset($this->properties[0])) {\n return $this->properties[0]->getFieldName();\n } else {\n return 'uid';\n }\n }",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"public function getValue() {}",
"function getLabelFromId($id) {\n return 'field_'.$id;\n }",
"function getLabel() \n {\n return $this->getValueByFieldName( 'label_label' );\n }",
"function getLabelField() \n {\n return \"label_label\";\n }",
"public function __get($field_name)\n {\n $entitymeta = $this->link_to_dataset->entitymeta;\n if ($entitymeta) {\n $emtype = $entitymeta->ftype($field_name); // any variator field is general field too\n //println($field_name.' is '.$emtype,1,TERM_RED);\n } else {\n if (ENV != 'PRODUCTION') {\n var_dump($this->link_to_dataset);\n var_dump($this->datarow);\n die('ERROR. NO ->link_to_dataset->entitymeta');\n } else {\n throw Exception('DataRow __get NO ->link_to_dataset->entitymeta');\n }\n }\n\n $Ename = $this->link_to_dataset->entitymeta->name;\n\n if ($field_name == 'id') {\n return $this->datarow['id'];\n }\n\n if ($field_name == 'entity') {\n return $this->entitymeta;\n }\n\n if ($field_name == 'lang') {\n return $this->link_to_dataset->query->lang;\n }\n\n if ($field_name == 'parent') {\n if ($parentid = $this->datarow['_parent']) {\n if ($parentid == 0 or $parentid == '0') {\n return null;\n }\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:{$Ename}:{$parentid}\";\n $m->id = $parentid;\n $parent = $m->deliver();\n return $parent;\n } else {\n return null;\n }\n }\n\n if ($field_name == 'describe') {\n foreach ($entitymeta->extendstructure as $ee) {\n // category etc\n\n $m = new Message();\n $m->action = 'load';\n $m->urn = 'urn:' . $ee;\n $m->id = $this->datarow[$ee . '_id'];\n $extender = $m->deliver();\n// dprintln($extender, 1, TERM_VIOLET);\n// dprintln($ee, 1, TERM_VIOLET);\n// dprintln($m, 1, TERM_VIOLET);\n// dprintln($this->datarow, 1, TERM_VIOLET);\n //Log::info($extender, 'ev');\n\n $extender->extendMergeParents();\n// dprintln($extender, 2, TERM_VIOLET);\n\n $attributes = Entity::extenderAttributesHelper($extender, $this);\n// println($attributes, 1, TERM_GREEN);\n }\n return $attributes;\n }\n\n /**\n * TODO Children\n * if ($field_name == 'children')\n */\n\n if ($field_name == 'urn') {\n $uuid = new UUID($this->datarow['id']);\n $s = \"urn:\" . $Ename . \":\" . $uuid;\n //printlnd($s);\n $urn = new URN($s);\n //printlnd($urn);\n return $urn;\n }\n\n if ($field_name == 'last') {\n return $this->datarow['last'];\n }\n\n if ($field_name == 'first') {\n return $this->datarow[0];\n }\n\n if ($emtype == 'status') {\n $st = (integer) $this->datarow[$field_name];\n if ($st == 1) {\n return true;\n } elseif ($st == 0 or $st == -1) {\n return false;\n } else {\n throw new Exception(\"Status {$this->link_to_dataset->entitymeta}.{$field_name} id({$this->datarow['id']}) code is greater then 1: [{$field_name}={$st}]\");\n }\n }\n\n //println(\"$field_name is $emtype\",1,TERM_RED);\n\n // BT\n if ($emtype == 'belongs_to') {\n //println(\"BT\",1,TERM_RED);\n if ($this->datarow[\"{$field_name}\"] == 0) {\n return null;\n }\n $curHoId = $this->datarow[\"{$field_name}\"];\n\n //printlnd($curHoId);\n /**\n if (count($this->link_to_dataset) > 1)\n {\n //println(\"C > 1\");\n // RETURN PRELOADED & CACHED\n if ($this->link_to_dataset->preloads[$field_name] == true && $curHoId instanceof DataRow)\n {\n return $curHoId;\n } // !ПОВТОРНЫЙ ВЫЗОВ ТОГО ЖЕ DS->DR, DS->DR ДО EACH NEXT\n else if ($this->link_to_dataset->preloads[$field_name] == true && is_numeric($curHoId))\n {\n // we have cur but it is stale\n return $this->link_to_dataset->byURN($this->urn)->$field_name;\n }\n\n\n // PRELOAD ALL INCLUDED DATASET ON FIRST REQUEST\n\n $this->link_to_dataset->preloads[$field_name] = true;\n\n $hoids = $this->link_to_dataset->getColumn($field_name . '_id');\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:{$field_name}\";\n $m->id = array_unique(array_values($hoids));\n $m->subrequest_from = $this->datarow[\"id\"];\n $m->chain = 1;\n $hos = $m->deliver();\n //printlnd($m);\n\n foreach ($hoids as $hurn => $hoid)\n {\n $ho = $hos->byId($hoid);\n if ($ho->id == $curHoId && !$found)\n {\n $hocurrequest = $ho;\n $found = true;\n }\n $this->link_to_dataset->patch($hurn, $field_name . '_id', $ho);\n }\n return $hocurrequest;\n }\n */\n //else // single subrequest\n {\n //println(\"C = 1\");\n //$mk = $this->link_to_dataset->entitymeta->getAlias();\n $relEntity = $this->link_to_dataset->entitymeta->entityByUsedName($field_name);\n $m = new Message();\n $m->action = 'load';\n $m->urn = (string) $relEntity;\n $m->lang = $this->link_to_dataset->query->lang;\n $m->id = $this->datarow[\"{$field_name}\"];\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n //println($m);\n return Entity::query($m);\n }\n }\n\n // HAS ONE\n if ($emtype == 'has_one' || $emtype == 'use_one') {\n //println(\"111\");\n $FN = $emtype;\n $realEntity = $this->link_to_dataset->entity->$FN($field_name);\n $realEntity = $realEntity[$field_name];\n //println(\"+1 $emtype $realEntity\",1,TERM_RED);\n if (!$this->datarow[\"{$field_name}\"]) {\n return null;\n }\n $curHoId = $this->datarow[\"{$field_name}\"];\n /*\n if (count($this->link_to_dataset) > 1 && !$this->link_to_dataset->query->chain) // 'PRELOAD & CACHED'\n {\n if ($this->link_to_dataset->preloads[$field_name] == true) return $curHoId; // FIRST PRELOAD\n $this->link_to_dataset->preloads[$field_name] = true;\n $hoids = $this->link_to_dataset->getColumn($field_name . '_id');\n $m = new Message();\n $m->action = 'load';\n $m->urn = (string)$realEntity;\n $m->id = array_values($hoids);\n $m->subrequest_from = $this->datarow[\"id\"];\n $m->chain = 1;\n $hos = $m->deliver();\n foreach ($hoids as $hurn => $hoid)\n {\n $ho = $hos->byId($hoid);\n if ($ho->id == $curHoId) $hocurrequest = $ho;\n $this->link_to_dataset->patch($hurn, $field_name . '_id', $ho);\n }\n return $hocurrequest;\n }\n */\n //else // single subrequest\n {\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:\" . $realEntity->name . \":\" . $this->datarow[\"{$field_name}\"];\n $m->subrequest_from = $this->datarow[\"id\"];\n /*\n сквозные статусы - предача вниз только если родиттельские и дочерние имеют одинаковые статусы\n if ($this->link_to_dataset->query->exists('statuses')) $m->statuses = $this->link_to_dataset->query->statuses;\n */\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n //println($m);\n $r = $m->deliver();\n return $r;\n }\n }\n\n // HAS MANY\n if ($emtype == 'has_many') {\n $relEntity = $this->link_to_dataset->entitymeta->entityByUsedName($field_name);\n $m = new Message();\n $m->urn = (string) $relEntity;\n $mk = $this->link_to_dataset->entitymeta->getAlias();\n $m->$mk = \"urn:\" . $this->link_to_dataset->entitymeta->name . \":\" . $this->datarow['id'];\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n return Entity::query($m);\n }\n\n // LIST\n if ($emtype == 'list') {\n $listmeta = $this->link_to_dataset->entitymeta->listbyname($field_name);\n $list_entity_name = $listmeta['entity'];\n\n $urn = new URN('urn:' . $this->link_to_dataset->entitymeta->name . ':' . $this->datarow['id']);\n $urn->set_list($field_name);\n $m = new Message();\n $m->action = 'members';\n $m->urn = $urn;\n $listing = $m->deliver();\n\n if ($listing->count()) {\n $m = new Message();\n $m->action = 'load';\n $m->urn = 'urn:' . $listmeta['entity'];\n $m->in = $listing;\n if ($this->link_to_dataset->entitymeta->defaultorder) {\n $m->order = $this->link_to_dataset->entitymeta->defaultorder;\n }\n //if ($listmeta['order']) $m->order = $listmeta['order'];\n $ds = $m->deliver();\n return $ds;\n } else {\n return new DataSet(array(), $m->urn->entity, null, 0);\n }\n }\n\n /**\n * FUNCTION ENTITY PLUGIN\n */\n $fieldCanonical = $field_name;\n $fx = explode('_', $field_name);\n if (count($fx) == 2 && $fx[0] !== '') {\n $fieldCanonical = $fx[1];\n } // _attributes!\n /**\n * EXTENDED FIELD NAME HAVE TO BE UNIQUE E AND NOT EXISTS IN BASE_FIELDS\n */\n if (Field::exists($fieldCanonical) && isset($this->datarow[$field_name])) {\n //$F = Field::id($fieldCanonical);\n //println($F,1,TERM_RED);\n //println($field_name);\n $F = $this->link_to_dataset->entitymeta->entityFieldByName($field_name);\n //println($F,2,TERM_RED);\n if ($F->type == \"integer\") {\n return (integer)$this->datarow[$field_name];\n } elseif ($F->type == \"sequence\") {\n $a = substr($this->datarow[$field_name], 1, -1);\n $s = new Sequence(explode(',', $a));\n if ($labels = $this->datarow[$field_name . '_index']) {\n $s->setLabels($labels);\n }\n return $s;\n } elseif ($F->type == \"iarray\") {\n $toInt = function ($value) {\n return (int) $value;\n };\n $a = substr($this->datarow[$field_name], 1, -1);\n return array_map($toInt, explode(',', $a));\n } elseif ($F->type == \"tarray\") {\n if ($this->datarow[$field_name] == '{}' || $this->datarow[$field_name] == '{\"\"}') {\n return [];\n }\n $toInt = function ($value) {\n $v = stripcslashes($value);\n if (strpos($v, '\"') === 0) {\n $v = substr($v, 1, -1);\n }\n return $v;\n };\n $a = substr($this->datarow[$field_name], 1, -1);\n return array_map($toInt, explode(',', $a));\n } elseif ($F->type == \"json\") {\n if (AUTO_JSON_FIELD_DECODE_TO_ARRAY === true) {\n return json_decode($this->datarow[$field_name], true);\n } elseif (AUTO_JSON_FIELD_DECODE_TO_OBJECT === true) {\n return json_decode($this->datarow[$field_name]);\n } else {\n return $this->datarow[$field_name];\n }\n } elseif ($F->type == \"float\" || $F->type == \"money\") {\n // $wrapped = number_format(floatval($value), 2, '.', '');\n\n $precision = $F->precision ? $F->precision : 2;\n $fv = (float)$this->datarow[$field_name];\n if (STRICT_FLOATS === true) {\n $wrapped = $fv;\n } else {\n $wrapped = number_format($fv, $precision, '.', '');\n }\n return $wrapped;\n } else {\n $ft = $F->type;\n if ($ft == 'string' || $ft == 'text' || $ft == 'richtext') {\n $fieldValue = html_entity_decode($this->datarow[$field_name]);\n } elseif ($ft == 'set') {\n //println($F,1,TERM_VIOLET);\n if ($this->datarow[$field_name]) {\n $fieldValue = $F->valueOfIndex($this->datarow[$field_name]);\n } else {\n $fieldValue = null;\n }\n } elseif ($ft == 'option') {\n //println($F,1,TERM_GREEN);\n if ($this->datarow[$field_name]) {\n $fieldValue = $F->valueOfIndex($this->datarow[$field_name]);\n } else {\n $fieldValue = null;\n }\n } else {\n $fieldValue = $this->datarow[$field_name];\n }\n return $fieldValue;\n }\n } else {\n if (!$this->datarow[$field_name]) {\n return $this->$field_name();\n } // Call plugin\n else {\n //printlnd($this->datarow[$field_name],1,TERM_VIOLET);\n $exp = explode('_', $field_name);\n if (count($exp)) {\n //println($field_name,1,TERM_GREEN);\n //println($this->entitymeta->entityByUsedName($exp[0]),1,TERM_GREEN);\n //println($this->entitymeta->ftype($exp[0]),1,TERM_GREEN);\n if ($this->entitymeta->ftype($exp[0]) == 'list') {\n //println($field_name,1,TERM_YELLOW);\n if ($this->datarow[$field_name] == '') {\n return new \\Datamodel\\Sequence([]);\n } elseif (!$this->datarow[$field_name]) {\n return new \\Datamodel\\Sequence([]);\n } elseif ($this->datarow[$field_name] == '{}') {\n return new \\Datamodel\\Sequence([]);\n } else {\n $a = substr($this->datarow[$field_name], 1, -1);\n $s = new \\Datamodel\\Sequence(explode(',', $a));\n //printlnd($s);\n return $s;\n }\n }\n }\n return $this->datarow[$field_name]; // return general field (including extended variator variations)\n }\n }\n }",
"function get_value($post_id, $field)\n\t{\n\t\t// get value\n\t\t$value = parent::get_value($post_id, $field);\n\t\t\n\t\t// format value\n\t\t\n\t\t// return value\n\t\treturn $value;\t\t\n\t}",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getValue();",
"public function getCustomFieldValueByName($name) {\n return Doctrine::getTable('ArticleCustomFieldValue')->getByArticleAndName($this, $name);\n }",
"public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}",
"public function get_label();",
"public function get_label();",
"function getCustomFieldID($entity) {\n\n $customField = civicrm_api3('custom_field', 'get', array(\n 'version' => 3,\n 'custom_group_id' => $entity->custom_group_id,\n 'label' => $entity->label,\n )\n );\n\n if (!empty($customField['id'])) {\n return $customField['id'];\n }\n\n return NULL;\n }",
"protected function getOurValue()\n {\n $ourModel = $this->getOurModel();\n\n if ($ourModel->loaded()) {\n return $this->our_field\n ? $ourModel->get($this->our_field)\n : $ourModel->getId();\n }\n\n // create expression based on existing conditions\n return $ourModel->action('field', [\n $this->getOurFieldName(),\n ]);\n }",
"function get_value_for_api($post_id, $field){\n\t\t// get value\n\t\t$value = $this->get_value($post_id, $field);\n\t\t\n\t\t// return value\n if( !empty($value) ) {\n\t\t return new ACF_Link_Field_Value($value);\n } else {\n return '';\n } \n\n\t}",
"function get_value_for_api($post_id, $field)\n\t{\n\t\t// get value\n\t\t$value = $this->get_value($post_id, $field);\n\t\t\n\t\t// format value\n\t\t\n\t\t// return value\n\t\treturn $value;\n\n\t}",
"public function __get($field){\n if ($field == 'ENTIDAD_ID'){\n return $this->codigo;\n }\n else{\n return $this->fields;\n }\n }",
"function getFieldValue($value_id)\r\n\t{\r\n\t\t$q = \"SELECT \".$this->fieldToSelect.\" FROM `\".$this->tableName.\"` WHERE \".$this->tableId.\"='\".$value_id.\"'\";\r\n\t\t$this->db->Execute($q);\r\n\r\n\t\tif($this->db->Affected_rows() > 0)\r\n\t\t{\r\n\t\t\t$field_value = $this->db->GetOne($q);\r\n\t\t\treturn $field_value;\r\n\t\t}else{\r\n\t\t\tdie('<strong>Nama Field yang ada di dalam tanda {} tidak ada di table '.$this->tableName.',<br> sql : '.$this->sql.'</strong>');\r\n\t\t}\r\n\t\treturn '';\r\n\t}",
"function ihc_get_custom_field_label($slug=''){\n\t $data = get_option('ihc_user_fields');\n\t if ($data){\n\t \t $key = ihc_array_value_exists($data, $slug, 'name');\n\t\t if (isset($data[$key]) && isset($data[$key]['label'])){\n\t\t \treturn $data[$key]['label'];\n\t\t }\n\t }\n\t return '';\n}",
"function getEavField($Model, $entity_id = null, $attribute_name = null) {\n extract($this->settings[$Model->alias]);\n $eavField = $Model->{$with}->find(\n 'first',\n array(\n 'fields' => array(\n 'id',\n 'entity_id',\n 'attribute_id',\n 'value_id'\n ),\n 'conditions' => array(\n 'Attribute.name' => $attribute_name,\n $with . '.' . $withKey => $entity_id\n ),\n 'recursive' => 0\n )\n );\n return ($eavField);\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"function load_value($value, $post_id, $field)\n {\n }",
"public function value(ItemDataEntity $Item, $Field, $raw = true)\n\t{\n\t\t$item = $Item->getData();\n\n\t\tif (!$Field instanceof FieldDataEntity) {\n\t\t\t// $hasFieldData = $Item->getModel()->hasFieldDataEntity($Field);\n\t\t\t$Field = $Item->getModel()->getFieldDataEntity($Field);\n\t\t}\n\n\t\tif (!$Field instanceof FieldDataEntity) {\n\t\t\ttrigger_error('Field is not instance of FieldDataEntity:');\n\t\t\tddd($Field);\n\t\t}\n\n\t\t$Model = $this->_model($Field);\n\t\t$modelName = $Model->alias;\n\t\t$fieldName = $Field->getFieldName();\n\n\t\tif ($Field->isType(FieldDataEntity::FIELD_TYPE_OBJECT_STATUS)) {\n\t\t\t$statusName = str_replace('ObjectStatus_', '', $Field->getFieldName());\n\t\t\t$value = $Item->Properties->ObjectStatus->getStatusValue($Item, $statusName);\n\t\t}\n\t\telseif (!$Field->isAssociated()) {\n\t\t\t$value = $Item->{$fieldName};\n\n\t\t\tif ($Field->hasOptionsCallable() && !$Field->isType(FieldDataEntity::FIELD_TYPE_TOGGLE)) {\n\t\t\t\t$fieldOptions = $Field->getFieldOptions();\n\n\t\t\t\tif (isset($fieldOptions[$value])) {\n\t\t\t\t\t$value = $fieldOptions[$value];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$value = $Item->{$Item->getModel()->displayField};\n\n\t\t\t// $associationModel = $Field->getAssociationModel();\n\t\t\t// $associationKey = $Field->getAssociationKey();\n\t\t\t// $className = $Field->getAssociationConfig('className');\n\t\t\t// $classNameInstance = ClassRegistry::init($className);\n\n\t\t\t// if ($associationKey === 'belongsTo') {\n\t\t\t// \t$value = $item[$associationModel][$classNameInstance->displayField];\n\t\t\t// }\n\n\t\t\t// if ($associationKey === 'hasAndBelongsToMany') {\n\t\t\t// \t$value = $this->_extractMany($item, $associationModel, $classNameInstance->displayField);\n\t\t\t// }\n\n\t\t\t// if ($associationKey === 'hasOne') {\n\t\t\t// \tddd(123);\n\t\t\t// }\n\n\t\t\t// if ($associationKey === 'hasMany') {\n\t\t\t// \t$value = $this->_extractMany($item, $associationModel, $classNameInstance->displayField);\n\t\t\t// }\n\t\t}\n\n\t\tif (!$raw) {\n\t\t\t$value = $this->_humanValue($value, $Field);\n\t\t}\n\n\t\treturn $value;\n\t}",
"public function get_field(/* .... */)\n {\n return $this->_field;\n }",
"public function getFrontendLabel();",
"function get_subfield_value($parts, $subfield_label) {\n $ret = \"\";\n foreach ($parts as $subfield) {\n if (substr($subfield, 0, 1) == $subfield_label) {\n $ret = substr($subfield, 2);\n }\n }\n return $ret;\n }",
"function get_value() {return $this->get();}",
"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}",
"function getAddEntityLabel(){\n\t\treturn null;\n\t}",
"function getKeyField() \n {\n return 'label_key';\n }",
"public function getValue($fieldname, $raw = true);",
"abstract protected function getValue();",
"private function getValue(string $fieldName) {\r\n return $this -> translator -> get($fieldName);\r\n }",
"public function getValue(){ }"
] | [
"0.6889181",
"0.65778357",
"0.6566542",
"0.6518875",
"0.6511518",
"0.6479505",
"0.6430689",
"0.63849026",
"0.6360047",
"0.6330542",
"0.62819505",
"0.62806946",
"0.6268203",
"0.6244071",
"0.6235161",
"0.62296283",
"0.62207985",
"0.619831",
"0.6186993",
"0.61814636",
"0.61635077",
"0.6125138",
"0.61214745",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.6119711",
"0.61191916",
"0.61191916",
"0.61191916",
"0.61191916",
"0.61191916",
"0.61156386",
"0.6099036",
"0.609875",
"0.6091461",
"0.6076953",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.6071484",
"0.60694796",
"0.6061629",
"0.6053092",
"0.6053092",
"0.60313845",
"0.6014871",
"0.6004147",
"0.6000231",
"0.5965186",
"0.595982",
"0.59303004",
"0.5928921",
"0.5894222",
"0.5894222",
"0.5894222",
"0.5894222",
"0.5894222",
"0.5894222",
"0.5894222",
"0.5894222",
"0.589406",
"0.5882473",
"0.58771336",
"0.5872032",
"0.5869593",
"0.5865616",
"0.58617485",
"0.58589",
"0.58481747",
"0.5847057",
"0.5846609",
"0.5839921"
] | 0.7473264 | 0 |
Static function to retrieve activity type id for Enkelvoude Hulpvraag | static function getEnkelvoudigeHulpvraagTypeId() {
$actTypeId = 0;
$apiParams = array(
'version' => 3,
'option_group_id' => 2,
'label' => "Enkelvoudige Hulpvraag"
);
$actType = civicrm_api('OptionValue', 'Getsingle', $apiParams);
if (!isset($actType['is_error']) || $actType['is_error'] == 0) {
$actTypeId = $actType['value'];
}
return $actTypeId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function activityActorId();",
"public function getActivityId();",
"abstract protected function get_typeid();",
"public function get_type()\n {\n return self::$_id;\n }",
"public function typeId()\n {\n return config('entities.ids.' . $this->type);\n }",
"public function getAndroidId();",
"public function getActivityIdentifier()\n {\n if (array_key_exists(\"activityIdentifier\", $this->_propDict)) {\n return $this->_propDict[\"activityIdentifier\"];\n } else {\n return null;\n }\n }",
"public function getTypeId()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typeid'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typeid'];\n\t\t}\n\t}",
"public function get_activity_type($activity_id, $thread_id = NULL, $process_id = NULL) {\n\t\t$query = $this->db->select ( 'id_thread' )->where ( 'id', $activity_id )->get ( 'activities' );\n\t\t$result = $query->row ();\n\t\t$thread_id = $result->id_thread;\n\t\t\n\t\t// get activity_type\n\t\t$query = $this->db->query ( 'select sa.id as activity_type from setup_activities sa JOIN setup_processes sp ON sa.id_process=sp.id JOIN threads t ON t.type=sp.key JOIN activities a ON a.id_thread=t.id where a.id=' . $activity_id . ' and t.id=' . $thread_id . ' and sa.key = (select aa.type from activities aa where aa.id= ' . $activity_id . ')' );\n\t\treturn $query->row ();\n\t}",
"public function get_id() {\n return str_replace('forumngtype_', '', get_class($this));\n }",
"public function getTypeIdentifier();",
"public function getActivityId(): ?string;",
"public static function trackId(): string\n {\n return 'tid';\n }",
"public function getOGApplicationID();",
"public function activityForeignId();",
"public function getType_id()\n {\n return $this->type_id;\n }",
"public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }",
"public function getAppType();",
"public function getTypeId()\n {\n return $this->_getData('type_id');\n }",
"public function id() {\n return $this->activity_array['id'];\n }",
"public function get_type(): string;",
"public function get_reg_id($character, $id_type) {\n\n $fields = array(\"*\");\n $whereArr = array(\"id_type\" => $id_type);\n $id_number = $this->db_model->getData($fields, 'id_numbers_m_tbl', $whereArr);\n\n $int = intval(preg_replace('/[^0-9]+/', '', $id_number[0]->id_number), 10);\n $id = \"$character\" . ($int + 1);\n return $id;\n\n}",
"public function getEntityTypeId(){\n $entityType = Mage::getModel('eav/entity_type')->loadByCode($this->_entityType);\n if (!$entityType->getId()){\n Mage::helper('connector')\n ->log(\"Entity type \" . $this->_entityType . \" undefined\", Zend_log::ERR);\n return false;\n }\n return $entityType->getId();\n }",
"public function getId()\n {\n switch ($this->type) {\n case VideoInfo::TYPE_YOUTUBE:\n return app(InferYoutubeId::class)($this->info->url);\n case VideoInfo::TYPE_VIMEO:\n return $this->info->video_id;\n }\n return null;\n }",
"abstract public function getEntityTypeID();",
"public function getTypeId()\n {\n return $this->type_id;\n }",
"public function getTypeId()\n {\n return $this->type_id;\n }",
"public function getTypeId()\n {\n return $this->type_id;\n }",
"Public function get_ididtypeexp()\n\t\t{\n\t\t\tReturn $this ->idtypeexp;\n\t\t}",
"private function get_type() {\n\n\t}",
"function getAssetId($asset=null){\n $id = false;\n if($asset == 'XCP'){\n $id = 1;\n } else if(substr($asset,0,1)=='A'){\n $id = substr($asset,1);\n } else {\n $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $array = str_split($asset);\n $n = 0;\n for ($i = 0; $i < count($array); $i++) { \n $n *= 26;\n $n += strpos($chars, $array[$i]);\n }\n $id = $n;\n }\n return $id;\n}",
"public function getIdType() {\n\t\treturn $this->id_type;\n\t}",
"public function getTypeID() {\n\t\treturn $this->_type_id;\n\t}",
"public function getFailedActivityId(): ?string;",
"public function getEdiType(): string\n {\n return $this->identifierCode;\n }",
"final public function getType(): int {}",
"function GetEventActivityType()\n\t{\n\t\tif (empty($this->eventactivitytype)) {\n\t\t\treturn array();\n\t\t}\n\n\t\tif (is_array($this->eventactivitytype)) {\n\t\t\treturn $this->eventactivitytype;\n\t\t}\n\n\t\treturn unserialize($this->eventactivitytype);\n\t}",
"function get_type_events()\n{\n return 'atu_events';\n}",
"public function getIdentifier(): string|int;",
"function gettype($type = 0) {\n $typestr = \"\";\n switch ($type){\n case 0:\n $typestr = plang('typeceshi');\n break;\n case 1:\n $typestr = plang('typezhuce');\n break;\n case 2:\n $typestr = plang('typeshenfenyanzheng');\n break;\n case 3:\n $typestr = plang('typedenglu');\n break;\n case 4:\n $typestr = plang('typexiugaimima');\n break;\n case 5:\n $typestr = plang('typeshenfenyanzheng');\n break;\n default:\n $typestr = plang('typeceshi');\n break;\n }\n return $typestr;\n }",
"public function get_type();",
"public function getExtensionIdentifier();",
"public function determineId() {}",
"static public function getActivityId( $name ) {\n\t\t$model = new Moondee_Activity_Model_Activity();\n\t\t$activity_data = $model->fetchRow('id = '.$activity_id);\n\t\t\n\t\tif( $activity_data['id'] ){\n\t\t\treturn $activity_data['id'];\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getID($url,$type = \"video\"){\n parse_str(preg_replace('/https:\\/\\/[www|m]\\.youtube\\.com\\/|watch\\?|https:\\/\\/[www|m]\\.youtube\\.com\\/|playlist\\?/','',$url));\n if($type == \"video\"){\n if(isset($v)){return $v;}\n else{return FALSE;} \n }elseif($type == \"playlist\"){\n\n if(isset($list)){return $list;}\n else{return FALSE;}\n }else{return FALSE; } \n }",
"function getActivityNameFromItem($item){\n $activity_name = '';\n switch ($item->type){\n case \"2\": //单品活动名称\n case \"3\": //餐装活动名称\n $activity = $this->activity_model->getItemById($item->activity);\n $activity_name = $activity->activity_name;\n break;\n case \"4\": //区域总代理名称\n $providerinfo = $this->user_model->getUserInfoByid($item->activity);\n $activity_name = $providerinfo->username;\n break;\n }\n\n return $activity_name;\n }",
"public static function getTypeName($type = ''): string\n {\n switch ($type) {\n case '':\n $type = 'app_id';\n break;\n case 'app':\n $type = 'appid';\n break;\n default:\n $type = $type.'_id';\n }\n\n return $type;\n }",
"public function entityTypeId();",
"function __getInType($type = '')\n {\n\t\t\n switch ($type) {\n\t\t\t\n\t\t\tcase 'visa':\n\t\t\t $str = 'B';\n break;\n\t\t\tcase 'invoice':\n\t\t\t $str = 'F';\n break;\n\t\t\tcase 'gift_card':\n\t\t\t $str = 'G';\n break;\n\t\t\tcase 'cash':\n\t\t\t $str = 'K';\n break;\n\t\t\tcase 'account':\n\t\t\t $str = 'kk';\n break;\n\t\t\tcase '':\n\t\t\t $str = 'kk';\n break;\n default:\n\t\t\t $str = 'B';\n break;\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $str;\n\t\t\t\t\n\t}",
"public static function id(){\n return self::info('id');\n }",
"function get_id() {\n\t// Check Altis config first.\n\t$juicer_id = has_altis_config() ? Altis\\get_config()['hm-juicer']['juicer-id'] : false;\n\tif ( ! empty( $juicer_id ) ) {\n\t\treturn $juicer_id;\n\t}\n\n\t// Check the JUICER_ID constant and return it if it exists.\n\tif ( defined( 'JUICER_ID' ) ) {\n\t\treturn JUICER_ID;\n\t}\n\n\t// Return the option, if it exists.\n\treturn Settings\\juicer_get_option( 'juicer_id', false );\n}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getCustomTypeId();",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getIdentifier() {}",
"public function getType()\n {\n return $this->type()->getID();\n }",
"public static abstract function getIdentifier() : string;",
"public function getIdType()\n {\n return $this->idType;\n }",
"public function getIncidentType(): ?string;",
"public function get_engine_code(/* ... */)\n {\n return $this->_type;\n }",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public function getIdentifier();",
"public static function getID() {\r\n return 1;\r\n }",
"public function type() : int;",
"public function getEntryId();",
"public function getTaskType();",
"public function getIdentifier(): string;",
"public function getIdentifier(): string;",
"function getLTIAssignmentID() {\n \n if ( isset( $_SESSION['lti'] ) ) {\n \n $lti = unserialize( $_SESSION['lti'] );\n \n switch( getLTILMS() ) {\n \n case 'canvas':\n \n return $lti['custom_canvas_assignment_id'];\n break;\n \n default:\n \n return null;\n \n }\n \n }\n \n return null;\n \n }",
"public function getId(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_id[$className])){\n\t\t\treturn self::$_id[$className];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}",
"function dtm_get_post_id( $post_type, $post_id ) {\n\t//$accepted_post_type = array( 'article', 'listicle' );\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( '' );\n\t//\t}\n\t//\n\t//\tif ( WP_Base::is_recipe() ) {\n\t//\t\treturn get_post_meta( $post_id, 'rms_legacy_id', true );\n\t//\t}\n\t//}\n\t$post_id = apply_filters( 'dtm_wordpress_content_id', $post_id );\n\n\treturn $post_id;\n}",
"function event_id() \n {\n $list = explode( ':', $this->rule->rule_key);\n if ( count( $list) == 4 && $list[2] == 'event') return $list[3];\n return NULL;\n }",
"function getActClassId() {\n if (isset($_SESSION['actClass'])) {\n return intval($_SESSION['actClass']);\n } else {\n return -1;\n }\n}",
"public static function getType(): string\n {\n return self::TYPE;\n }",
"public function getIdentifier()\n {\n return 1;\n }",
"function getIdentifier();",
"function getIdentifier();",
"function getType(): string;",
"function getType(): string;",
"function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}",
"public function getEntityId()\n {\n return $this->activityId;\n }",
"public function id()\n {\n return $this->getFromCache(\n ['type' => 'id']\n );\n }",
"function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}",
"public function getTypeId()\n {\n return $this->typeId;\n }",
"function getViewId($module)\n\t{\n\t\tglobal $adb;\n\t\tglobal $current_user;\n\n\t\tif(isset($_REQUEST['viewname']) == false)\n\t\t{\n\t\t$query=\"select cvid from ec_fenzu where entitytype='\".$module.\"' \";\n\t\t$cvresult=$adb->query($query);\n\t\tif($adb->num_rows($cvresult) == 0)\n\t\t{\n\t\t\t$query=\"select cvid from ec_fenzu where entitytype='\".$module.\"' and \".$public_condition;\n\t\t\t$cvresult=$adb->query($query);\n\t\t}\n\t\t$viewid = $adb->query_result($cvresult,0,'cvid');\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$viewid = $_REQUEST['viewname'];\n\t\t}\n\t\tif(empty($viewid) || $viewid == '0') {\n\t\t\t$viewid = \"0\";\n\t\t} else {\n\t\t\t$_SESSION['lvs'][$module][\"viewname\"] = $viewid;\n\t\t\t$query=\"select cvid from ec_fenzu where cvid='\".$viewid.\"' and entitytype='\".$module.\"'\";\n\t\t\t$cvresult = $adb->query($query);\n\t\t\tif($adb->num_rows($cvresult) == 0)\n\t\t\t{\n\t\t\t\t$viewid = '0';\n\t\t\t}\n\t\t}\n\t\treturn $viewid;\n\n\t}",
"public function type(): string;",
"public function getActivityCode(): ?string\n {\n return $this->activityCode;\n }",
"public function get_id();"
] | [
"0.62448317",
"0.62155926",
"0.6198939",
"0.6143468",
"0.6130929",
"0.6107719",
"0.6035379",
"0.6030141",
"0.60049987",
"0.59926337",
"0.5992089",
"0.59343773",
"0.5855107",
"0.5843588",
"0.5843307",
"0.5827969",
"0.5824882",
"0.58170307",
"0.5788696",
"0.57830644",
"0.57471955",
"0.56823194",
"0.5680224",
"0.56758404",
"0.56732905",
"0.56700146",
"0.56700146",
"0.56700146",
"0.56635875",
"0.5659552",
"0.56519026",
"0.5637535",
"0.5615951",
"0.5590422",
"0.55859596",
"0.55849904",
"0.55777764",
"0.55750483",
"0.5568266",
"0.5532228",
"0.54979604",
"0.54926074",
"0.5491015",
"0.5488609",
"0.54856974",
"0.54768157",
"0.5474078",
"0.5466854",
"0.54620266",
"0.5446267",
"0.5432081",
"0.54265565",
"0.54265565",
"0.54264975",
"0.5426145",
"0.5425613",
"0.5425613",
"0.5425613",
"0.5425613",
"0.5425613",
"0.54220325",
"0.5405392",
"0.5399414",
"0.5397863",
"0.5394623",
"0.5391988",
"0.5391988",
"0.5391988",
"0.5391988",
"0.5391988",
"0.5391988",
"0.5391988",
"0.5391988",
"0.5391988",
"0.539048",
"0.53889",
"0.53622013",
"0.53617483",
"0.5361686",
"0.5361686",
"0.5358768",
"0.5352489",
"0.53524673",
"0.5351563",
"0.5344127",
"0.5343702",
"0.5341601",
"0.5338276",
"0.5338276",
"0.5330822",
"0.5330822",
"0.53287673",
"0.5327314",
"0.5322198",
"0.5319154",
"0.5318064",
"0.53176504",
"0.53153926",
"0.5313735",
"0.5313351"
] | 0.69880265 | 0 |
Static function to retrieve the first contact date for a customer first contact date means the first date of any case or activity Enkelvoudige Hulpvraag | static function getContactFirstDate($contactId) {
$firstContactDate = '';
if (empty($contactId)) {
return $firstContactDate;
}
/*
* retrieve first date for contact for activities
*/
$apiParams = array(
'version' => 3,
'activity_type_id' => self::getEnkelvoudigeHulpvraagTypeId(),
'contact_id' => $contactId,
);
$apiActivities = civicrm_api('Activity', 'Get', $apiParams);
$firstContactDate = new DateTime(date('Y-m-d'));
foreach ($apiActivities['values'] as $actId => $apiActivity) {
if (isset($apiActivity['activity_date_time'])) {
$actDate = new DateTime($apiActivity['activity_date_time']);
if ($actDate <= $firstContactDate) {
$firstContactDate = $actDate;
}
}
}
/*
* check if there is an earlier date in cases for contact
*/
$apiParams = array(
'version' => 3,
'client_id' => $contactId
);
$apiCases = civicrm_api('Case', 'Get', $apiParams);
foreach($apiCases['values'] as $caseId => $apiCase) {
if (isset($apiCase['start_date'])) {
$startDate = new DateTime($apiCase['start_date']);
if ($startDate <= $firstContactDate) {
$firstContactDate = $startDate;
}
}
}
return $firstContactDate->format('d-m-Y');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFirstDate()\n {\n $query = \"SELECT MIN(stat_date) AS first FROM \" . $this->tableName;\n $data = $this->SelectData($query, PDO::FETCH_ASSOC);\n\n if (false === $data) {\n return false;\n } else {\n return $data[0]['first'];\n }\n }",
"public function getFirstPaymentDate() {\r\n $query = $this->createQuery($this->_alias)\r\n ->select(\"DATE_FORMAT(cp.created_at, '%Y-%m') AS payment_date\")\r\n ->orderBy(\"id ASC\")\r\n ->limit(1);\r\n\r\n $res = $query->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\r\n\r\n if (count($res) > 0) {\r\n $res = $res[0][\"cp_payment_date\"];\r\n }\r\n\r\n return $res;\r\n }",
"public function getFirstDay(){$day = getdate(mktime(0, 0, 0, $this->getMonth(), 1, $this->getYear())); return $day['wday'];}",
"public function getFirstPaymentDate()\n\t{\n\t\treturn $this->first_payment_date;\n\t}",
"public function getEarliestDate();",
"function _data_first_month_day() {\n\t$month = date('m');\n\t$year = date('Y');\n\treturn date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n}",
"function _data_first_month_day() {\r\n $month = date('m');\r\n $year = date('Y');\r\n return date('d/m/Y', mktime(0,0,0, $month, 1, $year));\r\n }",
"public function getContactDate() {\n return $this->date;\n }",
"function _data_first_month_day()\n {\n $month = date('m');\n $year = date('Y');\n return date('Y-m-d', mktime(0, 0, 0, $month, 1, $year));\n }",
"public function getFirstDay()\n {\n return (int)$this->_scopeConfig->getValue(\n 'general/locale/firstday',\n ScopeInterface::SCOPE_STORE\n );\n }",
"function getFirstDayInMonth()\n {\n return $this->firstDayInMonth;\n }",
"public static function data_first_month() {\n\t$month = date('m');\n\t$year = date('Y');\n\treturn date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n}",
"function getFirstDayOfDate(string $date): string {\n $d = new DateTime($date);\n $d->modify('first day of this month');\n return $d->format('Y-m-d');\n}",
"function get_first_day($month) {\r\n $data = new DateTime('01-' . $month .'-'.date('Y'));\r\n $first_day = $data->format('D');\r\n switch($first_day) {\r\n case 'Sun':\r\n $initial_day_of_month = 1;\r\n break;\r\n case 'Mon':\r\n $initial_day_of_month = 2;\r\n break;\r\n case 'Tue':\r\n $initial_day_of_month = 3;\r\n break;\r\n case 'Wed':\r\n $initial_day_of_month = 4;\r\n break;\r\n case 'Thu':\r\n $initial_day_of_month = 5;\r\n break;\r\n case 'Fri':\r\n $initial_day_of_month = 6;\r\n break;\r\n case 'Sat':\r\n $initial_day_of_month = 7;\r\n break;\r\n }\r\n\r\n return $initial_day_of_month;\r\n }",
"function get_date_of_previous_invoice() {\n\t\tforeach ($this->get_calendar_events(time()-(86400 * 90), time()) as $event) {\n\t\t\tif (preg_match($this->config['calendar_entry'], $event->title->text, $m)) {\n\t\t\t\tforeach ($event->when as $when) {\n\t\t\t\t\treturn substr($when->startTime,0,10);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdie(\"Unable to find a previous invoice entry in the calendar.\\n\");\n\t}",
"function getFirstReturnDate($parameters)\n\t{\n\t\t$rules = $parameters->rules;\n\t\t$reattempt_date = $rules['failed_pmnt_next_attempt_date']['1'];\n\t\treturn $this->getReattemptDate($reattempt_date, $parameters);\n\t}",
"public function getFirstEmptyDate($from, $to) {\n db_set_active('stage');\n $route = db_select('air_calendar', 'ac');\n $route->leftJoin('avis_parsing_directions', 'apd', 'ac.did = apd.id');\n $route = $route->fields('ac', array('id', 'month', 'did'))\n ->fields('apd', array('code_from', 'code_to'))\n ->condition('ac.time', '')\n ->condition('ac.id', $from, '>=')\n ->condition('ac.id', $to, '<=')\n ->range(0, 1)\n ->execute()->fetchAll();\n db_set_active('default');\n if (!empty($route[0])) {\n return $route[0];\n }\n return FALSE;\n }",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(AbuthInvoicesTableMap::COL_CREATED_AT);\n }",
"public static function productStartDate($model){\n $singleDate = ArrayHelper::map($model->applydates,'id','begin_date') ;\n $applyDates = array_shift( $singleDate );\n return count($applyDates)>0 ? $applyDates : null;\n }",
"function firstDay($monthname, $year) {\r\n if (empty($month)) {\r\n $month = date('m');\r\n }\r\n if (empty($year)) {\r\n $year = date('Y');\r\n }\r\n $result = strtotime(\"{$year}-{$month}-01\");\r\n return date('Y-m-d', $result);\r\n }",
"public function getCurrentActivationDate(){\n $this->sortPhoneData();\n $phoneDataSorted = $this->phoneData;\n $phoneArraySize = count($phoneDataSorted);\n $currActivationDate = null;\n for($i = $phoneArraySize-1; $i>=0; $i--){\n $currActivationDate = $phoneDataSorted[$i]['activationDate'];\n if($currActivationDate == $phoneDataSorted[$i-1]['deactivationDate']){\n $currActivationDate = $phoneDataSorted[$i-1]['activationDate'];\n } else {\n break;\n }\n }\n return [\n 'phoneNumber' => $this->phoneNumber,\n 'currActivationDate' => $currActivationDate\n ];\n }",
"static function getFirstActivityFor($cid, $whereClauses = NULL) {\n $query = \"\n SELECT `ca`.*\n FROM `civicrm_activity` AS `ca`\n INNER JOIN `civicrm_activity_contact` AS `cat`\n ON `cat`.`activity_id` = `ca`.`id`\n AND `cat`.`record_type_id` = %0\n AND `cat`.`contact_id` = %1\n \";\n if (!empty($whereClauses)) {\n if (!is_array($whereClauses)) {\n $whereClauses = array($whereClauses);\n }\n $query .= ' WHERE (' . implode(') AND (', $whereClauses) . ') ';\n }\n $query .= \"\n ORDER BY `ca`.`activity_date_time` ASC\n LIMIT 1\n \";\n\n $dao = CRM_Core_DAO::executeQuery($query, array(\n array(self::RECORD_TYPE_TARGET, 'Int'),\n array($cid, 'Int'),\n ));\n if (!$dao->fetch()) {\n return NULL;\n }\n return get_object_vars($dao);\n }",
"public static function getFirstName($_cID) {\n global $lC_Database;\n \n $Qfirst = $lC_Database->query('select customers_firstname from :table_customers where customers_id = :customers_id');\n $Qfirst->bindTable(':table_customers', TABLE_CUSTOMERS);\n $Qfirst->bindInt(':customers_id', $_cID);\n $Qfirst->execute();\n \n $first = $Qfirst->value('customers_firstname');\n\n $Qfirst->freeResult();\n \n return $first;\n }",
"function erp_financial_start_date() {\n $financial_year_dates = erp_get_financial_year_dates();\n\n return $financial_year_dates['start'];\n}",
"public function get_first_day_of_week()\n\t{\n\t\t$this->first_day_of_week = $this->data->get_first_day_of_week($this->first_day_of_week);\n\t\treturn $this->first_day_of_week;\n\t}",
"function get_first_day($day_number=1, $month=false, $year=false) {\r\n $month = ($month === false) ? strftime(\"%m\"): $month;\r\n $year = ($year === false) ? strftime(\"%Y\"): $year;\r\n \r\n $first_day = 1 + ((7+$day_number - strftime(\"%w\", mktime(0,0,0,$month, 1, $year)))%7);\r\n \r\n return mktime(0,0,0,$month, $first_day, $year);\r\n }",
"public function getDateOfFirstAuthorization()\n {\n return $this->dateOfFirstAuthorization;\n }",
"public function get_contact(){\n $this->relative = array_shift(Relative::find_all(\" WHERE dead_no = '{$this->id}' LIMIT 1\"));\n if ($this->relative) {\n return $this->relative->contact();\n } else {\n return \"Not Specified\";\n }\n }",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(SocioTableMap::COL_CREATED_AT);\n }",
"function getInitDate($table)\r\n {\r\n \r\n $queryString = \"SELECT MIN(date) FROM $table\";\r\n \r\n // Interpret Query\r\n $result = $this->runQuery($queryString);\r\n \r\n if (!$result && $this->getMySQLErrorCode()!=0)\r\n return 0;\r\n \r\n $row = mysql_fetch_row($result);\r\n \r\n return $row[0];\r\n }",
"function getFilterStartDate($date)\n{\n $startDate = date($date);\n if (!$startDate)\n $startDate = date(\"1000-01-01 00:00:00\");\n return $startDate;\n}",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(RemAanvraagTableMap::COL_CREATED_AT);\n }",
"function getStartDate() \n\t{\n\t\treturn (strlen($this->start_date)) ? $this->start_date : NULL;\n\t}",
"function getDefaultContact() {\n $defaultContact = NULL;\n $opt = $this->getProperty('DEFAULT_CONTACT', '');\n if ($opt != '') {\n $defaultContact = $opt;\n }\n return $defaultContact;\n }",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(EmployeeTableMap::COL_CREATED_AT);\n }",
"public static function first();",
"public function getFirstCharge($format = 'Y-m-d H:i:s')\n\t{\n\t\tif ($this->first_charge === null) {\n\t\t\treturn null;\n\t\t}\n\n\n\t\tif ($this->first_charge === '0000-00-00 00:00:00') {\n\t\t\t// while technically this is not a default value of NULL,\n\t\t\t// this seems to be closest in meaning.\n\t\t\treturn null;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$dt = new DateTime($this->first_charge);\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException(\"Internally stored date/time/timestamp value could not be converted to DateTime: \" . var_export($this->first_charge, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ($format === null) {\n\t\t\t// Because propel.useDateTimeClass is TRUE, we return a DateTime object.\n\t\t\treturn $dt;\n\t\t} elseif (strpos($format, '%') !== false) {\n\t\t\treturn strftime($format, $dt->format('U'));\n\t\t} else {\n\t\t\treturn $dt->format($format);\n\t\t}\n\t}",
"public function getCurrentPrimaryContact(){\n\t\t$author = Author::select()->where('is_principal_contact', 1)->first();\n\n\t\treturn $author;\n\t}",
"function firstDayOfWeek($year,$month,$day){\n global $fd;\n $dayOfWeek=date(\"w\");\n $sunday_offset=$dayOfWeek * 60 * 60 * 24;\n $fd = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) - $sunday_offset);\n return $fd;\n}",
"function getFirstWatchReport( $startdate, $enddate, $reason){\r\n\r\n $startdate = strtotime($startdate);\r\n $enddate = strtotime($enddate);\r\n\r\n $userid = $_SESSION['userid'];\r\n\r\n $query = \"select c.ID, c.DateCreated, c.Description from `contacts` c, `issues` i where i.Header = 'INTERIM AND FIRST WATCH HISTORY' and i.ID = c.Issue order by c.DateCreated\";\r\n\r\n //if( $startdate ) $query .= \" and c.DateCreated >= '\".getMySqlDate( $startdate ).\"'\";\r\n //if( $enddate ) $query .= \" and c.DateCreated <= '\".getMySqlDate( $enddate ).\"'\";\r\n //$query .= \" order by c.DateCreated\";\r\n $result = mysql_query($query);\r\n \r\n $fw = array();\r\n while( $contact = mysql_fetch_assoc( $result ) ) {\r\n\r\n // flag for indicating this contact is one we are looking for\r\n $flag = true;\r\n\r\n // check date\r\n if(strpos($contact['Description'], \"Student placed on the First Watch List [\") === 0){\r\n if(strtotime($contact['DateCreated']) > $enddate) $flag = false; \r\n }\r\n else if(strpos($contact['Description'], \"Student removed from First Watch List [\") === 0){\r\n if(strtotime($contact['DateCreated']) < $startdate) $flag = false; \r\n }\r\n else{ \r\n $flag = false;\r\n } \r\n\r\n // if contact checks out, see what it says\r\n if($flag){\r\n\r\n // get student id\r\n $query2 = \"select distinct `StudentID` from `contacts-students` where `ContactID` = '\".$contact['ID'].\"'\";\r\n $result2 = mysql_query($query2);\r\n if($result2 = mysql_fetch_assoc($result2)) $studentid = $result2['StudentID'];\r\n\r\n // get reason\r\n $offset = 38;\r\n $allreasons = array('Academic','Financial','Interim Reports','Medical','Possible Transfer','Personal','Watch List');\r\n for($i = 0; $i < count($allreasons); $i++){\r\n if(strpos($contact['Description'], $allreasons[$i], $offset) !== false){\r\n // add an array for the student in the firstwatch array\r\n if(!isset($fw[$studentid])){\r\n $fw[$studentid] = array();\r\n }\r\n // add reason to array\r\n $fw[$studentid][] = $allreasons[$i];\r\n }\r\n }\r\n }\r\n\t }\r\n\r\n // if a reason search criteria was provided, filter the results\r\n if(!empty($reason)){\r\n foreach(array_keys($fw) as $id){\r\n if(array_search($reason,$fw[$id]) === false) unset($fw[$id]);\r\n }\r\n }\r\n\r\n // clean up array, remove duplicates,\r\n foreach(array_keys($fw) as $id){\r\n $fw[$id] = array_unique($fw[$id]);\r\n }\r\n\r\n return $fw; \r\n }",
"public static function getFirstDayOfGivenDate($date)\n\t{\n\t\t$full_date = explode('-', $date);\n\t\t$year = $full_date[0];\n\t\t$month = $full_date[1];\n\t\t$day = $full_date[2];\n\t\t\n\t\t$dateInSeconds = mktime(0, 0, 0, $month, 1, $year);\n\t\t$date = date('Y-m-d', $dateInSeconds);\n\t\treturn $date;\n\t}",
"public function getFirst()\r\n {\r\n return $this->dao->select('*')->from(TABLE_COMPANY)->orderBy('id')->limit(1)->fetch();\r\n }",
"function getSubscriptionStartDate($rpArr){\n // find it\n list($profieDate,) = explode(' ', $rpArr['profileStartDate']);\n list($y,$m,$d) = explode('-', $profieDate);\n if($y == '0000'){\n $profieStartDate = gmdate(\"Y-m-d\\TH:i:s\\Z\");\n }else{\n $uPTime = mktime(0,0,0,$m,$d,$y);\n if($uPTime < time()){\n // next one\n while ($uPTime < time()){\n $m = date('m', $uPTime);\n $d = date('d', $uPTime);\n $y = date('Y', $uPTime);\n switch ($rpArr['billingPeriod']){\n case 'month':\n $uPTime = mktime(0,0,0,$m+1,$d,$y);\n break;\n case 'day':\n $uPTime = mktime(0,0,0,$m,$d+1,$y);\n break;\n case 'year':\n $uPTime = mktime(0,0,0,$m,$d,$y+1);\n break;\n case 'semiMonth':\n $uPTime = mktime(0,0,0,$m,$d+14,$y);\n break;\n case 'week':\n $uPTime = mktime(0,0,0,$m,$d+7,$y);\n break;\n }\n }\n }\n $profieStartDate = gmdate(\"Y-m-d\\TH:i:s\\Z\", $uPTime);\n }\n // return\n return $profieStartDate;\n }",
"public function GetStatisticsDateStart($date)\n\t{\n\t\t$date = explode(' - ',$date);\n\t\treturn $date[0];\n\t}",
"public function getEarliestShipDate()\n {\n return $this->_earliestShipDate;\n }",
"public function first() {}",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(DegressifProductsTableMap::CREATED_AT);\n }",
"public function getCurrentPrimaryContact(){\n\t\t$author = Author::selectRaw('CONCAT(first_Name, \" \", last_Name) AS name')->where('is_principal_contact', 1)->first();\n\n\t\tif($author){\n\t\t\t$primaryContact = $author;\n\t\t}\n\t\telse{\n\t\t\t$primaryContact = null;\n\t\t}\n\t\treturn $this->setStatusCode(201)\n\t\t\t->respondUpdatedWithData('Primary Contact', $primaryContact);\n\t}",
"public function firstDay(int $day)\n {\n return $this->set('first_day', $day);\n }",
"abstract public function get_first_line_support_email();",
"function getFirstDay($year, $month, $day_of_week) {\n $num = date(\"w\",mktime(0,0,0,$month,1,$year));\n if($num==$day_of_week) {\n return date(\"j\",mktime(0,0,0,$month,1,$year));\n }\n elseif($num>$day_of_week) {\n return date(\"j\",mktime(0,0,0,$month,1,$year)+(86400*((7+$day_of_week)-$num)));\n }\n else {\n return date(\"j\",mktime(0,0,0,$month,1,$year)+(86400*($day_of_week-$num)));\n }\n}",
"function getStartDate()\n {\n $oDaySpan = $this->_value;\n $value = is_null($oDaySpan) ? null : $oDaySpan->getStartDate();\n return $value;\n }",
"public function nextClientVisit()\n {\n $today = Carbon::now();\n $visit = SitePlanner::where('from', '>=', $today->format('Y-m-d'))->where('site_id', $this->site_id)->where('task_id', 524)->orderBy('from')->first();\n\n return $visit;\n //return ($visit) ? $visit->from : null;\n }",
"public function getCurrentPrimaryMagazineContact(){\n\t\t$author = Author::selectRaw('CONCAT(first_Name, \" \", last_Name) AS name')->where('is_principal_magazine_contact', 1)->first();\n\n\t\tif($author){\n\t\t\t$primaryContact = $author;\n\t\t}\n\t\telse{\n\t\t\t$primaryContact = null;\n\t\t}\n\t\treturn $this->setStatusCode(201)\n\t\t\t->respondUpdatedWithData('Primary Magazine Contact', $primaryContact);\n\t}",
"public static function getFirstDayOfCurrentYear()\n\t{\n\t\t$dateInSeconds = mktime(0, 0, 0, 1, 1, date('Y'));\n\t\t$date = date('Y-m-d', $dateInSeconds);\n\t\treturn $date;\n\t}",
"public function getManualDateStart() {}",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(SchoolPeer::CREATED_AT);\n }",
"function eo_the_start($format='d-m-Y',$id='',$occurrence=0){\n\techo eo_get_the_start($format,$id,$occurrence);\n}",
"static public function getFirstPage() {\n\t\treturn self::$first_page;\n\t}",
"function eo_get_the_start($format='d-m-Y',$id='',$occurrence=0){\n\tglobal $post;\n\t$event = $post;\n\n\tif(isset($id)&&$id!='') $event = eo_get_by_postid($id,$occurrence);\n\t\n\tif(empty($event)) return false;\n\n\t$date = esc_html($event->StartDate).' '.esc_html($event->StartTime);\n\n\tif(empty($date)||$date==\" \")\n\t\treturn false;\n\n\treturn eo_format_date($date,$format);\n}",
"function getFirst() ;",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(ProfessorTableMap::COL_CREATED_AT);\n }",
"public function getCustomerFirstname();",
"public function lastCreatedFirst()\n {\n return $this->addDescendingOrderByColumn(AbuthInvoicesTableMap::COL_CREATED_AT);\n }",
"function Get_Next_Payday($first_date, $info, $rules)\n{\n\t// Grab a list of dates from the fund_date onward. Remove dates prior to today\n\t$date_list = Get_Date_List($info, $first_date, $rules, 20);\n\n\t$date_pair = array();\n\twhile(strtotime($date_list['event'][0]) < strtotime(date('Y-m-d')))\n\t{\n\t\tarray_shift($date_list['event']);\n\t\tarray_shift($date_list['effective']);\n\t}\n\n\t$date_pair['event'] = $date_list['event'][0];\n\t$date_pair['effective'] = $date_list['effective'][0];\n\n\treturn $date_pair;\n}",
"public function first_day($int) {\n\t\t$this->options['first_day'] = $int;\n\t\treturn $this;\n\t}",
"public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }",
"public function getFirstPage();",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(FreeShippingPeer::CREATED_AT);\n }",
"public function getStartDate()\n {\n if (array_key_exists(\"startDate\", $this->_propDict)) {\n return $this->_propDict[\"startDate\"];\n } else {\n return null;\n }\n }",
"protected function getFirstPublishDate(): array {\n $firstPublishValue = $this->node()->get('field_first_publish_date')->getValue();\n // TODO: review why can $firstPublishValueItem just 0 value.\n // (hint: I created a new node, saved, than I edited and saved again, and\n // still 0.)\n $firstPublishValue = reset($firstPublishValue);\n $firstPublishDate = $this->t('Not available');\n if (isset($firstPublishValue['value'])) {\n $firstPublishValue = strtotime($firstPublishValue['value']);\n $firstPublishDate = $this->dateFormatter->format($firstPublishValue, 'tieto_date');\n }\n\n return [\n '#type' => 'container',\n '#weight' => 5,\n '#attributes' => [\n 'class' => [\n 'node-meta--first-publish-date',\n ],\n ],\n 'label' => [\n '#type' => 'html_tag',\n '#tag' => 'label',\n '#attributes' => [\n 'class' => [\n 'actions-info-label',\n 'actions-info--first-publish-date--label',\n ],\n ],\n '#value' => $this->t('First publish date'),\n ],\n 'value' => [\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#attributes' => [\n 'class' => [\n 'actions-info-value',\n 'actions-info--first-publish-date--value',\n ],\n ],\n '#value' => $firstPublishDate,\n ],\n ];\n }",
"public function getStartDate() {\r\n $startDate = new \\DateTime('@' . $this->getTimestamp());\r\n\r\n switch($this->getMode()) {\r\n case self::$modeYear:\r\n $startDate->modify('first day of January');\r\n break;\r\n case self::$modeMonth:\r\n $startDate->modify('first day of this month');\r\n break;\r\n case self::$modeWeek:\r\n $date = date('w', $startDate->getTimestamp());\r\n if($date != 1) {\r\n $startDate->modify('last Monday');\r\n }\r\n break;\r\n case self::$modeDay:\r\n break;\r\n default:\r\n throw new \\Exception(\"ViewMode is not known in ViewCalendar.\");\r\n break;\r\n }\r\n\r\n $startDate->setTime(0, 0, 0);\r\n return $startDate;\r\n }",
"private function getStartDate( $start_date )\n {\n return $this->matchDateFormat( $start_date )\n ? $start_date\n : Carbon::now()->subDays(7)->format('Y-m-d');\n }",
"private function getStartDate( $start_date )\n {\n return $this->matchDateFormat( $start_date )\n ? $start_date\n : Carbon::now()->subDays(7)->format('Y-m-d');\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 getStartDate() \n {\n return $this->_fields['StartDate']['FieldValue'];\n }",
"public function first_term(){\n return $this->first_day_first_semester->day.' '\n .trans('dates.month.'.$this->first_day_first_semester->month).' - '\n .$this->last_day_first_semester->day.' '\n .trans('dates.month.'.$this->last_day_first_semester->month);\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 getStartDate();",
"public function getStartDate();",
"function getFirstName() {\n\t\treturn $this->getInfo('FirstName');\n\t}",
"public static function getContact($customer_id, $type = \"Telephone\") {\n $record = Doctrine_Query::create ()->select ( 'contact' )\n \t\t\t\t\t\t\t ->from ( 'Contacts c' )\n \t\t\t\t\t\t\t ->leftJoin ( 'c.ContactsTypes t' )\n \t\t\t\t\t\t\t ->where ( \"customer_id = ? and t.name = ?\", array($customer_id, $type) )\n \t\t\t\t\t\t\t ->limit ( 1 )\n \t\t\t\t\t\t\t ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n \t\t\t\t\t\t\t \n return !empty($record[0]['contact']) ? $record[0]['contact'] : array();\n }",
"public function getDateFrom()\n {\n return isset($this->dateFrom) ? $this->dateFrom : null;\n }",
"function getContractStartDate($prj_id, $customer_id, $contract_id = false)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getContractStartDate($customer_id, $contract_id);\n }",
"public function getFormattedStartDate() {\n\t\t$format_1 = 'Y-m-d';\n\t\t$format_2 = 'Y-m-d H:i';//format coming from web page\n\t\t$format_3 = 'Y-m-d H:i:s';//format coming from mysql\n\t\t$date = null;\n\t\t$formatted_date = \"\";\n\t\t\n\t\tif (!isset($this -> start_time) ) \n\t\t\treturn \"\";\n\t\t$date = DateTime::createFromFormat($format_2, $this -> start_time);\n\t\tif ( $date == false )\n\t\t\t$date = DateTime::createFromFormat($format_3, $this -> start_time);\n\t\t// var_dump($date);\n\t\treturn $date == false ? \"\" : $date->format($format_1) ;\n\t\t\n\t}",
"public function getStartDate()\n {\n return $this->stringToDate((string) $this->json()->start_date);\n }",
"function get_contact_name( $cid ){\n if(empty($cid)){\n return \"Null\";\n }\n $params = array(\n 'version' => 3,\n 'sequential' => 1,\n 'id' => $cid\n );\n $aContact = civicrm_api('Contact', 'get', $params);\n if( $aContact['is_error'] != 1 && $aContact['count']!= 0 ){\n \n /* $name = sprintf( \"<a href='civicrm/contact/view?reset=1&cid=%d'>%s</a>\"\n , $cid\n , $aContact['values'][0]['display_name']\n );\n \n */\n $name = $aContact['values'][0]['display_name'];\n }\n return $name; \n }",
"private function getEventStartDate()\n {\n $startDate = $this->TicketPage()->getEventStartDate();\n $this->extend('updateEventStartDate', $startDate);\n return $startDate;\n }",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(TorrentTableMap::COL_DATE_CRAWLED);\n }",
"function get_start_date($values,$min_date = '')\n {\n // set default to 30 days ago\n if(empty($min_date))\n $min_date = 30;\n\n if(!empty($values['sdate']))\n {\n $sdate = explode(\"-\",$values['sdate']);\n $start_timestamp = mktime(0,0,0,$sdate[1],$sdate[2],$sdate[0]);\n }\n else\n $start_timestamp = time()-60*60*24*(int)$min_date;\n \n return $start_timestamp;\n }",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(PlanPeer::CREATED_AT);\n }",
"public function getStartOfDayDate()\n\t{\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n\t\treturn $objectManager->create('\\Magento\\Framework\\Stdlib\\DateTime\\DateTime')->date(null, '0:0:0');\n\t}",
"public function firstCreatedFirst()\n {\n return $this->addAscendingOrderByColumn(ClientStateTableMap::COL_CREATED_AT);\n }"
] | [
"0.66933733",
"0.63704073",
"0.63404536",
"0.63132966",
"0.6234883",
"0.60384035",
"0.603287",
"0.6024802",
"0.5996857",
"0.5894629",
"0.58405346",
"0.58069503",
"0.5731643",
"0.56996036",
"0.5659405",
"0.5656215",
"0.56338644",
"0.5597858",
"0.5568438",
"0.55662316",
"0.5552527",
"0.5552243",
"0.5538769",
"0.55159914",
"0.55136454",
"0.55108124",
"0.5509004",
"0.5454976",
"0.54470134",
"0.5437243",
"0.5432381",
"0.5424022",
"0.54115015",
"0.54102796",
"0.5374599",
"0.53642976",
"0.53625405",
"0.5360889",
"0.53578997",
"0.5343956",
"0.53408843",
"0.5330658",
"0.5317912",
"0.5271333",
"0.5245598",
"0.52334136",
"0.5222042",
"0.52099496",
"0.5206475",
"0.51985353",
"0.5195036",
"0.51938355",
"0.51913375",
"0.5186417",
"0.51795745",
"0.5179439",
"0.5173047",
"0.5172715",
"0.5170737",
"0.5170427",
"0.5164218",
"0.51623845",
"0.5153985",
"0.5152857",
"0.51452523",
"0.5140299",
"0.5139482",
"0.5137128",
"0.51366913",
"0.51325244",
"0.5128342",
"0.5115196",
"0.5105034",
"0.51024336",
"0.5091755",
"0.5091755",
"0.5091755",
"0.5091755",
"0.5091755",
"0.5091755",
"0.5091755",
"0.5091755",
"0.5086914",
"0.5076445",
"0.50695795",
"0.5067685",
"0.5067685",
"0.50637305",
"0.50624645",
"0.5058823",
"0.50439423",
"0.5042883",
"0.50428486",
"0.50317717",
"0.50293994",
"0.5028526",
"0.5027721",
"0.50224096",
"0.501572",
"0.5007369"
] | 0.7987506 | 0 |
Static function to get number of Enkelvoudige Hulpvraag for contact | static function getCountEnkelvoudigeHulpvraag($contactId) {
$countAct = 0;
$apiParams = array(
'version' => 3,
'contact_id'=> $contactId
);
$actTypeId = self::getEnkelvoudigeHulpvraagTypeId();
$apiActs = civicrm_api('Activity', 'Get', $apiParams);
foreach ($apiActs['values'] as $actId => $apiAct) {
if ($apiAct['activity_type_id'] == $actTypeId) {
if (isset($apiAct['targets'])) {
if (key($apiAct['targets']) == $contactId) {
$countAct++;
}
}
}
}
return $countAct;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHouseNumber();",
"public function getTotalHT(){\n\t\t$HT=0;\n\t\tforeach ($this->_leslignes->getAll() as $uneligne){\n\t\t\t$HT+=$uneligne->getTotal();\n\t\t}\n\t\treturn $HT;\n\t}",
"public function getNumber()\n {\n foreach ($this->getGame()->getLegs() as $idx=>$leg) {\n if ($leg == $this) {\n return $idx+1;\n }\n }\n\n return null;\n }",
"public function getOehhnbr()\n {\n return $this->oehhnbr;\n }",
"public function getNumberOfHMetrics() {}",
"public function intensidad(){\n if($this->PP03F < 35 && $this->PP03G == 1 && $this->PP03H == 1)\n {\n return 1;\n }\n if($this->caracteristicas->CH06 >= 10 && $this->PP03G == 1 && $this->PP01E == 5)\n {\n return 2;\n }\n if( $this->PP03F > 40)\n {\n return 3;\n }\n if($this->PP01E == 5)\n {\n return 4;\n }\n}",
"public function getNbHCasPart() {\n return $this->nbHCasPart;\n }",
"function spectra_address_count ()\n\t{\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT COUNT(*) AS `found` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"` WHERE 1\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"found\"]) || $result[\"found\"] == 0)\n\t\t{\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn $result[\"found\"];\n\t\t}\n\t}",
"function getNapetiKlima():int {\n return $this->napetiKlima;\n }",
"public function getKbs(): int;",
"public function getNumOpe()\n {\n return $this->numOpe;\n }",
"public function getNumagence()\n {\n return $this->numagence;\n }",
"public static function nbContactsTotal() {\n $total = \\Phonebook\\Models\\CoreModel::findAll();\n $full_contacts = Count($total);\n return $full_contacts;\n echo $this->templates->render('home');\n }",
"public function getNumber_hits()\n {\n return $this->number_hits;\n }",
"public function getNbHNuit(): ?float {\n return $this->nbHNuit;\n }",
"public function getNumber(): int\n {\n return self::ROULETTE[$this->getPosition()];\n }",
"public function getCFU(): int\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->cfu * $esame->in_cdl;\n }, 0);\n }",
"function getNumberOfMembers(){\n\t\t$number = 0;\n\t\tforeach ($this->members as $obj){\n\t\t\t$number++;\n\t\t}\n\t\treturn $number;\n\t}",
"public function notiNum() {\n if (Auth::check()) {\n $join = User::find(Auth::id())->join_request;\n $filter = $join->where('status', Join::REQUEST);\n return count($filter);\n } else {\n return 0;\n }\n }",
"abstract public function getHitCount() : string;",
"function get_nbre_conso(){\n\t\tglobal $bd;\n\t\t$req = $bd->query(\"SELECT SUM(nbre) as nbre FROM consommateur WHERE etat = 'present' \");\n\t\t$data = $req->fetch();\n\t\treturn $data['nbre'];\n\t}",
"public function getNbAddresses()\n\t{\n\t\tif ( $this->nb_addresses === null ) {\n\t\t\t$this->nb_addresses = gmp_strval(gmp_pow(2, $this->getMaxPrefix() - $this->prefix));\n\t\t}\n\t\treturn $this->nb_addresses;\n\t}",
"public function getEntryCount() {}",
"public function newContactsNumber()\n {\n // On calcule le nombre de recontacs demandés\n $sql = 'SELECT `item_id`\n FROM `items`\n WHERE `mission_id` = :mission\n AND `item_statut` = 4';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $this->_data['mission_id'], PDO::PARAM_INT);\n $query->execute();\n\n // On récupère le nombre demandé\n return $query->rowCount();\n }",
"public function keyCount() : int;",
"public function getNbHn(): ?float {\n return $this->nbHn;\n }",
"private function checkForNumberOfHits()\n {\n // Get number of hits per page\n $hits = $this->app->request->getGet(\"hits\", 4);\n\n if (!(is_numeric($hits) && $hits > 0 && $hits <= 8)) {\n $hits = 4;\n }\n return $hits;\n }",
"public function getHerosCount()\n {\n return $this->count(self::_HEROS);\n }",
"public function getHerosCount()\n {\n return $this->count(self::_HEROS);\n }",
"public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }",
"public function luas_Persegi()\n {\n $hitung = $this->lebar * $this->panjang;\n return $hitung;\n }",
"public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}",
"public function getSegCountX2() {}",
"public function poslednji_vestackiId() \n {\n $ocene=$this->findAll();\n $maxId=-1;\n foreach ($ocene as $ocena)\n {\n if ($ocena->VestackiId>$maxId)\n {\n $maxId=$ocena->VestackiId; \n }\n }\n return $maxId;\n }",
"function NUMERO_DE_HIJOS($edad, $fecha=NULL) {\r\n\tglobal $_ARGS;\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m, $d) = split(\"[/.-]\", $fecha); $anio = $a - ($edad + 1);\r\n\t$mes = intval($m);\r\n\t$fecha = \"$anio-$mes-$d\";\r\n\r\n\t$sql = \"SELECT *\r\n\t\t\tFROM rh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' AND\r\n\t\t\t\tFechaNacimiento >= '\".$fecha.\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}",
"public function getTrackNumber() {}",
"public function getViewNum(){\n $map['type'] = \\Addons\\Stat\\StatCont::WEBSITE_VIEW;\n $view_num = $this->where($map)->sum('num');\n return $view_num == '' ? 0 : $view_num;\n }",
"public function getHival() {}",
"static function getEnkelvoudigeHulpvraagTypeId() {\n $actTypeId = 0;\n $apiParams = array(\n 'version' => 3,\n 'option_group_id' => 2,\n 'label' => \"Enkelvoudige Hulpvraag\"\n );\n $actType = civicrm_api('OptionValue', 'Getsingle', $apiParams);\n if (!isset($actType['is_error']) || $actType['is_error'] == 0) {\n $actTypeId = $actType['value'];\n }\n return $actTypeId;\n }",
"public function getNumberOfComponents() {}",
"public function getNbHComp(): ?float {\n return $this->nbHComp;\n }",
"function creaChampionnatNbRencontre($nb_equipe)\n{\n if($nb_equipe==4){$nb_rencontre=5;}\n else if($nb_equipe==6){$nb_rencontre=8;}\n else if($nb_equipe==8){$nb_rencontre=15;}\n else if($nb_equipe==12){$nb_rencontre=19;}\n else if($nb_equipe==16){$nb_rencontre=31;}\n else if($nb_equipe==24){$nb_rencontre=39;}\n else if($nb_equipe==32){$nb_rencontre=63;}\n \n return $nb_rencontre;\n}",
"function totalHomers($myHomers)\n\n{\n$total = 0;\n\nreturn $total += $myHomers;\n\n \n\n>>>>>>> 0aea4fa598d4bbc27b76b05d0d4b3cbb78a17705\n}",
"public function countEm()\n {\n $qb = $this->createQueryBuilder('g');\n $qb->select('count(g.id) AS counter');\n $query = $qb->getQuery();\n return $query->getSingleScalarResult();\n }",
"public function size()\n {\n return 100 - $this->eaten;\n }",
"function ifx_num_fields($result_id)\n{\n}",
"public function getPointCount() {}",
"function panier_get_count() {\n global $panier;\n $resultat = 0;\n foreach ($panier as $item) {\n $resultat+= $item[PS_PANIER_ITEM_QTY];\n }\n return $resultat;\n}",
"function getNoOfHolidays ()\n {\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE name = 'holiday'\";\n $stmt = $this->connection->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->holiday_entitlement = $row['entitlement'];\n return $this->holiday_entitlement;\n }",
"public function n() : int\n {\n return $this->n;\n }",
"public function n() : int\n {\n return $this->n;\n }",
"function get_entradas_boni_list_count($ubicacion)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select count(distinct(e.pr_facturas_id)) as total from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.espacios_fisicos_id=$ubicacion and e.estatus_general_id=1 and ctipo_entrada=9\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows == 1){\n\t\t\treturn $u->total;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function nSmFromIp($sm) {\n\n $count = 0;\n\n for($i=0;$i<32;$i++) {\n\n if($sm[$i]==\"1\") {\n $count++;\n }\n }\n \n return $count;\n}",
"function GetSpeedIncreaseLumber(&$wg_buildings){\n\tglobal $db;\n\t$sum=0;$i=0;\n\tif($wg_buildings)\n\t{\n\t\tforeach ($wg_buildings as $ptu)\n\t\t{\n\t\t\tif($ptu->index<19)\n\t\t\t{\n\t\t\t\tif($ptu->type_id==1)\n\t\t\t\t{\n\t\t\t\t\t$sum=$sum+$ptu->product_hour;\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tif($i==19){break;}\n\t\t}\n\t\treturn $sum;\n\t}\n\telse\n\t{\n\t\theader(\"Location:logout.php\");\n\t\texit();\n\t}\n}",
"public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }",
"function getPoints() :int{\n switch ($this->getNumber()){\n case 5: return 5; // queen of spades\n case 28: return 2; // jacks of clubs\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n return 1; // all hearts\n default: return 0; // rest of cards\n }\n }",
"public function getElementCounter() {}",
"public function getNumeroCarteAgence()\n {\n $query_rq_numero = \"SELECT agence.idcard FROM agence WHERE agence.rowid = :agence\";\n $numero = $this->getConnexion()->prepare($query_rq_numero);\n $numero ->bindParam(\"agence\",$this->idagence);\n $numero->execute();\n $row_rq_numero= $numero->fetchObject();\n //return $this->idagence;\n return $row_rq_numero->idcard;\n }",
"public function getNumLigne() {\n return $this->numLigne;\n }",
"public function getFieldCount() {}",
"function fiftyone_degrees_get_node_length($node, $headers) {\n $root = fiftyone_degrees_get_nodes_root_node($node['offset'], $headers);\n return $root['position'] - $node['position'];\n}",
"public function getChiefId($post){ \n\t\tforeach($this->structure as $key => $value){\n\t\t\tif($value['number'] == $this->structure[$post]['number'] - 1){\n\t\t\t\treturn mt_rand($value['segment-start'], $value['segment-end']);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"function get_entradas_boni_gral_list_count($ubicacion)\n\t{\n\t\t$u = new Entrada();\n\t\t$sql=\"select count(distinct(e.pr_facturas_id)) as total from entradas as e left join cproveedores as pr on pr.id=e.cproveedores_id left join pr_facturas as prf on prf.id=e.pr_facturas_id left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id left join estatus_general as eg on eg.id=e.estatus_general_id where e.estatus_general_id=1 and ctipo_entrada=9\";\n\t\t//Buscar en la base de datos\n\t\t$u->query($sql);\n\t\tif($u->c_rows == 1){\n\t\t\treturn $u->total;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function countLigne_equipe_personne(){\n\t\t\t\t\t return count($this->listeLigne_equipe_personne());\n\t\t\t\t\t }",
"public function nbEmprunt()\n\t\t{\n\t\treturn $this->lesEmprunts->count();\n\t\t}",
"public function getZoho()\n {\n $ret = \"97916613\";\n \treturn $ret;\n }",
"function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }",
"function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }",
"private function getSpecNoSkel(){\n\t\t$cnt = 0;\n\t\tif($this->collid){\n\t\t\t$sql = 'SELECT count(o.occid) AS cnt '.\n\t\t\t\t'FROM omoccurrences o '.\n\t\t\t\t'WHERE (o.collid = '.$this->collid.') AND (o.processingstatus = \"unprocessed\") '.\n\t\t\t\t'AND (o.sciname IS NULL) AND (o.stateprovince IS NULL)';\n\t\t\t$rs = $this->conn->query($sql);\n\t\t\twhile($r = $rs->fetch_object()){\n\t\t\t\t$cnt = $r->cnt;\n\t\t\t}\n\t\t\t$rs->free();\n\t\t}\n\t\treturn $cnt;\n\t}",
"public function NIVEL_ED(){\n $ch12 = $this->caracteristicas->CH12;\n $ch13 = $this->caracteristicas->CH13;\n $ch10 = $this->caracteristicas->CH10;\n if($ch10 == 3)\n {\n return 0;\n }\n if ($ch12 == 1 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 2 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 3 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 4 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 5 && $ch13 == 2) {\n return 1;\n }\n if ($ch12 == 6 && $ch13 == 2) {\n return 1;\n }\n //\n if ($ch12 == 5 && $ch13 == 1) {\n return 2;\n }\n if ($ch12 == 6 && $ch13 == 1) {\n return 2;\n }\n //\n if ($ch12 == 7 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 8 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 9 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 10 && $ch13 == 2) {\n return 3;\n }\n //\n if ($ch12 == 7 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 8 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 9 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 10 && $ch13 == 1) {\n return 4;\n }\n //\n if ($ch12 == 11 && $ch13 == 2) {\n return 5;\n }\n if ($ch12 == 12 && $ch13 == 2) {\n return 5;\n }\n //\n if ($ch12 == 11 && $ch13 == 1) {\n return 6;\n }\n if ($ch12 == 12 && $ch13 == 1) {\n return 6;\n }\n //\n if ($ch12 == 13 && $ch13 == 2) {\n return 7;\n }\n if ($ch12 == 13 && $ch13 == 1) {\n return 8;\n }\n if ($ch13 == 9 || $ch13 == 0) {\n return 9;\n }\n }",
"function number_of_registrations($organization_id)\n{\n global $connect;\n $dem = 0;\n $sql_number = mysqli_query($connect, \"SELECT * from student_registration where request_id=$organization_id \");\n\n while ($sl = mysqli_fetch_assoc($sql_number)) {\n\n $dem++;\n }\n echo $dem;\n}",
"public function tonnage() {\r\n\t\tif ($this->isStarship()) {\r\n\t\t\treturn $this->techData['tonnage'];\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}",
"function getNumberOfSpecies();",
"public function getPothinvcnbr()\n {\n return $this->pothinvcnbr;\n }",
"public function getHpInfoCount()\n {\n return $this->count(self::_HP_INFO);\n }",
"function calcNumActiveGuests(){\r\n\t /* Calculate number of GUESTS at site */\r\n\t $sql = $this->connection->query(\"SELECT * FROM \".TBL_ACTIVE_GUESTS);\r\n\t $this->num_active_guests = $sql->rowCount(); \r\n\t}",
"public function getSelfHeroesCount()\n {\n return $this->count(self::_SELF_HEROES);\n }",
"public function getSelfHeroesCount()\n {\n return $this->count(self::_SELF_HEROES);\n }",
"public function getPhadicellnbr()\n {\n return $this->phadicellnbr;\n }",
"function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}",
"public function getNumber();",
"public function totalPenggunaanPengetahuan()\n {\n return $this->db->table('kuesioner')->select('jawaban6')->where('jawaban1', 'sudah')->countAllResults();\n }",
"public function getNumcompte()\n {\n return $this->numcompte;\n }",
"public function getNumcompte()\n {\n return $this->numcompte;\n }",
"function NUMERO_DE_HIJOS_MENORES14($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t\r\n\tlist($a, $m) = split(\"[/.-]\", $_ARGS[\"PERIODO\"]); $anio = $a - 15;\r\n\t$mes = intval($m) + 1;\r\n\tif ($mes > 12) { $mes = 1; $anio++; }\r\n\tif ($mes < 10) $mes = \"0$mes\";\t\r\n\t$fecha = \"$anio-$mes-01\";\r\n\r\n\t$sql = \"SELECT *\r\n\t\t\tFROM rh_cargafamiliar\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tParentesco = 'HI' AND\r\n\t\t\t\tFechaNacimiento >= '\".$fecha.\"'\";\techo \"$sql\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\treturn intval(mysql_num_rows($query));\r\n}",
"public function num() {\n return $this->num;\n }",
"public function NumAdeudos(){\n\t\t$UsCg = new HomeController();\n\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t$UsCfechaactual = date('Y-m-d');\n\t\t$UsCseccion = DB::table(\"colegiatura\")->where(\"Alumno_idAlumno\",Session::get(\"usuario\"));\n\t\t$UsCcolegiaturas = $UsCseccion->orderBy('periodo_idperiodo', 'asc')->get();\n\t\t$UsCconcole = $UsCseccion->count();\n\t\t$UsCusuario = DB::table(\"alumno\")->where(\"idAlumno\",Session::get(\"usuario\"))->first();\n\t\t$UsCadeudo = ($UsCg->restaFechas($UsCusuario->fecha, $UsCfechaactual))-$UsCconcole;\n\t\tif ($UsCadeudo < 0) {$UsCadeudo = 0;}\n\t\treturn \"- Adeudos: \".$UsCadeudo;\n\t}",
"public function getNbrHeures(): ?float {\n return $this->nbrHeures;\n }",
"public function getNbrNoticeExtension()\n {\n $nbrNotice = $this->doctrine\n ->getRepository('NajdahAppBundle:Declaration')\n ->getNomberNoticeNomber();\n \n return $nbrNotice;\n }",
"public function getNprcifecha()\n {\n return $this->nprcifecha;\n }",
"private function nbFemelle ($l)\n {\n $nbFemelle = 0;\n \n $id_l = $l->getId();\n foreach ($this->anemones as $a) {\n if (! $a->isDead) {\n $a_id = $a->getIdLagon();\n if ($a_id == $id_l) {\n if ($a->getActualCapacity() > 0) {\n $nbFemelle += 1;\n }\n }\n }\n }\n return $nbFemelle;\n }",
"function hitungDenda(){\n\n return 0;\n }",
"function getEscalatinMaxCnt($DbConnection)\n{\n\t$query =\"SELECT Max(serial)+1 as seiral_no FROM escalation\"; ///// for auto increament of geo_id /////////// \n\t$result=mysql_query($query,$DbConnection);\n\t$row=mysql_fetch_row($result);\n\treturn $row[0];\n}",
"function getExtensionFactory($game_id, $round_number, $company_id, $factory_number){\r\n\t\t\t$result = 0;\r\n\t\t\t$capacity=new Model_DbTable_Decisions_Pr_Capacity();\r\n\t\t\t$extension_factory=$capacity->getExtensionWasCreated($game_id, $company_id, $factory_number);\r\n\t\t\tfor ($round = 2; $round < $round_number; $round++) {\r\n\t\t\t\t$result+=$extension_factory['factory_number_'.$factory_number]['capacity_'.$round];\r\n\t\t\t\t// $round_created=$extension_factory['factory_number_'.$factory_number]['round_number_created_'.$round];\r\n\t\t\t\t// //var_dump($round_created);\r\n\t\t\t\t// if($round_number>$round_created){\r\n\t\t\t\t\t// $extension[$round]=$extension_factory['factory_number_'.$factory_number]['capacity_'.$round];\r\n\t\t\t\t\t// //var_dump($extension);\r\n\t\t\t\t// }\r\n\t\t\t\t// else {\r\n\t\t\t\t\t// $extension[$round]=0;\r\n\t\t\t\t// }\r\n\t\t\t\t// $result+=$extension[$round];\r\n\t\t\t\t// if($result==null){\r\n\t\t\t\t\t// $result=0;\r\n\t\t\t\t// }\r\n\t\t\t}\r\n\t\t\treturn $result;\t\t\r\n\t\t}",
"function chartonum($charin) {\n\t\t$numa=ord('A'); \t\t//\twe want charin='A' to produce 1, so \n\t\t$numin=ord($charin); \t//\twe want num=1 to produce A, so: \n\t\t$numout=$numin-$numa+1; // now if numin=1, numout = chr('A') \t\n\t\treturn $numout; \n\t}",
"public function getVigour()\n {\n $value = $this->get(self::VIGOUR);\n return $value === null ? (integer)$value : $value;\n }",
"public function getInGame() : int {\n\t\treturn $this->generator->getInGame();\n\t}",
"public function getBelongedNumProjects() {\n $sql = \"SELECT numPorject FROM category_numproject WHERE category_id = %d\";\n $sql = sprintf($sql, $this->id);\n $results = self::$connection->execute($sql);\n if (count($results) != 1) {\n return 0;\n } else {\n return $results[0]['numporject'];\n }\n }",
"public function getTotalSubeixoRodovias(){\n\t\t$total = 0;\n\t\t$i=0;\n\t\twhile($i<count($this->result)){\n\t\t\tif($this->result[$i]->idn_digs == 1000)\n\t\t\t\t$total++;\n\t\t\t$i++;\n\t\t}\n\t\treturn $total;\n\t}",
"function vcn_get_career_count() {\t\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry(), 'ignoreworktype' => 'Y'), 'json');\r\n\treturn count($data);\r\n}"
] | [
"0.6399133",
"0.60220885",
"0.5798944",
"0.5786423",
"0.5723072",
"0.5722873",
"0.5702131",
"0.5684648",
"0.5679618",
"0.56184244",
"0.56121504",
"0.5603582",
"0.5578582",
"0.55683124",
"0.5556056",
"0.5549493",
"0.55044395",
"0.55020386",
"0.5490096",
"0.548095",
"0.54788834",
"0.54695386",
"0.54646736",
"0.5455151",
"0.5455141",
"0.54457724",
"0.5436477",
"0.54359806",
"0.54359806",
"0.5433741",
"0.54272187",
"0.5426595",
"0.5424748",
"0.5421569",
"0.54108644",
"0.5408502",
"0.5402387",
"0.53971565",
"0.538767",
"0.53801954",
"0.5379165",
"0.5375135",
"0.53739434",
"0.5366984",
"0.5366821",
"0.53626543",
"0.53576994",
"0.53443927",
"0.53424764",
"0.53422",
"0.53422",
"0.53360283",
"0.5332916",
"0.5331939",
"0.5317949",
"0.5316699",
"0.53132975",
"0.53021115",
"0.52974397",
"0.5295669",
"0.529424",
"0.5293787",
"0.5293588",
"0.52931815",
"0.5290155",
"0.52854073",
"0.5280731",
"0.5280731",
"0.52793795",
"0.5274633",
"0.52742827",
"0.526847",
"0.52642715",
"0.52638113",
"0.52627903",
"0.5257299",
"0.525613",
"0.525613",
"0.52522564",
"0.52514905",
"0.5250005",
"0.5247093",
"0.5245868",
"0.5245868",
"0.5244975",
"0.52403766",
"0.5239321",
"0.52325547",
"0.52322483",
"0.522863",
"0.5227589",
"0.522753",
"0.52158386",
"0.52112806",
"0.5209466",
"0.52064526",
"0.5202958",
"0.5202503",
"0.5201089",
"0.52007955"
] | 0.62961245 | 1 |
Static function to get number of Cases for contact | static function getCountCases($contactId) {
$countCases = 0;
$apiParams = array(
'version' => 3,
'client_id' => $contactId
);
$apiCaseCount = civicrm_api('Case', 'Getcount', $apiParams);
if (!isset($apiCaseCount['is_error'])) {
$countCases = (int) $apiCaseCount;
}
return $countCases;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function countPersonContacts()\n {\n\n $db = $this->getDb();\n \n $sql = <<<SQL\nSELECT\n count(contact.rowid) as number\nFROM\n core_contact_r contact\nJOIN core_person_r person\n ON contact.id_person = person.rowid\nWHERE person.type = 1;\n \nSQL;\n \n return $db->select($sql)->getField('number');\n\n }",
"public function countCompanyContacts()\n {\n \n $db = $this->getDb();\n \n $sql = <<<SQL\nSELECT\n count(contact.rowid) as number\nFROM\n core_contact_r contact\nJOIN core_person_r person\n ON contact.id_person = person.rowid\nWHERE person.type = 2;\nSQL;\n \n return $db->select($sql)->getField('number');\n \n }",
"public static function nbContactsSelected() {\n $total = self::search();\n $selected_contacts = Count($total);\n return $selected_contacts;\n echo $this->templates->render('home');\n }",
"public function cases_count()\n\t{\n\t\treturn array(\n\t\t\tarray(2, 7, true, false, 5),\n\t\t\tarray(2, 7, false, false, 4),\n\t\t\tarray(2, 7, false, true, 5),\n\t\t\tarray(2, 7, true, true, 6),\n\t\t\tarray(9, -1, true, false, 0),\n\t\t);\n\t}",
"public function getAnswerCount();",
"public static function nbContactsTotal() {\n $total = \\Phonebook\\Models\\CoreModel::findAll();\n $full_contacts = Count($total);\n return $full_contacts;\n echo $this->templates->render('home');\n }",
"public function newContactsNumber()\n {\n // On calcule le nombre de recontacs demandés\n $sql = 'SELECT `item_id`\n FROM `items`\n WHERE `mission_id` = :mission\n AND `item_statut` = 4';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $this->_data['mission_id'], PDO::PARAM_INT);\n $query->execute();\n\n // On récupère le nombre demandé\n return $query->rowCount();\n }",
"static function getCountEnkelvoudigeHulpvraag($contactId) {\n $countAct = 0;\n $apiParams = array(\n 'version' => 3,\n 'contact_id'=> $contactId\n );\n $actTypeId = self::getEnkelvoudigeHulpvraagTypeId();\n $apiActs = civicrm_api('Activity', 'Get', $apiParams);\n foreach ($apiActs['values'] as $actId => $apiAct) {\n if ($apiAct['activity_type_id'] == $actTypeId) {\n if (isset($apiAct['targets'])) {\n if (key($apiAct['targets']) == $contactId) {\n $countAct++;\n }\n }\n }\n }\n return $countAct;\n }",
"public function getTotalCasesInDept(){\n $dept = $this->dept;\n $users = User::where(['department' => $dept->id])->select('users.id')->get();\n $sum = 0;\n foreach($users as $user){\n $numberOfCasesIntaken = LegalCase::where(['staff' => $user->id])->count();\n $sum += $numberOfCasesIntaken;\n }\n return $sum;\n }",
"function countCandidate()\n\t{\n\t\tglobal $DB,$frmdata;\n\t\t\n\t\t$totalCandidate = $DB->SelectRecord('candidate', '', 'count(*) as candidate');\n\t\t//print_r($totalCandidate);\n\t\treturn $totalCandidate;\n\t}",
"public function count(): int\n {\n return count($this->testCases);\n }",
"public function getCounter();",
"function countMySentCv($from,$to,$consultant,$client)\n\t\t {\n\t\t $sql = \"SELECT COUNT(DISTINCT cand_id) As cnt FROM pof_candidates JOIN candidates ON pof_candidates.cand_id=candidates.id RIGHT JOIN pof ON pof_candidates.pofid=pof.pof_id LEFT JOIN synonym ON synonym.s_id=pof.client_id LEFT JOIN synonym As a1 ON a1.s_id=pof.location LEFT JOIN be_users ON pof_candidates.user_id=be_users.id WHERE (pof_candidates.date BETWEEN '\".$from.\"' AND '\".$to.\"') AND be_users.username LIKE '%\".$consultant.\"%' AND stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' )\t \";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t\t }",
"public function count_cases() {\n\t\t$q = SalesHistoryDetailQuery::create();\n\t\t$q->withColumn('SUM('.SalesHistoryDetail::get_aliasproperty('qty_cases').')', 'cases');\n\t\t$q->select('cases');\n\t\t$q->filterByOrdernumber($this->oehhnbr);\n\t\treturn $q->findOne();\n\t}",
"function countCvsent($pid)\n\t\t {\n\t\t $sql = \"SELECT COUNT(DISTINCT cand_id) As cnt FROM pof_candidates WHERE pofid =\".$pid.\" AND stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' ) \";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t\t }",
"function getAllNumClases(){\n\t\t$clase=$this->nmclass;\n\t\t$u=$this->cant_clases;\n\t\treturn $u;\n\t}",
"public static function count();",
"public function getCabinetCountAttribute()\n {\n return $this->cabinets->count();\n }",
"static function customerCount( )\n {\n $db = eZDB::instance();\n $countArray = $db->arrayQuery( \"SELECT count( DISTINCT email) AS count FROM ezorder WHERE is_temporary='0'\" );\n return $countArray[0]['count'];\n }",
"public function getCallCount()\n {\n return count($this->data['calls']);\n }",
"public function getNbActors(){\n $nbActors = DB::table('actors')\n ->count();\n\n return $nbActors;\n }",
"public function count(){\n return count($this->accounts);\n }",
"public function getMemberCnt()\n {\n return $this->get(self::_MEMBER_CNT);\n }",
"public function countContractors()\n\t{\n\t\t$farmer = \"select id from users_roles where name = 'Contractor' \";\n\t\t$f = DB::query($farmer)->execute()->as_array();\n\t\t$f_id = @$f[0]['id']; \n\t\t\n\t\t//got it, lets proceed\n\t\tif(!is_null($f_id)){\n\t\t\t\n\t\t\t//lets count number of users subscribed to the contractor role\n\t\t\t$pple = \"select count(distinct(user_id)) as tmpvar from users_user_roles\nwhere role_id = $f_id \";\n\n\t\t\t$tmp \t= DB::query($pple)->execute()->as_array();\n\t\t\t$fcount = @$tmp[0]['tmpvar'];\n\t\t\treturn $fcount;\n\t\t}\n\t\treturn 0;\n\t\n\t\t\n\t}",
"private function ts_getDisplayInCaseOfNoCounting()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS filter configuration\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n $displayInCaseOfNoCounting = $conf_array[ 'wrap.' ][ 'item.' ][ 'displayInCaseOfNoCounting' ];\n\n // RETURN TS value\n return $displayInCaseOfNoCounting;\n }",
"public function countCanceledMembers(){\r\n \r\n $dbs = $this->getDB()->prepare\r\n ('select * from memberstatus where StatusCode = \"C\"');\r\n $dbs->execute();\r\n $countCanceled = $dbs->rowCount();\r\n \r\n return $countCanceled;\r\n }",
"function getNumberOfMembers(){\n\t\t$number = 0;\n\t\tforeach ($this->members as $obj){\n\t\t\t$number++;\n\t\t}\n\t\treturn $number;\n\t}",
"function CountCorrectAns(){\n\t\n\t\t\t\tglobal $count;\n\t\t\t\twhile($correct){\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\treturn $count;\n\t\t\t}",
"abstract public function countCardsInLocations(): array;",
"public function getCustomerInfoCount()\n {\n return $this->count(self::customer_info);\n }",
"public function _count();",
"public function GetPatientsCount();",
"private function getRecordCounter()\n {\n $recordCounter = DentalLog::where('clinicType', '=', 'D')->count();\n $recordCounter++;\n\n return $recordCounter;\n }",
"public function getResolvedIncidents(): int;",
"function count(){}",
"public function getActivitiesCount() : int;",
"private function getCount()\n {\n $bd = Core::getBdd()->getDb();\n $u_insc_c = \"SELECT DISTINCT COUNT(u.id) as c FROM c_user u\";\n $insc = 0 + $bd->query($u_insc_c)->fetchObject()->c;\n return ($insc);\n }",
"function count() ;",
"function vcn_get_career_count() {\t\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry(), 'ignoreworktype' => 'Y'), 'json');\r\n\treturn count($data);\r\n}",
"public function numeroInscripciones()\n {\n $socio = Auth()->user()->socio->id;\n $res = Inscription::where('partners_id', $socio)->count();\n return $res;\n }",
"public function sentCount();",
"public function getCardCount()\n {\n return $this->count(self::CARD);\n }",
"public function count()\n {\n return count($this->group);\n }",
"function actual_count($data)\n{\n //do not ask me why, but count() doesn't work on $result->turns\n $i = 0;\n foreach ($data as $stuff) {\n $i++;\n }\n\n return $i;\n}",
"public function CounterMail(){\n\n $CantidadMails = ($this->ConfigModelo->select('rowCountWhere', 'Mensajes', 'estado', '0', 'Id', 'Id'));\n\n return $CantidadMails;\n\n }",
"function count_student_in_course() {\n\tglobal $nbStudents;\n\treturn $nbStudents;\n}",
"public function getClientCountInfo()\n {\n $payload = JWTAuth::parseToken()->getPayload();\n $logged_userid = $payload['login_db_userid']; \n $c_account_key = $payload['c_acc_key'];\n $db_name = $payload['db_name'];\n $agency_id = $payload['agencyid'];\n $qry_profpic = DB::select(\"SELECT * FROM [$db_name].[dbo].[user_accounts] \n WHERE user_id = \".$logged_userid);\n $userid = $qry_profpic[0]->user_id;\n $cw_Puserid = $qry_profpic[0]->case_worker_parent_user_id;\n $cw_agency_id = $qry_profpic[0]->agency_id;\n \n $dashclientarr= [array('responsecount' => $userid,'msgcount' => $cw_agency_id,'opencasecount' => $cw_Puserid )];\n \n return $dashclientarr;\n }",
"function getNumeroDeBeneficiarios(){\n\t\t\t$benefs = 0;\n\t\t\t$sqlcreel = \"SELECT COUNT(idsocios_relaciones) AS 'beneficiarios'\n\t\t\t\t\t\t\tFROM socios_relaciones\n\t\t\t\t\t\t\tWHERE socio_relacionado=\" . $this->mCodigo . \" AND tipo_relacion=11\";\n\t\t\t$benefs = mifila($sqlcreel, \"beneficiarios\");\n\t\t\treturn $benefs;\n\t}",
"public function count() {}",
"public function count() {}",
"public function countSequenceNumbers($criteria)\n\t{\n\t\t$count = $this->db_collection->find( $criteria )->count();\n\t\treturn $count;\n\t}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public static function counter() {}",
"public function getEntryCount() {}",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function getOpenIncidents(): int;",
"public function count(): int\n {\n return ($this->constraint !== null) ? $this->constraint->count() + 1 : 1;\n }",
"public function countKeys();",
"public function iN_TotalVerificationRequests() {\n\t\t$q = mysqli_query($this->db, \"SELECT COUNT(*) AS verificationCount FROM i_verification_requests WHERE request_status = '0'\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($q, MYSQLI_ASSOC);\n\t\tif ($row) {\n\t\t\treturn isset($row['verificationCount']) ? $row['verificationCount'] : '0';\n\t\t} else {return 0;}\n\t}",
"public function keyCount() : int;",
"public function getNumberOfPeopleToCamp()\n\t{\n\t\t$data = $this->camps_model->getNumberOfPeopleToCamp();\n\t\tif($data !== false)\n\t\t\techo response(200,'',$data);\n\t\telse\n\t\t\techo response(400,'incomplete'); \n\t}",
"public function getCatsInBoxes() {\r\n\t\t$boxes = $this->getBoxes();\r\n\t\t$count = [];\r\n\t\tforeach($boxes as $box) {\r\n\t\t\t$boxclass = new $box;\r\n\t\t\tforeach ($box->getCatsInside() as $data) {\r\n\t\t\t\t$count[] = $data;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $count;\r\n\t}",
"function record_count_posatclosure()\n\t{\n\t\t $sql = \"SELECT COUNT(*) As cnt FROM pof WHERE pof.is_allocated='1' AND pof.not_pursue='0' AND pof.closure='1'\";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t}",
"public function count()\n\t{\n\t\tif( $this->isDynamic )\n\t\t\tmwarning('unsupported with Dynamic Address Groups');\n\t\treturn count($this->members);\n\t}",
"public function count(): int;",
"public function count(): int;",
"public function count(): int;",
"public function count(): int;",
"public function count(): int;"
] | [
"0.6418083",
"0.63452077",
"0.6336976",
"0.6270917",
"0.61164045",
"0.60708827",
"0.6052671",
"0.6009567",
"0.5981927",
"0.5959526",
"0.5836256",
"0.5813202",
"0.5774399",
"0.57698685",
"0.5769089",
"0.5766176",
"0.57283413",
"0.5704701",
"0.56846887",
"0.5683003",
"0.56549203",
"0.56441987",
"0.56410325",
"0.5639787",
"0.5639272",
"0.5634181",
"0.5633402",
"0.5620038",
"0.56134546",
"0.55908954",
"0.558108",
"0.55711424",
"0.5567672",
"0.5555948",
"0.5555898",
"0.5553268",
"0.55508083",
"0.5547327",
"0.5542623",
"0.5536931",
"0.5534266",
"0.552684",
"0.5523508",
"0.55153775",
"0.55008304",
"0.54981506",
"0.54949754",
"0.54941016",
"0.5493511",
"0.5493511",
"0.54926366",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.54924387",
"0.5484771",
"0.5481671",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.54786783",
"0.5463263",
"0.5460752",
"0.54605955",
"0.5460526",
"0.5458935",
"0.54573596",
"0.54556286",
"0.54551077",
"0.5451542",
"0.5445943",
"0.5445943",
"0.5445943",
"0.5445943",
"0.5445943"
] | 0.6989548 | 0 |
Static function to calculate a percentage | static function calculatePercentage($aantal, $totaal) {
return round(($aantal / $totaal) * 100,1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAmountAsPercentage();",
"public function getPercent()\n {\n return $this->helper->getPercent();\n }",
"public function getPercentage()\n {\n return $this->percentage;\n }",
"public function calculateTotalPercentage()\n {\n return round((($this->totalcovered + $this->totalmaybe) / $this->totallines) * 100, 2);\n }",
"public function getIptPercent();",
"public function positivePercent(){\n\t\treturn round($this->positive*100/($this->positive+$this->negative+$this->indeterminate), 2);\n\t}",
"public function calculatePercentage($decimal = 1)\n {\n //Percentage not found\n if (! $this->has('percentage')) {\n return;\n }\n //Calculate percentage and return value\n return (float) number_format($this->get('percentage') * 100, $decimal, '.', '');\n }",
"public function getPercentage() {\n\t\t$percentage = \"\";\n\t\t\n\t\tif ($this->getIsRace() == true) {\n\t\t\t$placement = $this->_placement;\n\t\t\t$field = $this->_field;\n\t\t\t$percentage = round($placement / $field * 100).\"%\";\n\t\t}\n\t\t\n\t\treturn $percentage;\n\t\t\n\t}",
"public function getPercentageConversion()\n {\n $percent = 0;\n\n $numberSent = $this->getSumNbReminderSent();\n if ($numberSent > 0) {\n $nbConvertedCarts = $this->getSumNbConvertedCarts();\n $percent = $nbConvertedCarts / $numberSent * 100;\n }\n\n return $percent;\n }",
"public function getPercent() {\n return $this->percent;\n }",
"function percentage ($number, $percentageof, $make_string = true)\n{\n\t// Don't divide by zero \n\tif ($percentageof == 0)\n\t{\n\t\treturn ($make_string ? 'N/A' : false);\n\t}\n\t\n\t$value = ($number / $percentageof) * 100;\n\t\n\tif ($make_string)\n\t{\n\t\t$value = sprintf('%0.2f%%', $value);\n\t}\n\t\n\treturn $value;\n}",
"function promedio($total,$cantidad){\n return number_format($cantidad*100/$total,0);\n}",
"function discount_percent($sell_price,$price)\n {\n $rs_off=$price-$sell_price;\n $percentage=floor($rs_off*100/$price);\n return $percentage;\n }",
"public function calculatePercentage() {\n $questionCountAnswered = $this->questionAnalytics->getCountAnswered();\n if ($questionCountAnswered === 0) { //prevent division by 0 error\n $this->percentSelected = 0;\n }\n else {\n $percentSelected = $this->countAnswered / $questionCountAnswered * 100;\n $this->percentSelected = round($percentSelected, 0);\n }\n }",
"public function getPercent()\n {\n return $this->percent;\n }",
"public function get_percentage_complete() {\n\t\t$args = $this->get_donation_argument( array( 'number' => - 1, 'output' => '' ) );\n\t\tif ( isset( $args['page'] ) ) {\n\t\t\tunset( $args['page'] );\n\t\t}\n\t\t$query = give_get_payments( $args );\n\t\t$total = count( $query );\n\t\t$percentage = 100;\n\t\tif ( $total > 0 ) {\n\t\t\t$percentage = ( ( 30 * $this->step ) / $total ) * 100;\n\t\t}\n\t\tif ( $percentage > 100 ) {\n\t\t\t$percentage = 100;\n\t\t}\n\n\t\treturn $percentage;\n\t}",
"function fuc_discount($product, $percentage){\r\n $discountValue = $product / 100 * $percentage;\r\n $totalValue = $product - $discountValue; \r\n return $totalValue;\r\n\r\n}",
"public function getMatchedPercent(){\n return $this->percentage;\n }",
"abstract public function getTaxPercent();",
"function getGoalPercent(){\n $goal = $GLOBALS['GOAL_STEPS'];\n $cursteps = getCurrentSteps();\n $percent = ( $cursteps[0]['steps'] / $goal ) * 100;\n return round($percent);\n}",
"public function percentChanged()\n {\n if ($this->value == 0) {\n $value = $this->previous;\n } elseif ($this->previous == 0) {\n $value = $this->value;\n } else {\n $value = ($this->previous - $this->value) / $this->previous;\n }\n\n return round(abs($value) * 100, 2) * ($this->value >= $this->previous ? 1 : -1);\n }",
"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}",
"function percentage($collection){\n\n $number = 10;\n $new_number = count_products($collection);\n\n $new_value = $new_number - $number;\n\n $percentage = abs(($new_value / $number) * 100);\n\n \n if ($new_number < $number){\n\n return $percentage . '% decrease';\n\n }else if($new_number == $number){\n\n return $percentage . '%';\n }\n \n else {\n\n return $percentage . '% increase';\n\n }\n \n}",
"public function getPercent()\n {\n return $this->readOneof(2);\n }",
"public function getTotalPercentageConversion()\n {\n $percent = 0;\n\n $numberSent = $this->getTotalSumNbReminderSent();\n if ($numberSent > 0) {\n $nbConvertedCarts = $this->getTotalSumNbConvertedCarts();\n $percent = $nbConvertedCarts / $numberSent * 100;\n }\n\n return $percent;\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}",
"function porcentaje($valor){\t\n $porcentaje = $valor *100;\n return number_format($porcentaje,0,',','.').' %';\n\n}",
"public static function percent($suiteResults) {\n $sum = $suiteResults['pass'] + $suiteResults['fail'];\n return round($suiteResults['pass'] * 100 / max($sum, 1), 2);\n }",
"public function percentageParticipation()\n {\n $expectedPartipant = $this->getExpectedParticipants();\n if (count($expectedPartipant) == 0) {\n return 0;\n }\n $actualParticipant = $this->users()\n ->where('users.role_id', Role::findBySlug('PART')->id)\n ->orWhere('users.role_id', Role::findBySlug('GEST')->id)\n ->get()->unique();\n return round((count($actualParticipant) / count($expectedPartipant)) * 100);\n }",
"public function averageRatingAsPercentage() : float\n {\n $range = config('rateable.minimum') > 0 ? config('rateable.maximum') - config('rateable.minimum') : config('rateable.maximum');\n return ($this->ratings()->count() * $range) != 0 ? $this->sumRating() / ($this->ratings()->count() * $range) * 100 : 0;\n }",
"public function get_percentage_complete() {\n\t\t$percentage = affwp_calculate_percentage( $this->get_current_count(), $this->get_total_count() );\n\n\t\tif ( $percentage > 100 ) {\n\t\t\t$percentage = 100;\n\t\t}\n\n\t\treturn $percentage;\n\t}",
"public function getPercentaje() {\n return $percentaje;\n }",
"function calculatePercentLow($previousClose, $low)\n{\n\n}",
"function calculate_student_progress($completed_hours, $total_hours, $pace) {\n\n\t// Get the default progress percentage:\n\t$progress = $completed_hours/$total_hours;\n\t// echo number_format($progress, 2);\n\n\tif ($_POST['pace'] == 16) {\n\t\t// Return the formatted progress as a percentage:\n\t\treturn number_format($progress, 2) * 100;\n\t} else {\n\t\t// Get adjusted progress for this pace:\n\t\t$adjusted_progress = $progress / 1.5;\n\n\t\t// Return the formatted progress as a percentage:\n\t\treturn number_format($adjusted_progress, 2) * 100;\n\t\t}\n}",
"public function test_percentage_method()\n {\n $expected_value = 60;\n \n $percentage = math::percentage(30, 50);\n \n $this->assertInternalType('array', $percentage);\n $this->assertArrayHasKey('value', $percentage);\n $this->assertArrayHasKey('sign', $percentage);\n \n $this->assertInternalType('int', $percentage['value']);\n $this->assertInternalType('string', $percentage['sign']);\n \n $this->assertEquals($percentage['value'], $expected_value);\n $this->assertEquals($percentage['sign'], $expected_value . '%');\n \n $percentage = math::percentage(NULL, NULL);\n \n $this->assertEquals(NULL, $percentage['value']);\n }",
"function attendance_calc_fraction($part, $total) {\n if ($total == 0) {\n return 0;\n } else {\n return $part / $total;\n }\n}",
"public function getTestedMethodsPercent($asString = TRUE)\n {\n return PHP_CodeCoverage_Util::percent(\n $this->getNumTestedMethods(),\n $this->getNumMethods(),\n $asString\n );\n }",
"public static function complete_percentage($model, $table_name, $user_id){\n $pos_info = DB::select(DB::raw('SHOW COLUMNS FROM '.$table_name));\n $base_columns = count($pos_info);\n $not_null = 0;\n foreach ($pos_info as $col){\n $not_null += app('App\\\\'.$model)::selectRaw('SUM(CASE WHEN '.$col->Field.' IS NOT NULL THEN 1 ELSE 0 END) AS not_null')->where('user_id', '=', $user_id)->first()->not_null;\n }\n $alter = $base_columns - 6;\n $value = $not_null / $alter *100;\n $value = round($value, 2);\n return $value;\n }",
"function getPayoutPercentage()\n {\n $payoutPercentageSqlString = \"SELECT payoutpercentage FROM parameters\";\n $payoutReply = safeQuery($payoutPercentageSqlString);\n $payoutRow = $payoutReply[0];\n $payoutPercentage = $payoutRow['payoutpercentage'];\n\n return $payoutPercentage;\n }",
"public function specpercentage() {\n\t\t\tif ($this->linesofcode === NULL || $this->linesofspec === NULL) {\n\t\t\t\treturn NULL;\n\t\t\t} else {\n\t\t\t\treturn round(($this->linesofspec / $this->linesofcode) * 100, 2);\n\t\t\t}\n\t\t}",
"public function calculate_discount_percentage() {\n extract($_POST);\n $disc_rate = ($discount_amount / $class_fees) * 100;\n $fees_due = $class_fees - $discount_amount;\n $subsidy_per = ($subsidy * 100) / $fees_due;\n $result = $this->classtraineemodel->calculate_net_due($gst_onoff, $subsidy_after_before, $fees_due, $subsidy, $gst_rate);\n $arr = array();\n if ($result < 0) {\n $arr['label'] = \"NEGATIVE Total Fees Due NOT ALLOWED. Please correct Discount AND/ OR Subsidy Amounts.\";\n $arr['amount'] = \"\";\n } else {\n $arr['label'] = \"\";\n $arr['amount'] = number_format($result, 4, '.', '');\n $arr['disc_rate'] = number_format($disc_rate, 4, '.', '');\n $arr['subsidy_per'] = number_format($subsidy_per, 4, '.', '');\n $gst_amount = $this->classtraineemodel->calculate_gst($gst_onoff, $subsidy_after_before, $fees_due, $subsidy, $gst_rate);\n $arr['gst_amount'] = number_format($gst_amount, 4, '.', '');\n }\n echo json_encode($arr);\n exit();\n }",
"public static function percentage($total, $part, $round = 2)\n {\n if ($total <= 0.0000) {\n return 0;\n }\n return round($part * 100.00 / $total, $round);\n }",
"function calculateChangePercent($close,$prevClose){\n $percentageChange=round(($close-$prevClose)*100/$close,2);\n return $percentageChange;\n}",
"public function get_percent_langer($customer_id,$percent)\n {\n //$this->load->model('account/customer');\n $get_childrend_all_tree = $this -> model_pd_registercustom -> count_child_langer($customer_id);\n \n $customer_curent = $this -> model_pd_registercustom ->getCustomer($customer_id);\n\n\n if (count($get_childrend_all_tree) > 0)\n {\n $total_child_pd = 0;\n foreach ($get_childrend_all_tree as $value) {\n $customer = $this -> model_pd_registercustom ->getCustomer($value['customer_id']);\n $total_child_pd += $customer['total_pd_node'];\n }\n if (($customer_curent['total_pd_node'] - $total_child_pd) >= 30000000000)\n {\n $percents = $percent;\n } \n else\n {\n if ($percent == 15)\n {\n $percents = 13;\n }\n if ($percent == 18)\n {\n $percents = 15;\n }\n } \n }\n else\n {\n $percents = $percent;\n }\n return $percents;\n }",
"public function getPerfection(): float\n {\n return round($this->getTotal() / 45, 3) * 100;\n }",
"function percentage_rate_class($value, $base = 50)\n {\n if(!is_numeric($value)) {\n $value = 0;\n }\n\n $percentage = (float)$value;\n\n if($percentage == 100) {\n return 'excelent';\n }\n\n if($percentage == 0) {\n return 'neutral';\n }\n\n if($percentage < $base) {\n return 'poor';\n }\n\n return 'ok';\n }",
"public function getPercentage($total, $goal)\n {\n return ($total / $goal) * 100;\n }",
"public function getSeekersPercentage() : int {\r\n\r\n return (int) $this->getMain()->getDatabase()->get(\"seekers_percentage\", [\"table\" => \"Games\", \"name\" => $this->getName()])->fetchArray()[0];\r\n\r\n }",
"function valore_reale_maggiorazione_percentuale_gas($id_ordine,$id_gas){\r\n \r\n $magg = valore_percentuale_maggiorazione_mio_gas($id_ordine,$id_gas);\r\n return (float)(valore_totale_mio_gas($id_ordine,$id_gas)/100)*$magg;\r\n \r\n}",
"public static function percent($decimal, ORM $object = NULL)\n {\n return (double) $decimal * 100.0;\n }",
"private function computeProgressPercent($progress)\n {\n $needsADay = $this->requiredMoney / 20; // ~number of working days\n\n return $progress / $needsADay;\n }",
"public function getTestedClassesPercent($asString = TRUE)\n {\n return PHP_CodeCoverage_Util::percent(\n $this->getNumTestedClasses(),\n $this->getNumClasses(),\n $asString\n );\n }",
"public function getUsagePercent() : float\n\t{\n\t\treturn $this->usagePercent;\n\t}",
"function nyscaa_report_format_pct($value, $digit = 1){\n\tif ($value == 0) {\n\t\treturn \"0%\";\n\t}else{\n\t\treturn number_format($value, $digit) . \"%\";\n\t}\n}",
"public function getPercentual() {\n return $this->nPercentual;\n }",
"public function getPercentageDiscountPrice()\n {\n return $this->percentage_discount_price . ' %';\n }",
"public static function toPercentage($value)\n {\n $value = $value * 100;\n return $value;\n }",
"function get_question_correct_perc($req_ID) {\n global $myPDO;\n\n // The query to get the IDs of hard questions\n $statement = $myPDO->prepare(\"\n SELECT\n (COUNT( CASE `Correct` WHEN 1 THEN `Correct` END ) / COUNT( * )) *100 AS 'correct_perc'\n FROM\n `rdtom_responses`\n WHERE\n `Question_ID` = :Question_ID\n \");\n\n $statement->bindValue(':Question_ID', $req_ID);\n $statement->execute();\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n\n return $result['correct_perc'];\n}",
"private function getSkillPercent($level){\t\n\t\t//echo sprintf('Level %s: %s | ', $level, $value);\t\n\t\treturn 1 + ((5 * $level) / 100);\t\n\t}",
"public function percentWhite()\n {\n return (100 * $this->whitePixels) / $this->pixels;\n }",
"public static function percentage( $numberIncluding, $numberExcluding ) {\n\t\treturn $numberIncluding / $numberExcluding - 1;\n\t}",
"public static function getPercentage($old, $new)\n {\n $percentage = (($new - $old) / $old) * 100;\n return round($percentage, 0) . '%';\n }",
"public static function perc($value)\n {\n if (! is_numeric($value)) {\n throw new Exception('[fieldRendererHelper::perc] The inserted value is not numeric!');\n }\n\n return number_format($value, 2, ',', '.').' %';\n }",
"public function getPercent(): ?float\n {\n return $this->percent;\n }",
"public function getPercentage($pageviews, $total): float\n {\n $percentage = ($pageviews * 100) / $total;\n\n return round($percentage, 1);\n }",
"public static function getPercentage($val1 = 0, $val2 = 0)\n {\n $percentage = 0;\n if($val1 > 0 && $val2 > 0)\n {\n $percentage = intval(($val1 / $val2) * 100);\n }\n\n return $percentage;\n }",
"public function getDiscountPercent()\n\t{\n\t\treturn $this->discount_percent;\n\t}",
"public function getPercentageFirstConversion()\n {\n $percent = 0;\n $nbSent = $this->getNbFirstReminderSent();\n if ($nbSent) {\n $nbConverted = $this->getNbFirstReminderConverted();\n $percent = $nbConverted / $nbSent * 100;\n }\n\n return $percent;\n }",
"public function getPercentOfCompletedProfile(){\n $pendingCount = $this->getPendingNotificationCount();\n $notificationCount = $this->getNotificationCount();\n $completedCount = $notificationCount - $pendingCount;\n return round(($completedCount * 100.0) / $notificationCount);\n }",
"public function calcularGastoPorcentaje(){\n if($this->iPresupuestoModificado == 0)\n return 0;\n $porcentajeGasto = ($this->iGasto/$this->iPresupuestoModificado)*100;\n return $porcentajeGasto;\n }",
"public function getDiscountPercent() {\n return $this->item->getDiscountPercent();\n }",
"function usp_ews_get_progess_percentage($events, $attempts) {\n $attemptcount = 0;\n\n\t$count_events = count($events);\n foreach($events as $event) {\n if($attempts[$event['type'].$event['id']] == 1) {\n $attemptcount++;\n }\n }\n\t$progressvalue = ($attemptcount==0 || $count_events==0) ? 0 : $attemptcount / $count_events;\n\n return (int)($progressvalue * 100);\n}",
"public function get_percent_donated() {\r\n\t\t$percent = $this->get_percent_donated_raw();\r\n\r\n\t\tif ( false === $percent ) {\r\n\t\t\treturn $percent;\r\n\t\t}\t\t\r\n\r\n\t\treturn apply_filters( 'charitable_percent_donated', $percent.'%', $percent, $this );\r\n\t}",
"public function get_progress_percentage( WP_User $user ): int {\n\t\t// TODO: Memoize, tests, hook.\n\n\t\t// TODO: Implement it.\n\t\treturn 0;\n\t}",
"public function getPercentual()\n {\n return $this->percentual;\n }",
"public function progress()\n {\n return $this->totalsportevents > 0 ? round(($this->processedsportevents() / $this->totalsportevents) * 100) : 0;\n }",
"function complete_percentage($model, $table_name, $resource, $ref, $counted_columns, $uncounted_columns){\n // $counted_columns > count of base cols\n $pos_info = DB::select(DB::raw('SHOW COLUMNS FROM ' . $table_name));\n // $base_columns = count($pos_info);\n $base_columns = $counted_columns;\n $not_null = 0;\n\n // getting the count of the filled columns ( including id , created_at , updated_at..etc ) that are always filled\n // , that's why they are not counted\n foreach ( $pos_info as $col ) {\n\n $not_null += app('App\\\\' . $model)::selectRaw('SUM(CASE WHEN ' . $col->Field . ' IS NOT NULL THEN 1 ELSE 0 END) AS not_null')->where($ref, '=', $resource)->first()->not_null;\n }\n\n return (($not_null - $uncounted_columns) / $base_columns) * 100;\n\n\n }",
"public function getPercentLevel()\n { \n $experience_level = $this->getExperienceShortMax();\n\n $experience_current_level = $this->getExperienceShort();\n\n $percent = ($experience_current_level * 100)/$experience_level;\n\n return $percent;\n }",
"public static function percentage(int $count, int $total, int $precision = 2): string\n {\n return number_format(round(($count / ($total <= 0 ? 1 : $total)) * 100, $precision), $precision);\n }",
"public function getTranslationPercent() {\n\n return !empty($this->result->headers['x-onelinktxpercent']) ?\n $this->result->headers['x-onelinktxpercent'] :\n 0;\n }",
"function grade_to_percentage($gradeval, $grademin, $grademax) {\n if ($grademin >= $grademax) {\n debugging(\"The minimum grade ($grademin) was higher than or equal to the maximum grade ($grademax)!!! Cannot proceed with computation.\");\n }\n $offset_value = $gradeval - $grademin;\n $offset_max = $grademax - $grademin;\n $factor = 100 / $offset_max;\n $percentage = $offset_value * $factor;\n return $percentage;\n }",
"function ppom_get_amount_after_percentage($base_amount, $percent) {\n\t\n\t$base_amount = floatval($base_amount);\n\t$percent_amount = 0;\n\t$percent\t\t= substr( $percent, 0, -1 );\n\t$percent_amount\t= wc_format_decimal( (floatval($percent) / 100) * $base_amount, wc_get_price_decimals());\n\t\n\treturn $percent_amount;\n}",
"public function testAddPercent()\n {\n $tests = [\n ['expected' => 112, 'fn' => Math::addPercent(100, 12)],\n ['expected' => 112, 'fn' => Math::addPercent(100, '12')],\n ['expected' => 112, 'fn' => Math::addPercent(100, '12%')],\n ['expected' => 112, 'fn' => Math::addPercent(100, '12 %')],\n ['expected' => 112, 'fn' => Math::addPercent('100 ', '12')],\n ['expected' => 112.5, 'fn' => Math::addPercent('100', '12.5')],\n ['expected' => 88, 'fn' => Math::addPercent('100', -12)],\n ['expected' => 88, 'fn' => Math::addPercent('100', '-12')],\n ['expected' => 88, 'fn' => Math::addPercent('100', '-12 %')],\n ['expected' => 88, 'fn' => Math::addPercent('100', '-12%')],\n ];\n\n foreach ($tests as $test) {\n $this->assertEquals($test['expected'], $test['fn']);\n }\n }",
"function percentage_rate($value, $append_plus = false)\n {\n $percentage = (float)$value;\n\n if($percentage > 0) {\n return ($append_plus ? \"+\" : \"\").$percentage.\"%\";\n } else {\n return $percentage.\"%\";\n }\n }",
"public function getAmountPercentageAttribute()\n {\n return $this->is_percentage ? $this->amount : 0;\n }",
"function valore_totale_mio_ordine_lordo($idu,$usr){\r\n$mio_o = valore_totale_mio_ordine($idu,$usr);\r\n//echo \"mio=\".$mio_o.\"<br>\";\r\n\r\n$vto = valore_totale_ordine_qarr($idu);\r\n\r\n//echo \"vto=\".$vto.\"<br>\"; \r\nif ($vto>0){ \r\n$perc = (float)($mio_o/$vto)*100;\r\n\r\n$tras = valore_trasporto($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\";\r\n//echo \"tras=\".$tras.\"<br>\"; \r\n$gest =valore_gestione($idu,$perc);\r\n//echo \"perc=\".$perc.\"<br>\"; \r\n//echo $perc;\r\nreturn (float)round($mio_o + $tras + $gest,4);\r\n}else{\r\nreturn \"\"; \r\n\t\r\n}\r\n}",
"public function getResultForAudit( Audit $audit )\n {\n if ( null !== $auditform = $audit->getForm() )\n {\n $sections = $auditform->getSections();\n $count = count( $sections );\n if ( 0 == $count ) return 100;\n $totalPercent = 0;\n $divisor = 0;\n $audit->setFlag( FALSE );\n $index = $audit->getFormIndexes();\n foreach ( $sections as $section )\n {\n if( FALSE === in_array( $section->getId(), $index['sections']) ) continue;\n $percent = $this->getResultForSection( $audit, $section );\n $weight = $this->getWeightForSection( $audit, $section );\n $sectionFlag = $this->getFlagForSection( $audit, $section );\n\n if ( $sectionFlag ) $audit->setFlag( TRUE );\n $divisor += $weight;\n if( $divisor > 0 )\n {\n $totalPercent = $totalPercent * ( $divisor - $weight ) / $divisor + $percent * $weight / $divisor;\n }\n }\n\n return number_format( $totalPercent, 2, '.', '' );\n }\n else\n return 0;\n }",
"function get_achievement_percentage($completed, $total, $boolean = false) \n\t{\n\t\t$percentage = 0;\n\t\tif($completed != 0) \n\t\t\t$percentage = ($completed / $total) * 100;\n\t\tif($boolean == true)\n\t\t\treturn number_format($completed, 0) . \" of \" . number_format($total, 0) . \" (\" . number_format($percentage, 0) . \"%)\";\n\t\telse \n\t\t\treturn $percentage;\n\t}",
"public function getPercentageDiscount($product){\n $originalPrice = $product->getPrice();\n\t\t$finalPrice = $product->getFinalPrice();\n\n if ($originalPrice > $finalPrice) {\n\t\t\t$percentage = (($originalPrice - $finalPrice) * 100 / $originalPrice);\n\t\t\t$diff = abs($percentage - ceil($percentage));\n\t\t\t$threshold = floatval(Mage::getStoreConfig('themeconfig/themeconfig_group_product_item/themeconfig_product_item_discount_threshold'));\n\n\t\t\tif($threshold <= 0) {\n\t\t\t\t$threshold = 0.15;\n\t\t\t}\n\t\t\t\n\t\t\t// Se a diferença estiver entre o treshhold informado, arredonda a porcentagem para cima, se não arredonda para baixo\n\t\t\treturn $diff <= floatval($threshold) ? ceil($percentage) : floor($percentage);\n }\n\n return 0;\n\t}",
"public function updatePercentage(Discount $discount)\n {\n }",
"function feedback_percent($user){\r\n $total = mysql_num_rows(mysql_query(\"SELECT * FROM feedback WHERE user = '$user'\"));\r\n if ($total > 0){\r\n $great = round(mysql_num_rows(mysql_query(\"SELECT * FROM feedback WHERE user = '$user' AND rating = 'Great'\")) / $total * 100, 2);\r\n $average = round(mysql_num_rows(mysql_query(\"SELECT * FROM feedback WHERE user = '$user' AND rating = 'Average'\")) / $total * 100, 2);\r\n $bad = round(mysql_num_rows(mysql_query(\"SELECT * FROM feedback WHERE user = '$user' AND rating = 'Bad'\")) / $total * 100, 2); \r\n }else{\r\n $great = 0;\r\n $average = 0;\r\n $bad = 0;\r\n }\r\n return array($great, $average, $bad, $total);\r\n}",
"function discPerc($discPe)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT percent FROM adm_discount_list WHERE code=%s\",\n\t\t\t\t\t\t\t\t\t\t GetSQLValueString($discPe, \"text\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"percent\"];\t\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}",
"public function getTotalPercent($clamp = false) {\n $config = $this->graded_gradeable->getGradeable()->getAutogradingConfig();\n $divisor = $config->getTotalNonHiddenNonExtraCredit() + $config->getTotalHiddenNonExtraCredit();\n $dividend = $this->getNonHiddenNonExtraCredit() + $this->getNonHiddenExtraCredit() +\n $this->getHiddenNonExtraCredit() + $this->getHiddenExtraCredit();\n\n // avoid divide-by-zero\n if ((float) $divisor == (float) 0) {\n return NAN;\n }\n $result = floatval($dividend) / $divisor;\n\n if ($clamp === true && $result > 1.0) {\n return 1.0;\n }\n elseif ($result < 0) {\n return 0.0;\n }\n return $result;\n }",
"function getProfitPercentage()\n\t{\n\t\t$firstTrade = $this->data->getFirstCompletedTrade();\n\n\t\tif ($firstTrade)\n\t\t\t$start = $this->data->getT(Time::fromDateTime($firstTrade->getProcessedAt()), \"amount\");\n\n\t\t$start = $firstTrade ? $firstTrade->getSellAmount() : 0;\n\n\t\tif (!$start)\n\t\t\treturn 0;\n\n\t\t$current = $this->getTotalHoldings();\n\n\t\t$percentage = round((($current / $start) - 1) * 10000)/100;\n\n\t\treturn $percentage;\n\t}",
"public function getMarginPercent()\n {\n if (0 < $this->margin && 0 < $this->revenue) {\n return round($this->margin * 100 / $this->revenue, 1);\n }\n\n return 0;\n }",
"function percentage_state($percentage, $negative = false)\n{\n $p = $percentage;\n $state = \"danger\";\n if ($p<0) {$p=0;} else if ($p>100){$p=100;} \n if ($negative) {$p=100-$p;}\n if ($p<25)\n {\n $state = 'danger';\n }\n else if (($p>=25) && ($p<50))\n {\n $state = 'warning';\n }\n else if (($p>=50) && ($p<75))\n {\n $state = 'info';\n }\n else\n {\n $state = 'success';\n }\n return $state;\n}",
"public function getAverageRatingAsPercentageAttribute() : float\n {\n return $this->averageRatingAsPercentage();\n }",
"public function likedPercentage(): string\r\n {\r\n if (count($this->userRatings) < 1) return \"0.00%\";\r\n $count = 0;\r\n foreach ($this->userRatings as $rating)\r\n {\r\n if ($rating >= 5) $count++;\r\n }\r\n return number_format(($count / count($this->userRatings)) * 100, 2) . \"% of users that rated \\\"$this->title\\\" liked this movie.\";\r\n }",
"public function getUsagePercentage()\n {\n return $this->usagePercentage;\n }",
"function simpay_custom_form_157_tax_percent() {\n\n\t// Change to 25%\n\treturn 25;\n}"
] | [
"0.77726406",
"0.7378893",
"0.7255446",
"0.70780504",
"0.7057557",
"0.70326245",
"0.7001085",
"0.699023",
"0.6968947",
"0.69631743",
"0.69230354",
"0.6915114",
"0.68936694",
"0.68877536",
"0.6887708",
"0.6875989",
"0.67683953",
"0.67548496",
"0.6753149",
"0.67349285",
"0.6728597",
"0.6724153",
"0.66546136",
"0.66239715",
"0.661977",
"0.66175777",
"0.6597269",
"0.6576501",
"0.6571272",
"0.65468454",
"0.65418273",
"0.65153146",
"0.6488042",
"0.6483808",
"0.6481779",
"0.6476645",
"0.64752334",
"0.64331144",
"0.64228994",
"0.6421495",
"0.63873774",
"0.63445693",
"0.6335966",
"0.63333154",
"0.6322888",
"0.6317372",
"0.6315055",
"0.6310898",
"0.63038653",
"0.62920743",
"0.6291487",
"0.6277089",
"0.62728477",
"0.6268275",
"0.62658376",
"0.6248292",
"0.6241898",
"0.6240167",
"0.6235131",
"0.6233667",
"0.62291193",
"0.6217026",
"0.6192874",
"0.6189826",
"0.6187508",
"0.61867106",
"0.61826104",
"0.61783135",
"0.61754453",
"0.61701363",
"0.6159282",
"0.6158251",
"0.6151267",
"0.6149459",
"0.61459064",
"0.61414266",
"0.61365503",
"0.613379",
"0.61284834",
"0.6124773",
"0.61233544",
"0.61180246",
"0.61068135",
"0.6103145",
"0.60933656",
"0.60848767",
"0.6072452",
"0.6063668",
"0.60593027",
"0.6051834",
"0.60459566",
"0.60389686",
"0.60208064",
"0.5996367",
"0.599532",
"0.5989922",
"0.59886295",
"0.5985176",
"0.5980422",
"0.5980141"
] | 0.7034966 | 5 |
Static function to check if case has activities in period | static function checkActivityInCase($caseId, $periodFrom, $periodTo) {
$activityInCase = false;
if (empty($caseId)) {
return $activityInCase;
}
$apiParams = array(
'version' => 3,
'case_id' => $caseId
);
$apiCase = civicrm_api('Case', 'Getsingle', $apiParams);
if (!isset($apiCase['is_error']) || $apiCase['is_error'] == 0) {
if (isset($apiCase['activities']) && !empty($apiCase['activities'])) {
foreach($apiCase['activities'] as $activityId) {
$apiParams = array(
'version' => 3,
'id' => $activityId
);
$apiActivity = civicrm_api('Activity', 'Getsingle', $apiParams);
if (!isset($apiActivity['is_error']) || $apiActivity['is_error'] == 0) {
if (isset($apiActivity['activity_date_time'])) {
$actDate = new DateTime($apiActivity['activity_date_time']);
if ($actDate >= $periodFrom && $actDate <= $periodTo) {
$activityInCase = true;
}
}
}
}
}
}
return $activityInCase;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function isActivatedViaEndDateAndTime() {}",
"protected function isActivatedViaStartDateAndTime() {}",
"protected function isWithin() {\n if(isset($this->listeners['within']) && \n $this->start_time instanceof \\DateTime &&\n $this->since_start instanceof \\DateTime) {\n foreach($this->listeners['within'] as $listener) {\n list($increment,$period) = $listener;\n $diff = $this->start_time->diff($this->since_start);\n if($diff->$period < $increment) {\n return true;\n }\n }\n } else {\n return true;\n }\n \n return false;\n }",
"public function isStarted(){\n\n //Comparing the time to decide wither it's started or not ....\n $start = new Carbon($this->start_time);\n $now = Carbon::now();\n $end = $start->copy()->addMinutes($this->duration);\n\n $started = $now->gt($start) && $now->lt($end);\n\n //checking if it has expired announcement and remove it with resetting status to 0\n if($this->hasAnnouncement()){\n $now = Carbon::now();\n $end = new Carbon($this->start_time);\n $end->addMinutes($this->duration);\n\n //Checking if the announcement has expired and delete it ...\n if($now->gt($end))\n $this->deleteAnnouncement();\n\n }\n\n return $started;\n\n }",
"function isActivity() {\n\t\treturn $this->repoObj->lobType == 'activity';\n\t}",
"public function CheckActiveMeeting()\n\t{\n\t\t//get current login user session\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get user session\n\t\t$currenttime = time();\n\t\t$userJoinTime = $currenttime;\n\t\t$extra_time = Configure::read('extra_meetingtime');//done in bootstrap\n\t\t$data = $this->request->data;\n\t\t$group_name = $data['roomname'];\n\t\t$requests = $this->MeetingInfo->find('first',array(\n\t\t\t\t'conditions'=>array('MeetingInfo.chat_meeting_name'=>$group_name)\n\t\t));\n\t\t$meeting_date = $requests['MeetingInfo']['chat_meeting_startdate'];\n\t\t$meeting_active = $requests['MeetingInfo']['is_active'];\n\t\t$meeting_start_date = $meeting_date;\n\t\t$meeting_end_date = $meeting_start_date+$extra_time;\n\t\tif((($userJoinTime <= $meeting_end_date) && ($userJoinTime >= $meeting_start_date)) || $meeting_active)\n\t\t\techo 1;\n\t\telse\n\t\t\techo 0;\n\t\texit;\n\t}",
"public function isActive(): bool\n {\n $currentDate = Carbon::now()->format('Y-m-d');\n\n return $this->effect_date <= $currentDate\n && $this->termination_date >= $currentDate\n || is_null($this->termination_date);\n }",
"public function isActive(){\n\t\treturn (!$this->isnewRecord and Yii::app()->periodo->HoyDentroDe($this->finicio,$this->ffinal));\n\n\t }",
"public function during(DateTimePeriod $period): bool\n {\n return\n $period->getStart() < $this->getStart() &&\n $this->getEnd() < $period->getEnd();\n }",
"public function contactedTimeTest() {\n\t\t\t$id = 140;\n\t\t\t$period = 1;\n\t\t\t\n\t\t\t$db = new database();\n\t\t\t$results = $db->getAll(\"SELECT * FROM claimants_noanswers WHERE cid = '\".$id.\"'\");\n\t\t\n\t\t\t$contacts = ARRAY();\n\t\t\tforeach ($results AS $result) {\n\t\t\t\tif (claimants::callTime($result['timestamp']) == $period) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif (date(\"dmY\",$result['timestamp']) == date(\"dmY\",strtotime(\"NOW\"))) {\t\t\t\t\n\t\t\t\t\t\t$contacts[] = $result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count($contacts) > 0) {\n\t\t\t\tprint(\"Contacted in this period\");\n\t\t\t} else {\n\t\t\t\tprint(\"Not Contacted in this period\");\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}",
"function usp_ews_check_activity_setting($configmonitoreddata, $courseid, $modules){\n\n\tglobal $DB;\n\t\n\t$dbmanager = $DB->get_manager(); // loads ddl manager and xmldb classes\n\n\n\tif (empty($configmonitoreddata)) {\n return false;\n }\n\n\t$modinfo = get_array_of_activities($courseid);\n\n\tforeach($configmonitoreddata as $monitor){\n\t\t$mod = $modinfo[$monitor->cmid];\n\t\t// if hidden then no sense giving unnecessary attention\n\t\tif($mod->visible == 1){\n\t\t\t// only if the activity is notlocked, otherwise that's unnecessary as in the manual meaning of lock is specified\n\t\t\tif($monitor->locked == 0){\n\t\t\n\t\t\t\tif (array_key_exists('defaultTime', $modules[$monitor->module])) {\n\t\t\t\t\t$fields = $modules[$monitor->module]['defaultTime'].' as due';\n\t\t\t\t\t$record = $DB->get_record($monitor->module, array('id'=>$monitor->instanceid, 'course'=>$courseid), $fields);\n\n\t\t\t\t\tif($record->due != $monitor->duedate && $record->due > time()){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t }\t\t\t\t\n\t}\n\n\treturn false;\n}",
"function Atv_boolPresensiTimeAllowed($day, $time_start, $time_end): bool\n{\n $result = false;\n // jika 'all' maka hanya boleh hari senin sampai jumat, atau hari yang ditentukan diluar itu\n if ((($day == Atv_setDayKegiatan('all')) && (Carbon_IsWorkDayNow())) || ($day == Carbon_DBDayNumOfWeek()))\n if ((Carbon_AnyTimeNow() >= $time_start) && (Carbon_AnyTimeNow() <= $time_end)) $result = true;\n return $result;\n}",
"public function isDayPassed()\n {\n return ($this->declineTime < (time() - self::ONE_DAY_IN_SECONDS));\n }",
"public function isActive()\n {\n return $this->effective_from <= time() && ($this->effective_to == null or $this->effective_to > time());\n }",
"public function isActive()\n {\n $is_active = false;\n\n if ($this->active && $this->category && $this->category->active)\n {\n $now = Carbon::now();\n \n if (( ! $this->start_at || $this->start_at->lte($now)) && ( ! $this->end_at || $this->end_at->gte($now)))\n {\n $is_active = true;\n }\n }\n\n return $is_active;\n }",
"function cicleinscription_print_recent_activity($course, $viewfullnames, $timestart) {\n return false; // True if anything was printed, otherwise false\n}",
"public function isStartedAndNotFinished()\r\n {\r\n $now = Zend_Date::now();\r\n \r\n $date = new Zend_Date($this->start_time);\r\n $afterStart = $now->compare($date) === 1;\r\n\r\n $date->addDay($this->duration);\r\n $beforeEnd = $now->compare($date) === -1;\r\n \r\n return $afterStart && $beforeEnd;\r\n }",
"function has_signup_period_ended($signupDate)\n{\n return time() - (60 * 60 * 24) >= strtotime($signupDate);\n}",
"public function isActive()\n {\n $now = new \\DateTime();\n return ($this->getSince() <= $now && $this->getUntil() > $now || $this->getPermanent());\n }",
"public function abuts(Period $period)\n {\n return $this->startDate == $period->getEndDate() || $this->endDate == $period->getStartDate();\n }",
"public function abuts(Period $period)\n {\n return $this->startDate == $period->getEndDate() || $this->endDate == $period->getStartDate();\n }",
"public function startedBy(DateTimePeriod $period): bool\n {\n return\n $this->getStart() == $period->getStart() &&\n $period->getEnd() < $this->getEnd();\n }",
"function tab_print_recent_activity($course, $viewfullnames, $timestart) {\n global $CFG;\n\n return false; // True if anything was printed, otherwise false\n}",
"public function needs_run() {\n $today = time();\n $lastrun = $this->info[\"last_run\"];\n $interval = (int)$this->freq * 86400;\n\n return($today > ($lastrun + $interval));\n }",
"public function hasActivityGotTimesheetItems($activityId) {\n\t\treturn $this->projectDao->hasActivityGotTimesheetItems($activityId);\n\t}",
"public function isDeactivatedWithin(DatePeriod $period)\n {\n $record = $this->getInvoker();\n foreach ($period as $day)\n {\n if ($record->isDeactivated($day))\n return true;\n }\n \n return false;\n }",
"function contactmod_print_recent_activity($course, $viewfullnames, $timestart) {\n return false; // True if anything was printed, otherwise false\n}",
"public function isActive(){\n return (bool) ($this->hasStarted() && ! $this->hasExpired() && !$this->isCancelled());\n }",
"static function canMatch($cat)\n {\n \tif(User::getCategoryCount($cat) > 9)\n \t\tif(!self::isWeekend(time()))\n \t\t\treturn true;\n \t\telse\n \t\t\treturn false;\n \telse\n \t\treturn false;\n \n }",
"function vitero_print_recent_activity($course, $viewfullnames, $timestart) {\n return false; // True if anything was printed, otherwise false.\n}",
"private function check_meet_creation_limit()\n {\n $recent_shackmeet_count = count($this->load_recent_shackmeet_count());\n \n return $recent_shackmeet_count < 2;\n }",
"public function hasTimeEvents(){\n return $this->_has(8);\n }",
"public function existsWithPeriod($period){\n $stmt = $this->db->prepare(\"SELECT COUNT(*) as num FROM intra_seizoen WHERE seizoen = ? \");\n $stmt->execute([$period]);\n $row = $stmt->fetch();\n return $row[\"num\"] > 0;\n }",
"public function activities($limit = 0, $checkTotal = false) {\n $start = 0;\n if($limit == 0) {\n \t\t$limit = 1000000;\n \t} else {\n \t\t--$limit;\n \t}\n \tif($limit != count($this->activities) ||($checkTotal && ($this->activities && count($this->activities) < $this->allTime->lifetimeTotals->run))) {\n \t\t$this->activities = false;\n \t}\n\t\tif(!$this->activities) {\n\t\t\t$results = $this->getNikePlusFile('http://nikeplus.nike.com/plus/activity/running/'.rawurlencode($this->userId).'/lifetime/activities?indexStart='.$start.'&indexEnd='.$limit);\n\t\t\tforeach($results->activities as $activity) {\n\t\t\t\t$this->activities[$activity->activity->activityId] = $activity->activity;\n\t\t\t}\n\t\t\tkrsort($this->activities);\n\t\t}\n\t\treturn $this->activities;\n }",
"public function hasDuration(): bool;",
"public function hasPartinTime(){\n return $this->_has(1);\n }",
"public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}",
"public function metBy(DateTimePeriod $period): bool\n {\n return $period->getEnd() == $this->getStart();\n }",
"public function meets(DateTimePeriod $period): bool\n {\n return $this->getEnd() == $period->getStart();\n }",
"public function isMaintenancePeriodActive() : bool\n {\n return $this->getMessage() !== null;\n }",
"public function canView(array $activity): bool {\n $result = false;\n\n $userid = val('NotifyUserID', $activity);\n switch ($userid) {\n case ActivityModel::NOTIFY_PUBLIC:\n $result = true;\n break;\n case ActivityModel::NOTIFY_MODS:\n if (checkPermission('Garden.Moderation.Manage')) {\n $result = true;\n }\n break;\n case ActivityModel::NOTIFY_ADMINS:\n if (checkPermission('Garden.Settings.Manage')) {\n $result = true;\n }\n break;\n default:\n // Actual userid.\n if (Gdn::session()->UserID === $userid || checkPermission('Garden.Community.Manage')) {\n $result = true;\n }\n break;\n }\n\n return $result;\n }",
"private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }",
"function checkFields( &$args, &$edit_fields = null)\n {\n \tif ( $GLOBALS['appshore']->local->localToDatetime($args['activity_end']) < $GLOBALS['appshore']->local->localToDatetime($args['activity_start']) )\n \t{\n\t\t\t$args['activity_end'] = $GLOBALS['appshore']->local->datetimeToLocal(date( 'Y-m-d H:i', strtotime($GLOBALS['appshore']->local->localToDatetime($args['activity_start']).' +1 hour')));\n \t}\n return true;\n }",
"public function getIsActivatedAttribute()\n {\n return strtotime($this->{$this->starts_at_field}) <= time();\n }",
"function tquiz_print_recent_activity($course, $viewfullnames, $timestart) {\n return false; // True if anything was printed, otherwise false\n}",
"public function finishedBy(DateTimePeriod $period): bool\n {\n return\n $this->getStart() < $period->getStart() &&\n $this->getEnd() == $period->getEnd();\n }",
"public function hasTimeLimitReached(): bool;",
"function readActivities() {\n\t\t$scheduleFound = false;\n\t\t$file = \"data/activity.txt\";\n\t\t$handle = fopen($file,\"a+\");\n\t\tif (!$handle) {\n \treturn \"<p> Internal Error </p>\";\n }\n while (($line = fgets($handle)) !== false) {\n \t$current = explode(\":\",$line);\n \tif ($current[0] == $_SESSION['userName']) {\n \t\t// print to screen\n \t\techo '<div style=\"padding-left: 25px;\">';\n \t\techo \"Class with: \".$current[1].\" at: \".$current[2].\"<br>\";\n \t\techo \"</div>\";\n \t\t$scheduleFound = true;\n \t}\n }\n fclose($handle);\n return $scheduleFound;\n\t}",
"public function isCancellationWithValidPeriod(){\n return (bool) ($this->isCancelled() && !$this->hasExpired());\n }",
"public function onGracePeriod()\n {\n // If subscription end column is not empty, means that subscription will not autorenew,\n // so it is on grace period\n return $this->active && !is_null($this->endsAt);\n }",
"function ajan_core_record_activity() {\n\n\tif ( !is_user_logged_in() )\n\t\treturn false;\n\n\t$user_id = ajan_loggedin_user_id();\n\n\tif ( ajan_is_user_inactive( $user_id ) )\n\t\treturn false;\n\n\t$activity = ajan_get_user_last_activity( $user_id );\n\n\tif ( !is_numeric( $activity ) )\n\t\t$activity = strtotime( $activity );\n\n\t// Get current time\n\t$current_time = ajan_core_current_time();\n\n\t// Use this action to detect the very first activity for a given member\n\tif ( empty( $activity ) ) {\n\t\tdo_action( 'ajan_first_activity_for_member', $user_id );\n\t}\n\n\tif ( empty( $activity ) || strtotime( $current_time ) >= strtotime( '+5 minutes', $activity ) ) {\n\t\tajan_update_user_last_activity( $user_id, $current_time );\n\t}\n}",
"public function activityTime();",
"function activetime() { # Simply return TRUE or FALSE based on the time/dow and whether we should activate\n $st1 = 2114; # start time for activation on weekdays (primary schedule)\n $st2 = 2114; # start time for activation on weekends (secondary schedule)\n $et1 = 420; # end time for activation on weekdays (primary schedule)\n $et2 = 629; # end time for activation on weekends (secondary schedule)\n date_default_timezone_set('America/New_York'); # Default is UTC. That's not super-useful here.\n $nowtime = (int)date('Gi', time()); \n $nowdow = (int)date('w',time()); # 0 - 6, 0=Sunday, 6=Saturday\n\n if($nowdow >= 1 && $nowdow <= 5) { # Weekday (primary) schedule\n if(($nowtime >= $st1 && $nowtime <= 2359) || ($nowtime >= 0000 && $nowtime <= $et1) ) {\n return TRUE;\n }\n return FALSE;\n }\n else { # Weekend (secondary) schedule. \n if(($nowtime >= $st2 && $nowtime <= 2359) || ($nowtime >= 0000 && $nowtime <= $et2) ) {\n return TRUE;\n }\n return FALSE;\n }\n}",
"public function checkForAnuallyRecurring()\n {\n // not supported\n }",
"public function starts(DateTimePeriod $period): bool\n {\n return\n $this->getStart() == $period->getStart() &&\n $this->getEnd() < $period->getEnd();\n }",
"function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public function isDue(): bool;",
"function getActivityStarted($activityId) \n {\n return $this->instance->getActivityStarted($activityId);\n }",
"public function hasLogintime(){\n return $this->_has(2);\n }",
"function _erpal_projects_helper_task_has_timetracking_entity_active($nid, &$tracked_time) {\n global $user;\n\n if (!is_numeric($nid)) { //timetrackings without subject but md5 subject\n $timetracking_ids = _timetrackings_by_user($user->uid, false);\n //check if there is one timetracking without subject\n $timetracking_ids_no_subject = array();\n foreach ($timetracking_ids as $timetracking_id) {\n $timetracking = timetracking_load($timetracking_id);\n $equal_description = $nid == md5($timetracking->description);\n if (!$timetracking->subject_id && $equal_description) { //it has no subject node but it must match the md5 description, otherwise the timetrcking was for another subject text.\n \n $timetracking_ids_no_subject[] = $timetracking_id;\n }\n }\n\n $timetracking_ids = $timetracking_ids_no_subject;\n } else\n $timetracking_ids = _timetrackings_by_user($user->uid, $nid);\n\n //load all entities and calculate the total time.\n $timetrackings = timetracking_load_multiple($timetracking_ids);\n\n $total = 0;\n $has_running = false;\n foreach ($timetrackings as $timetracking) {\n if ($timetracking->time_end) {\n $duration = $timetracking->duration;\n } else {\n $duration = (time() - $timetracking->time_start) / (60*60);\n $has_running = true;\n }\n\n $total += $duration;\n }\n\n $tracked_time = round($total, 2);\n\n return $has_running;\n}",
"public function isActive(): bool\n {\n $firstEventRepetitionIdInFuture = EventRepetition::getFirstEventRpIdByEventId($this->id);\n\n if (! empty($firstEventRepetitionIdInFuture)) {\n return true;\n } else {\n return false;\n }\n }",
"function dllc_print_recent_activity($course, $viewfullnames, $timestart) {\n return false;\n}",
"function roshine_print_recent_activity($course, $viewfullnames, $timestart) {\n return false; // True if anything was printed, otherwise false\n}",
"public function hasStarted(){\n return (bool) Carbon::now()->greaterThanOrEqualTo(Carbon::parse($this->starts_on));\n }",
"function checkExcEvents($time,$item,$exc_entries) {\n\t\t$m\t= strftime('%m', $time);\n\t\t$d\t= strftime('%d', $time);\n\n\t\tif ($item['exc_category']) {\n\t\t\t$categories = explode(',', $item['exc_category']);\n\t\t\tforeach($categories as $category) {\n\t\t\t\tif (is_array($exc_entries['category'][$category])) {\n\t\t\t\t\tforeach($exc_entries['category'][$category] as $key => $value) {\n\t\t\t\t\t\t$checkExcItems[] = $key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($item['exc_event']) {\n\t\t\t$exc_events = explode(',', $item['exc_event']);\n\t\t\tforeach($exc_events as $exc_event) {\n\t\t\t\t$checkExcItems[] = $exc_event;\n\t\t\t}\n\t\t}\n\n\t\tif(is_array($checkExcItems)) {\n\t\t\tforeach($exc_entries[$m][$d] as $entry) {\n\t\t\t\tif(in_array($entry['uid'], $checkExcItems)) {\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"public function isRunning() {\n\t\treturn $this->workflowActivitySpecification->isRunning();\n\t}",
"public function onTrial()\n {\n // If trial end column is not empty, means the subscription is on trial period\n return $this->active && !is_null($this->trialEndsAt);\n }",
"function are_we_timesheeting_today() {\n\t\t$timesheet_regex = str_replace('{{DATE}}',date('Ymd',time()+($this->config['timesheet_lead_time_days'] * 86400)),$this->config['timesheet_file_find_by_date']);\n\n\t\t$dh = opendir($this->config['timesheet_path']);\n\n\t\twhile ($file = readdir($dh)) {\n\t\t\tif (preg_match($timesheet_regex,$file)) { \n\t\t\t\techo \"Today's timesheet has already been generated: $file\\n\";\n\t\t\t\treturn false;\n\t\t\t} \n\t\t}\n\t\n\t\tclosedir($dh);\n\n\t\tforeach ($this->get_calendar_events(time()+($this->config['timesheet_lead_time_days'] * 86400), ((time()+($this->config['timesheet_lead_time_days']+1) * 86400)-86400)) as $event) {\n\n\t\t\tif (preg_match($this->config['calendar_entry'], $event->title->text, $m)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function hasStarttime(){\n return $this->_has(2);\n }",
"public function hasPassed()\n {\n if (empty($this->startDate) || empty($this->endDate)) {\n return false;\n }\n\n $next = $this->next()->next;\n\n return DateTimeHelper::isInThePast($next);\n }",
"public function contactedThisTime($timestamp, $id, $period) {\n\t\t\t// claimants::callTime(timestamp)\n\t\t\n\t\t\n\t\t\t$db = new database();\n\t\t\t$results = $db->getAll(\"SELECT * FROM claimants_noanswers WHERE cid = '\".$id.\"'\");\n\t\t\n\t\t\t$contacts = ARRAY();\n\t\t\tforeach ($results AS $result) {\n\t\t\t\tif (claimants::callTime($result['timestamp']) == $period) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tif (date(\"dmY\",$result['timestamp']) == date(\"dmY\",strtotime(\"NOW\"))) {\t\t\t\t\n\t\t\t\t\t\t$contacts[] = $result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count($contacts) > 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\n\t\t\n\t\t\t\n\t\t}",
"public function getIsNotActivatedAttribute()\n {\n return time() < strtotime($this->{$this->starts_at_field});\n }",
"public function hasCtime(){\n return $this->_has(4);\n }",
"function _Check_Should_Complete_Schedule ($application_id, $status, $schedule)\n{\n\t/**\n\t * Check the status and whether or not there are any fatal failures to\n\t * determine whether or not this code should be run.\n\t */\n\t$app = ECash::getApplicationById($application_id);\n\t$app_status = $app->getStatus();\n\t\n\t/*\n\t$flags = $app->getFlags();\n\tif(\n\t\t$flags->get('cust_no_ach')\n\t\t&& (!isCardSchedule($application_id))\n\t)\n\t{\n\t\treturn false;\n\t}\n\t*/\n\n\t$status_chain = array();\n\tif ($app_status->level0) $status_chain[] = $app_status->level0;\n\tif ($app_status->level1) $status_chain[] = $app_status->level1;\n\tif ($app_status->level2) $status_chain[] = $app_status->level2;\n\tif ($app_status->level3) $status_chain[] = $app_status->level3;\n\tif ($app_status->level4) $status_chain[] = $app_status->level4;\n\tif ($app_status->level5) $status_chain[] = $app_status->level5;\n\t$status_chain = implode('::', $status_chain);\n\n\t// GF #13514: Removed 3 collections statuses from acceptable statuses. [benb]\n\t$acceptable_status = array(\n\t'active::servicing::customer::*root',\n\t//'past_due::servicing::customer::*root',\n\t'new::collections::customer::*root',\n\t'indef_dequeue::collections::customer::*root',\n\t//'dequeued::contact::collections::customer::*root',\n\t//'queued::contact::collections::customer::*root',\n\t//'follow_up::contact::collections::customer::*root',\n\t'approved::servicing::customer::*root',\n\t);\n\n\t$log = get_log(\"scheduling\");\n\n\t// No accounts with fatal failures or that aren't an acceptable status\n\tif ($status_chain != 'active::servicing::customer::*root' &&\n\t(($status->num_fatal_failures > 0) || !in_array($status_chain, $acceptable_status))) {\n\t\t$log->Write(\"[Agent:{$_SESSION['agent_id']}][AppID:{$application_id}] Is in an invalid status ($status_chain) or has fatal errors ({$status->num_fatal_failures}), not completing schedule.\");\n\t\treturn false;\n\t}\n\n\t// mantis:7875 If no balance, and account has been funded...\n\tif($status->posted_and_pending_total <= 0\n\t&& $status_chain != 'approved::servicing::customer::*root')\n\t{\n\t\t$log->Write(\"[Agent:{$_SESSION['agent_id']}][AppID:{$application_id}] Is in an invalid status, not completing schedule.\");\n\t\treturn false;\n\t}\n\n\t// Do not run if the account has arrangments and a balance\n\tif ($status->has_arrangements && $status->posted_and_pending_total > 0)\n\t{\n\t\t$log->Write(\"[Agent:{$_SESSION['agent_id']}][AppID:{$application_id}] Is in an arrangement status and has a balance, not completing schedule.\");\n\t\treturn false;\n\t}\n\treturn true;\n\n}",
"public function checkTimeEnd(): bool;",
"private function isEmptyStartDate(\\DotbBean $activity)\n {\n $timeDate = \\TimeDate::getInstance();\n\n if (empty($activity->date_start)) {\n return true;\n }\n\n $date = $timeDate->fromUser($activity->date_start);\n\n if (!$date) {\n $date = $timeDate->fromDb($activity->date_start);\n }\n\n return $timeDate->asDb($date) === $timeDate->asDb($this->getEmptyStartDate());\n }",
"public function getIsRunning();",
"public function givenNoPriorActivity();",
"private function CheckDateOverlapping()\n\t{\n\t\t$rid = MicroGrid::GetParameter('rid');\n\t\t$start_date = MicroGrid::GetParameter('start_date', false);\n\t\t$finish_date = MicroGrid::GetParameter('finish_date', false);\n\t\t$hotel_id = MicroGrid::GetParameter('hotel_id', false);\n\n\t\t$sql = 'SELECT * FROM '.TABLE_HOTEL_PERIODS.'\n\t\t\t\tWHERE\n\t\t\t\t\tid != '.(int)$rid.' AND\n\t\t\t\t\thotel_id = '.(int)$hotel_id.' AND\n\t\t\t\t\t(((\\''.$start_date.'\\' >= start_date) AND (\\''.$start_date.'\\' <= finish_date)) OR\n\t\t\t\t\t((\\''.$finish_date.'\\' >= start_date) AND (\\''.$finish_date.'\\' <= finish_date))) ';\t\n\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\n\t\tif($result[1] > 0){\n\t\t\t$this->error = _TIME_PERIOD_OVERLAPPING_ALERT;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function hasPassed() {\n \treturn $this < new \\DateTime();\n }",
"public function hasStarttime(){\n return $this->_has(7);\n }",
"public function onGracePeriod() : bool\n {\n $endsAt = new DateTime((string) $this->ends_at);\n\n if (!is_null($endsAt)) {\n return Carbon::now()->lt(Carbon::instance($endsAt));\n }\n\n return false;\n }",
"public function isExecutionRunning() {}",
"public function hasCombatStatus(){\r\n return $this->_has(2);\r\n }",
"public static function isPeriodExists ($period_date, $timetable_id, \r\n $staff_id)\r\n {\r\n //$dbselect->where ( \"period_date = ?\", $period_date );\r\n //$dbselect->where ( \"timetable_id = ? \" ,$timetable_id );\r\n //$sql = $dbselect->__toString () ;\r\n //return $sql;\r\n $sql = self::getDefaultAdapter()->query(\r\n \"SELECT * FROM period_attendance WHERE timetable_id = $timetable_id AND period_date = '$period_date'\");\r\n //return $sql->__toString();\r\n return count($sql->fetchAll());\r\n }",
"public function hasTime(){\n return $this->_has(3);\n }",
"function annotation_print_recent_activity($course, $viewfullnames, $timestart) {\n return false;\n}",
"function eo_is_all_day($id=''){\n\tglobal $post;\n\t$event = $post;\n\n\tif(!empty($id)) $event = eo_get_by_postid($id);\n\n\tif(empty($event)) return false;\n\n\tif(!empty($event->event_allday))\n\t\treturn true;\n\n\treturn false;\n}",
"public function hasRecurringOrders();",
"function check_billing_timeframe ($billing_timeframe, $section = \"\") {\n\n\t$issues = \"\";\n\n\tif (isset($billing_timeframe[\"type\"])) {\n\t\tif (! preg_match(\"/^(daily|weekly|monthly|bi-monthly)$/\", $billing_timeframe[\"type\"])) {\n\t\t\t$issues .= \" Invalid 'billing_timeframe' 'type' defined, allowed values are: daily, weekly, monthly and bi-monthly.\\n\";\n\t\t}\n\t\tif ($billing_timeframe[\"type\"] == \"monthly\") {\n\t\t\tif (isset($billing_timeframe[\"day\"])) {\n\t\t\t\tif (is_numeric($billing_timeframe[\"day\"])) {\n\t\t\t\t\tif (($billing_timeframe[\"day\"] < 1) || ($billing_timeframe[\"day\"] > 31)) {\n\t\t\t\t\t\t$issues .= \" Value 'billing_timeframe' 'day' must be a value of 1 to 31 or 'last'.\\n\";\n\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tif ($billing_timeframe[\"day\"] != \"last\") {\n\t\t\t\t\t\t$issues .= \" Value 'billing_timeframe' 'day' must be a value of 1 to 31 or 'last'.\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($billing_timeframe[\"every\"])) {\n\t\t\tif (! is_numeric($billing_timeframe[\"every\"])) {\n\t\t\t\t$issues .= \" Value 'billing_timeframe' 'every' must be numeric.\\n\";\n\t\t\t}\n\t\t}\n\t}else{\n\t\t$issues .= \" No 'billing_timeframe' 'type' defined.\\n\";\n\t}\n\tif (isset($billing_timeframe[\"start_date\"])) {\n\t\tif (strtotime($billing_timeframe[\"start_date\"]) == FALSE) {\n\t\t\t$issues .= \" Invalid 'billing_timeframe' 'start_date' defined, date format issue.\\n\";\n\t\t}\n\t}\n\n\tif (strlen($issues) > 0) { \n\t\tif (strlen($section) > 0) {\n\t\t\t$issues = \" Billing timeframe issues found in \" . $section . \" section\\n\" . $issues;\n\t\t}\n\t}\n\treturn $issues;\n\n}",
"protected function _canRun()\r\n\t{\r\n\t\t$start\t= strtotime($this->_scheduleStart);\r\n\t\t$stop\t= strtotime($this->_scheduleStop);\r\n\t\t$now\t= time();\r\n\t\t\r\n\t\tif($now > $start && $now < $stop) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function shouldExecute()\n\t{\n\t\t// date range check\n\t\tif( strtotime($this->start_date) > utc_time() || strtotime($this->end_date) < utc_time() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// time range check, for the current day-of-week\n\t\t$dow_abbrevs = [null, 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];\n\t\t$dow_int = utc_date()->format('N');\t// 1 = mon, 7 = sun\n\t\t$dow = $dow_abbrevs[$dow_int];\n\t}",
"public function hasCondition();",
"function learndash_active_coupons_exist(): bool {\n\t$coupon_post_type = LDLMS_Post_Types::get_post_type_slug( LDLMS_Post_Types::COUPON );\n\n\tif ( 0 === wp_count_posts( strval( $coupon_post_type ) )->publish ) {\n\t\treturn false;\n\t}\n\n\t$current_time = time();\n\n\t$meta_query_groups = array(\n\t\tarray(\n\t\t\t'relation' => 'AND',\n\t\t\tarray(\n\t\t\t\t'key' => LEARNDASH_COUPON_META_KEY_START_DATE,\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'value' => $current_time,\n\t\t\t\t'type' => 'NUMERIC',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => LEARNDASH_COUPON_META_KEY_END_DATE,\n\t\t\t\t'compare' => '>',\n\t\t\t\t'value' => $current_time,\n\t\t\t\t'type' => 'NUMERIC',\n\t\t\t),\n\t\t),\n\t\tarray(\n\t\t\t'relation' => 'AND',\n\t\t\tarray(\n\t\t\t\t'key' => LEARNDASH_COUPON_META_KEY_START_DATE,\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'value' => $current_time,\n\t\t\t\t'type' => 'NUMERIC',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => LEARNDASH_COUPON_META_KEY_END_DATE,\n\t\t\t\t'compare' => '=',\n\t\t\t\t'value' => 0,\n\t\t\t\t'type' => 'NUMERIC',\n\t\t\t),\n\t\t),\n\t);\n\n\tforeach ( $meta_query_groups as $meta_query ) {\n\t\t$query_args = array(\n\t\t\t'post_type' => $coupon_post_type,\n\t\t\t'posts_per_page' => 1,\n\t\t\t'post_status' => 'publish',\n\t\t\t'fields' => 'ids',\n\t\t\t'meta_query' => $meta_query,\n\t\t);\n\n\t\t$query = new WP_Query( $query_args );\n\n\t\tif ( $query->post_count > 0 ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}",
"private function containsInterval(self $period): bool\n {\n return match (true) {\n $this->startDate < $period->startDate && $this->endDate > $period->endDate\n => true,\n $this->startDate == $period->startDate && $this->endDate == $period->endDate\n => $this->bounds === $period->bounds || '[]' === $this->bounds,\n $this->startDate == $period->startDate\n => ($this->bounds[0] === $period->bounds[0] || '[' === $this->bounds[0])\n && $this->containsDatePoint($this->startDate->add($period->dateInterval()), $this->bounds),\n $this->endDate == $period->endDate\n => ($this->bounds[1] === $period->bounds[1] || ']' === $this->bounds[1])\n && $this->containsDatePoint($this->endDate->sub($period->dateInterval()), $this->bounds),\n default\n => false,\n };\n }",
"public function checkOverlap()\n {\n global $zdb;\n\n try {\n $select = $zdb->select(self::TABLE, 'c');\n $select->columns(\n array('date_debut_cotis', 'date_fin_cotis')\n )->join(\n array('ct' => PREFIX_DB . ContributionsTypes::TABLE),\n 'c.' . ContributionsTypes::PK . '=ct.' . ContributionsTypes::PK,\n array()\n )->where(Adherent::PK . ' = ' . $this->_member)\n ->where(array('cotis_extension' => new Expression('true')))\n ->where->nest->nest\n ->greaterThanOrEqualTo('date_debut_cotis', $this->_begin_date)\n ->lessThan('date_debut_cotis', $this->_end_date)\n ->unnest\n ->or->nest\n ->greaterThan('date_fin_cotis', $this->_begin_date)\n ->lessThanOrEqualTo('date_fin_cotis', $this->_end_date);\n\n if ( $this->id != '' ) {\n $select->where(self::PK . ' != ' . $this->id);\n }\n\n $results = $zdb->execute($select);\n $result = $results->current();\n if ( $result !== false ) {\n $d = new \\DateTime($result->date_debut_cotis);\n\n return _T(\"- Membership period overlaps period starting at \") .\n $d->format(_T(\"Y-m-d\"));\n }\n return true;\n } catch (\\Exception $e) {\n Analog::log(\n 'An error occured checking overlaping fee. ' . $e->getMessage(),\n Analog::ERROR\n );\n return false;\n }\n }",
"function isChallengeOpen($challenge_id) {\n $challenges = challenges();\n $enddate = strtotime($challenges[$challenge_id]['enddate']);\n $type = $challenges[$challenge_id]['type'];\n $open = $challenges[$challenge_id]['open'];\n if(!$open) {\n return false;\n }\n if ($type == 'public' || $type == 'private') {\n return true;\n }\n if ($type == 'protected') {\n if ($enddate > time()) {\n return true;\n } else {\n return false;\n }\n }\n}",
"function pagetest($child) {\n global $acad_year;\n $pattern = '/^events\\/'.$acad_year.'\\/_pending\\/'.$_GET['date'].'/';\n if (preg_match($pattern, $child->path->path))\n return true;\n}",
"public function canCancel() {\n $today = Carbon::parse();\n $canCancelFrom = $this->start_date->addMonthsNoOverflow($this->package->commitment_period)->firstOfMonth();\n\n if($canCancelFrom->greaterThan($today) || !$this->hasExpired()) {\n return false;\n }\n\n return true;\n }",
"public function estaInscritoActividadEconomica()\r\n\t\t{\r\n\t\t\t$result = false;\r\n\t\t\t$inscripcion = New InscripcionActividadEconomicaSearch($this->_id_contribuyente);\r\n\t\t\t$result = $inscripcion->yaEstaInscritoActividadEconomica();\r\n\t\t\treturn $result;\r\n\t\t}"
] | [
"0.6129946",
"0.608839",
"0.59263957",
"0.57652843",
"0.57059205",
"0.56851333",
"0.5671095",
"0.5654171",
"0.564009",
"0.56324595",
"0.55978054",
"0.55362135",
"0.5536183",
"0.5535323",
"0.55160743",
"0.5508851",
"0.54894686",
"0.54801834",
"0.5477013",
"0.54604495",
"0.54604495",
"0.5456032",
"0.5412867",
"0.54088384",
"0.54056567",
"0.53648233",
"0.5361885",
"0.53612185",
"0.5353132",
"0.5346135",
"0.5336606",
"0.53315485",
"0.5330646",
"0.53299916",
"0.5327755",
"0.5326582",
"0.5317222",
"0.5298303",
"0.529662",
"0.52873737",
"0.52852225",
"0.52705485",
"0.52603275",
"0.5250965",
"0.52447593",
"0.5230044",
"0.52285516",
"0.5220987",
"0.5219738",
"0.5212648",
"0.5201871",
"0.51968926",
"0.5196631",
"0.51941395",
"0.5188974",
"0.51809776",
"0.5180704",
"0.5176754",
"0.5176329",
"0.5172509",
"0.5168974",
"0.5166056",
"0.51641214",
"0.5158175",
"0.51436216",
"0.51418424",
"0.5139886",
"0.5137951",
"0.5136929",
"0.5131773",
"0.5131006",
"0.5129338",
"0.51291186",
"0.5128699",
"0.5127509",
"0.5111371",
"0.5110496",
"0.5108149",
"0.5105317",
"0.51052296",
"0.51011807",
"0.509197",
"0.5085988",
"0.50835",
"0.5081452",
"0.5080871",
"0.5074529",
"0.5068714",
"0.5066428",
"0.5064683",
"0.50622237",
"0.5049639",
"0.5043556",
"0.5043312",
"0.50401896",
"0.50363517",
"0.50361496",
"0.50306344",
"0.503033",
"0.50226533"
] | 0.6769645 | 0 |
Returns DB table name for entity. | public static function getTableName()
{
return 'b_disk_onlyoffice_document_info';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }",
"public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }",
"public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }",
"public static function getTableName()\n\t{\n\t\treturn 'b_timeman_monitor_entity';\n\t}",
"public function getTable($entityName)\n {\n $tableName = '';\n //echo $entityName. '<br/>';\n\n if (strpos($entityName, '/')) {\n $modelEntity = $entityName;\n $tableName = $this->_resources->getTableName($modelEntity);\n }\n else if( !empty($this->_resourceModel) ) {\n $entityName = sprintf('%s/%s', $this->_resourceModel, $entityName);\n $tableName = $this->_resources->getTableName($entityName);\n }\n else {\n $tableName = $entityName;\n }\n\n return $tableName;\n }",
"public function get_table_name()\n {\n return $this->prefix . $this->table;\n }",
"protected function getTableName(): string {\n return self::TABLE_NAME;\n }",
"function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}",
"public static function get_table_name()\n {\n return self::TABLE_NAME;\n }",
"private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }",
"public function get_table_name(){\n return $this->table_name();\n }",
"public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }",
"public function getTableName()\n {\n return $this->__get(\"table_name\");\n }",
"protected function table(): string\n {\n return $this->tableName;\n }",
"public function get_table_name() {\n return $this->table_name;\n }",
"protected function table () : string {\n return $this->guessName();\n }",
"public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }",
"public static function getTableName(){\n\t\treturn self::$table_name;\n\t}",
"function getTableName(): string;",
"public static function table()\n\t{\n\t\treturn self::em()->getRepository(static::class)->getMetadata()->getTable();\n\t}",
"public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }",
"public static function getTableName()\n\t{\n\t\treturn 'b_sale_entity_marker';\n\t}",
"public static function getTableName() {\n return self::$tableName;\n }",
"public function getTableName();",
"public function getTableName();",
"public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}",
"public function getTableName() {\n\t\treturn $this -> _name;\n\t}",
"public function getTableName(): string;",
"public function getTableName(): string;",
"public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}",
"public function getTableName() ;",
"public static function getTableName()\n {\n return ((new self)->getTable());\n }",
"public static function tablename() {\n return self::TABLE;\n }",
"public function getTableName() {}",
"public function getTableName() {}",
"public function table_name ()\n {\n return $this->app->table_names->entries;\n }",
"public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }",
"function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}",
"public static function table_name() {\n $table_name = strtolower(get_called_class());\n\n if (!in_array($table_name, ApplicationSql::tablenames()))\n throw new TableNotFoundException(\"Veritabanında böyle bir tablo mevcut değil\", $table_name);\n\n return $table_name;\n }",
"public function getTableName( )\n {\n return $this->table_name;\n }",
"protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}",
"protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }",
"public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }",
"public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}",
"public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }",
"public function getTableName() {\n return $this->mapping['table'];\n }",
"public function getTable(): string\n {\n return $this->prefix . $this->table;\n }",
"public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}",
"public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }",
"public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}",
"public function getTblName()\n {\n return $this->tbl_name;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getEntityName(SchemaTable $table) {\n\t\t$dbName = $table->getDatabase()->getDatabaseName();\n\t\t$tableName = $table->getTableName();\n\t\t\n\t\t// Check if a custom entity name is set via the configuration, if not, then use strip_table_name_prefixes option.\n\t\t$entityName = $this->getConfigValue('entity_name', $dbName, $tableName, CoughConfig::SCOPE_TABLE);\n\t\tif (is_null($entityName)) {\n\t\t\t// If a prefix exists in the table name, remove it\n\t\t\t$prefixes = $this->getConfigValue('class_names/strip_table_name_prefixes', $dbName, $tableName);\n\t\t\t$entityName = $this->getTableNameWithoutPrefix($tableName, $prefixes);\n\t\t}\n\t\t\n\t\treturn $entityName;\n\t}",
"public function getTableName()\r\n {\r\n return $this->tableName;\r\n }",
"public static function getTableName()\n {\n return static::getConfig()[self::CONFIG_TABLE_NAME];\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}",
"protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }",
"private function getTableName()\n {\n $class = get_class($this);\n\n $mem = new Cache();\n if ($tableName = $mem->get($class . '-table-name')) {\n return $tableName;\n }\n\n $break = explode('\\\\', $class);\n $ObjectName = end($break);\n $className = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ObjectName));\n $tableName = Inflect::pluralize($className);\n\n $mem->add($class . '-table-name', $tableName, 1440);\n\n return $tableName;\n }",
"public function dataTableName()\n {\n $tableName = 'pd2_' . Utils::normalizeString($this->product()->name)\n . '__' . Utils::normalizeString($this->name);\n return strtolower($tableName);\n }",
"function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}",
"abstract public static function getTableName();",
"abstract public static function getTableName();",
"public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}",
"protected static function get_table_name() {\n return null;\n }",
"protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}",
"private function setTableName()\n {\n // Get table name from name of entity if not defined\n if (!$this->tableName) {\n $path = explode('\\\\', get_class($entity));\n $this->tableName = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', array_pop($path))).'s';\n }\n\n // Set table to be used\n $this->adapter->setTable($this->tableName);\n }",
"public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }",
"public static function getTableName()\n\t{\n\t\t//called from users, keyword self:: returns model\n\t\t// return self::$table;\n\t\t//called from users, keyword static:: returns users\n\t\treturn static::$table;\n\t}",
"abstract public function getTableName();",
"abstract public function getTableName();",
"abstract public function getTableName();",
"public function getTableName():string;",
"public function getTableName(): string\n {\n return $this->tableNames[0];\n }",
"public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}",
"public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}",
"public function getTableName()\n {\n if ($this->tableName) {\n return $this->tableName;\n }\n\n return $this->namingStrategy->classToTableName($this->name);\n }",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTableName() {\n return $this->table;\n }",
"public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }",
"public function getTable(): string\n {\n return $this->table;\n }",
"public function getTable(): string\n {\n return $this->table;\n }",
"public function getTableName()\n {\n return $this->_tableName;\n }",
"function getTableName() {\n return $this->tableName;\n }",
"public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}",
"public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}",
"private static function getFullyQualifiedTableName() {\n $database_name = static::getDatabaseName();\n $table_name = static::getTableName();\n return static::genFullyQualifiedTableName($database_name, $table_name);\n }",
"public function getTable(): string\n {\n return $this->_table;\n }"
] | [
"0.8195651",
"0.7825781",
"0.77575964",
"0.77522725",
"0.7682072",
"0.7679911",
"0.7655929",
"0.7643668",
"0.7620185",
"0.7599329",
"0.7584867",
"0.7509939",
"0.7507627",
"0.74633884",
"0.7452192",
"0.74252176",
"0.74170417",
"0.7393153",
"0.7393153",
"0.7393153",
"0.73864293",
"0.73712116",
"0.7370553",
"0.73693115",
"0.7358379",
"0.7349888",
"0.73483044",
"0.73419654",
"0.73419654",
"0.7338124",
"0.73287576",
"0.7316768",
"0.7316768",
"0.73074764",
"0.73038787",
"0.7298196",
"0.729584",
"0.7291168",
"0.7291168",
"0.72896117",
"0.7288463",
"0.72752833",
"0.7265767",
"0.72649336",
"0.7264169",
"0.7261446",
"0.7257704",
"0.72548395",
"0.7251026",
"0.723936",
"0.7222342",
"0.7222342",
"0.7222342",
"0.7222342",
"0.7222033",
"0.72216",
"0.7221569",
"0.72214365",
"0.7219204",
"0.7215103",
"0.7198257",
"0.7192169",
"0.718763",
"0.7171944",
"0.71655643",
"0.71602714",
"0.71602714",
"0.71602714",
"0.71540445",
"0.714903",
"0.7148506",
"0.7145862",
"0.71423095",
"0.7141627",
"0.7141627",
"0.71405226",
"0.71356136",
"0.71308565",
"0.71238136",
"0.7118735",
"0.71150875",
"0.71109736",
"0.71109736",
"0.71109736",
"0.7109311",
"0.710795",
"0.7091069",
"0.70900244",
"0.7077742",
"0.70729494",
"0.70729494",
"0.70725775",
"0.70714164",
"0.70622957",
"0.70622957",
"0.70513076",
"0.7049081",
"0.7047363",
"0.70382166",
"0.70325637",
"0.70311403"
] | 0.0 | -1 |
Returns entity map definition. | public static function getMap()
{
return [
(new StringField('EXTERNAL_HASH'))
->configurePrimary()
->configureAutocomplete()
->configureSize(128)
,
new IntegerField('OBJECT_ID'),
new IntegerField('VERSION_ID'),
(new IntegerField('OWNER_ID'))
->configureRequired()
,
(new DatetimeField('CREATE_TIME'))
->configureRequired()
->configureDefaultValue(function() {
return new DateTime();
})
,
(new DatetimeField('UPDATE_TIME'))
->configureRequired()
->configureDefaultValue(function() {
return new DateTime();
})
,
(new IntegerField('USERS'))
->configureDefaultValue(0)
,
(new IntegerField('CONTENT_STATUS'))
->configureDefaultValue(self::CONTENT_STATUS_INIT)
,
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'PROFILE_ID' => new Entity\\IntegerField('PROFILE_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'PROFILE_EXEC_ID' => new Entity\\IntegerField('PROFILE_EXEC_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'DATE_EXEC' => new Entity\\DateTimeField('DATE_EXEC', array(\n\t\t\t\t'default_value' => ''\n\t\t\t)),\n\t\t\t'TYPE' => new Entity\\StringField('TYPE', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'ENTITY_ID' => new Entity\\IntegerField('ENTITY_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'FIELDS' => new Entity\\TextField('FIELDS', array()),\n\t\t\t'PROFILE' => new Entity\\ReferenceField(\n\t\t\t\t'PROFILE',\n\t\t\t\t'\\Bitrix\\EsolImportxml\\ProfileTable',\n\t\t\t\tarray('=this.PROFILE_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'PROFILE_EXEC' => new Entity\\ReferenceField(\n\t\t\t\t'PROFILE_EXEC',\n\t\t\t\t'\\Bitrix\\EsolImportxml\\ProfileExecTable',\n\t\t\t\tarray('=this.PROFILE_EXEC_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'IBLOCK_ELEMENT' => new Entity\\ReferenceField(\n\t\t\t\t'IBLOCK_ELEMENT',\n\t\t\t\t'\\Bitrix\\Iblock\\ElementTable',\n\t\t\t\tarray('=this.ENTITY_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'IBLOCK_SECTION' => new Entity\\ReferenceField(\n\t\t\t\t'IBLOCK_SECTION',\n\t\t\t\t'\\Bitrix\\Iblock\\SectionTable',\n\t\t\t\tarray('=this.ENTITY_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\tarray(\n\t\t\t\t 'autocomplete' => true,\n\t\t\t\t 'primary' => true,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('ORDER_ID'),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'ENTITY_TYPE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 25,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('ENTITY_ID'),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'TYPE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 10,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'CODE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 255,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateComment')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'MESSAGE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 255,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateMessage')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'COMMENT',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 500,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateComment')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('USER_ID'),\n\n\t\t\tnew Main\\Entity\\DatetimeField(\n\t\t\t\t'DATE_CREATE'\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\DatetimeField(\n\t\t\t\t'DATE_UPDATE'\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\BooleanField(\n\t\t\t\t'SUCCESS',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 1,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateSuccess')\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}",
"public function getMapping() {}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_CHAT_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CONNECTOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_MESSAGE_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t);\n\t}",
"public static function getMap()\n { \n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ID_FIELD'),\n ),\n 'DATE_CHANGE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CHANGE_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_SORT_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_NAME_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'PARENT_CATEGORY_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_PARENT_CATEGORY_ID_FIELD'),\n ), \n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'NAME' => new ORM\\Fields\\StringField(\n\t\t\t\t'NAME',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tnew ORM\\Fields\\Validators\\LengthValidator(null, 50),\n\t\t\t\t\t\t];\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERCENTAGE' => new ORM\\Fields\\FloatField(\n\t\t\t\t'PERCENTAGE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t\t]\n\t\t\t)\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('TEMPLATE_ID', [\n\t\t\t\t'primary' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PROVIDER', [\n\t\t\t\t'primary' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\ReferenceField('TEMPLATE', '\\Bitrix\\DocumentGenerator\\Model\\Template',\n\t\t\t\t['=this.TEMPLATE_ID' => 'ref.ID']\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ID_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateUser'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_USER_ID_FIELD'),\n ),\n 'ELEMENT_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateElementCode'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ELEMENT_CODE_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_TITLE_FIELD'),\n ),\n 'PASSWORD_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validatePassword'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_PASSWORD_ID_FIELD'),\n ),\n 'APP_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateApp'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APP_ID_FIELD'),\n ),\n 'SCOPE' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_SCOPE_FIELD'),\n ),\n 'QUERY' => array(\n 'data_type' => 'text',\n 'serialized' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_QUERY_FIELD'),\n ),\n 'OUTGOING_EVENTS' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_EVENTS_FIELD'),\n ),\n 'OUTGOING_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingQueryNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_NEEDED_FIELD'),\n ),\n 'OUTGOING_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_NEEDED_FIELD'),\n ),\n 'WIDGET_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_LIST' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_LIST_FIELD'),\n ),\n 'APPLICATION_TOKEN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationToken'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_TOKEN_FIELD'),\n ),\n 'APPLICATION_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_NEEDED_FIELD'),\n ),\n 'APPLICATION_ONLY_API' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationOnlyApi'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_ONLY_API_FIELD'),\n ),\n 'BOT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_ID_FIELD'),\n ),\n 'BOT_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateBotHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_HANDLER_URL_FIELD'),\n ),\n 'USER' => new ReferenceField(\n 'USER',\n '\\Bitrix\\Main\\UserTable',\n array('=this.USER_ID' => 'ref.ID')\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('ADDRESS_ID'))\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('ENTITY_ID'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(1, 100)),\n\n\t\t\t// todo: int\n\t\t\t(new Fields\\StringField('ENTITY_TYPE'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(1, 50)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('ADDRESS', AddressTable::class,\n\t\t\t\tJoin::on('this.ADDRESS_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}",
"public static function getMap()\n {\n return [\n 'ID' => [\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ID_FIELD'),\n ],\n 'STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_STEP_FIELD'),\n ],\n 'STATUS' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_STATUS_FIELD'),\n ],\n 'ITEMS_PER_STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_PER_STEP_FIELD'),\n ],\n 'CREATED' => [\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_CREATED_FIELD'),\n ],\n ];\n }",
"public function getMappingEntityBundle();",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'STORE_ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'STORE_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_STORE_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PRODUCT_ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'PRODUCT_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_PRODUCT_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'AMOUNT' => new ORM\\Fields\\FloatField(\n\t\t\t\t'AMOUNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_AMOUNT_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'QUANTITY_RESERVED' => new ORM\\Fields\\FloatField(\n\t\t\t\t'QUANTITY_RESERVED',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_QUANTITY_RESERVED_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'STORE' => new ORM\\Fields\\Relations\\Reference(\n\t\t\t\t'STORE',\n\t\t\t\tStoreTable::class,\n\t\t\t\tORM\\Query\\Join::on('this.STORE_ID', 'ref.ID')\n\t\t\t),\n\t\t\t'PRODUCT' => new ORM\\Fields\\Relations\\Reference(\n\t\t\t\t'PRODUCT',\n\t\t\t\tProductTable::class,\n\t\t\t\tORM\\Query\\Join::on('this.PRODUCT_ID', 'ref.ID')\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'XML_ID' => new Main\\Entity\\StringField('XML_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateXmlId'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_XML_ID_FIELD')\n\t\t\t)),\n\t\t\t'SITE_ID' => new Main\\Entity\\StringField('SITE_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_SITE_ID_FIELD')\n\t\t\t)),\n\t\t\t'TYPE' => new Main\\Entity\\IntegerField('TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => self::TYPE_DISCOUNT,\n\t\t\t\t'validation' => array(__CLASS__, 'validateType'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_TYPE_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE' => new Main\\Entity\\BooleanField('ACTIVE', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE_FROM' => new Main\\Entity\\DatetimeField('ACTIVE_FROM', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_FROM_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE_TO' => new Main\\Entity\\DatetimeField('ACTIVE_TO', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_TO_FIELD')\n\t\t\t)),\n\t\t\t'RENEWAL' => new Main\\Entity\\BooleanField('RENEWAL', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_RENEWAL_FIELD')\n\t\t\t)),\n\t\t\t'NAME' => new Main\\Entity\\StringField('NAME', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_NAME_FIELD')\n\t\t\t)),\n\t\t\t'SORT' => new Main\\Entity\\IntegerField('SORT', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_SORT_FIELD')\n\t\t\t)),\n\t\t\t'MAX_DISCOUNT' => new Main\\Entity\\FloatField('MAX_DISCOUNT', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_MAX_DISCOUNT_FIELD')\n\t\t\t)),\n\t\t\t'VALUE_TYPE' => new Main\\Entity\\EnumField('VALUE_TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'values' => array(self::VALUE_TYPE_PERCENT, self::VALUE_TYPE_FIX, self::VALUE_TYPE_SALE),\n\t\t\t\t'default_value' => self::VALUE_TYPE_PERCENT,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_VALUE_TYPE_FIELD')\n\t\t\t)),\n\t\t\t'VALUE' => new Main\\Entity\\FloatField('VALUE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_VALUE_FIELD')\n\t\t\t)),\n\t\t\t'CURRENCY' => new Main\\Entity\\StringField('CURRENCY', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateCurrency'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CURRENCY_FIELD')\n\t\t\t)),\n\t\t\t'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new Main\\Type\\DateTime();\n\t\t\t\t\t},\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_TIMESTAMP_X_FIELD')\n\t\t\t)),\n\t\t\t'COUNT_PERIOD' => new Main\\Entity\\EnumField('COUNT_PERIOD', array(\n\t\t\t\t'values' => array(self::COUNT_PERIOD_TYPE_ALL, self::COUNT_PERIOD_TYPE_INTERVAL, self::COUNT_PERIOD_TYPE_PERIOD),\n\t\t\t\t'default_value' => self::COUNT_PERIOD_TYPE_ALL\n\t\t\t)),\n\t\t\t'COUNT_SIZE' => new Main\\Entity\\IntegerField('COUNT_SIZE', array(\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'COUNT_TYPE' => new Main\\Entity\\EnumField('COUNT_TYPE', array(\n\t\t\t\t'values' => array(self::COUNT_TYPE_SIZE_DAY, self::COUNT_TYPE_SIZE_MONTH, self::COUNT_TYPE_SIZE_YEAR),\n\t\t\t\t'default_value' => self::COUNT_TYPE_SIZE_YEAR\n\t\t\t)),\n\t\t\t'COUNT_FROM' => new Main\\Entity\\DatetimeField('COUNT_FROM', array(\n\t\t\t\t'default_value' => null\n\t\t\t)),\n\t\t\t'COUNT_TO' => new Main\\Entity\\DatetimeField('COUNT_TO', array(\n\t\t\t\t'default_value' => null\n\t\t\t)),\n\t\t\t'ACTION_SIZE' => new Main\\Entity\\IntegerField('ACTION_SIZE', array(\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'ACTION_TYPE' => new Main\\Entity\\EnumField('ACTION_TYPE', array(\n\t\t\t\t'values' => array(self::ACTION_TYPE_SIZE_DAY, self::ACTION_TYPE_SIZE_MONTH, self::ACTION_TYPE_SIZE_YEAR),\n\t\t\t\t'default_value' => self::ACTION_TYPE_SIZE_YEAR\n\t\t\t)),\n\t\t\t'MODIFIED_BY' => new Main\\Entity\\IntegerField('MODIFIED_BY', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_MODIFIED_BY_FIELD')\n\t\t\t)),\n\t\t\t'DATE_CREATE' => new Main\\Entity\\DatetimeField('DATE_CREATE', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_DATE_CREATE_FIELD')\n\t\t\t)),\n\t\t\t'CREATED_BY' => new Main\\Entity\\IntegerField('CREATED_BY', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CREATED_BY_FIELD')\n\t\t\t)),\n\t\t\t'PRIORITY' => new Main\\Entity\\IntegerField('PRIORITY', array(\n\t\t\t\t'default_value' => 1,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_PRIORITY_FIELD')\n\t\t\t)),\n\t\t\t'LAST_DISCOUNT' => new Main\\Entity\\BooleanField('LAST_DISCOUNT', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_LAST_DISCOUNT_FIELD')\n\t\t\t)),\n\t\t\t'VERSION' => new Main\\Entity\\EnumField('VERSION', array(\n\t\t\t\t'values' => array(self::OLD_VERSION, self::ACTUAL_VERSION),\n\t\t\t\t'default_value' => self::ACTUAL_VERSION\n\t\t\t)),\n\t\t\t'NOTES' => new Main\\Entity\\StringField('NOTES', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateNotes'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_NOTES_FIELD')\n\t\t\t)),\n\t\t\t'CONDITIONS' => new Main\\Entity\\TextField('CONDITIONS', array()),\n\t\t\t'CONDITIONS_LIST' => new Main\\Entity\\TextField('CONDITIONS_LIST', array(\n\t\t\t\t'serialized' => true,\n\t\t\t\t'column_name' => 'CONDITIONS',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CONDITIONS_LIST_FIELD')\n\t\t\t)),\n\t\t\t'UNPACK' => new Main\\Entity\\TextField('UNPACK', array()),\n\t\t\t'USE_COUPONS' => new Main\\Entity\\BooleanField('USE_COUPONS', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_USE_COUPONS_FIELD')\n\t\t\t)),\n\t\t\t'SALE_ID' => new Main\\Entity\\IntegerField('SALE_ID'),\n\t\t\t'CREATED_BY_USER' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'CREATED_BY_USER',\n\t\t\t\t'\\Bitrix\\Main\\User',\n\t\t\t\tarray('=this.CREATED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'MODIFIED_BY_USER' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'MODIFIED_BY_USER',\n\t\t\t\t'\\Bitrix\\Main\\User',\n\t\t\t\tarray('=this.MODIFIED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'SALE_DISCOUNT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'SALE_DISCOUNT',\n\t\t\t\t'Bitrix\\Sale\\Internals\\DiscountTable',\n\t\t\t\tarray('=this.SALE_ID' => 'ref.ID')\n\t\t\t)\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => false,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'EVENT' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_EVENT_FIELD'),\n\t\t\t),\n\t\t);\n\t}",
"function tradeoff_map($definition)\n {\n return app(Models\\Resolution\\Map\\Map::class)->setData($definition);\n }",
"public function mapEntity(Entity $entity) {\n\t\t$entity['_loc'] = $this->_table->getUrl($entity);\n\t\t$entity['_lastmod'] = $entity->{$this->_config['lastmod']};\n\t\t$entity['_changefreq'] = $this->_config['changefreq'];\n\t\t$entity['_priority'] = $this->_config['priority'];\n\n\t\treturn $entity;\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('ID', [\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\IntegerField('REGION_ID', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('CODE', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PHRASE'),\n\t\t\tnew Main\\Entity\\ReferenceField('REGION', '\\Bitrix\\DocumentGenerator\\Model\\Region',\n\t\t\t\t['=this.REGION_ID' => 'ref.ID']\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'LID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateLid'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_LID_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_FIELD'),\n ),\n 'BONUS' => array(\n 'data_type' => 'float',\n 'required' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_BONUS_FIELD'),\n ),\n 'USERID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_USERID_FIELD'),\n ),\n 'ACTIVE_FROM' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_FROM_FIELD'),\n ),\n 'ACTIVE_TO' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_TO_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_NAME_FIELD'),\n ),\n 'PROMOCODE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validatePromocode'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_PROMOCODE_FIELD'),\n ),\n 'DOMAINE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomaine'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_DOMAINE_FIELD'),\n ),\n 'URL' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_URL_FIELD'),\n ),\n 'COMMISIA' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_COMMISIA_FIELD'),\n ),\n 'COMMISIAPROMO' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_COMMISIAPROMO_FIELD'),\n ),\n );\n }",
"abstract protected function getMapping();",
"abstract protected function getMapping();",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'SESSION_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_SESSION_ID_FIELD'),\n\t\t\t),\n\t\t\t'CHAT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CHAT_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_MESSAGE_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ORIGIN_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_MESSAGE_ORIGIN_ID_FIELD'),\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_USER_ID_FIELD'),\n\t\t\t),\n\t\t\t'ACTION' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateAction'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_ACTION_FIELD'),\n\t\t\t),\n\t\t\t'CRM_ENTITY_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateCrmEntityType'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CRM_ENTITY_TYPE_FIELD'),\n\t\t\t),\n\t\t\t'CRM_ENTITY_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CRM_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateValue'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_FIELD_NAME_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateValue'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_FIELD_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t'default_value' => array(__CLASS__, 'getCurrentDate'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_ID_FIELD'),\n ),\n 'LID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateLid'),\n 'title' => Loc::getMessage('BASKET_ENTITY_LID_FIELD'),\n ),\n 'DATATIME_INSERT' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_DATATIME_INSERT_FIELD'),\n ),\n 'DATATIME_UPDATE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_DATATIME_UPDATE_FIELD'),\n ),\n 'ORDER_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_ORDER_ID_FIELD'),\n ),\n 'PRODUCT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_PRODUCT_ID_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_NAME_FIELD'),\n ),\n 'PRICE' => array(\n 'data_type' => 'float',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_PRICE_FIELD'),\n ),\n 'PRICEOLD' => array(\n 'data_type' => 'float',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_PRICEOLD_FIELD'),\n ),\n 'OWNER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_OWNER_ID_FIELD'),\n ),\n 'QUANTITY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_QUANTITY_FIELD'),\n ),\n 'XML_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateXmlId'),\n 'title' => Loc::getMessage('BASKET_ENTITY_XML_ID_FIELD'),\n ),\n 'PROPERTY' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('BASKET_ENTITY_PROPERTY_FIELD'),\n 'serialized' => true\n ),\n 'DELAY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_DELAY_FIELD'),\n ),\n 'DETAIL_PAGE_URL' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('BASKET_ENTITY_DETAIL_PAGE_URL_FIELD'),\n ),\n 'PICTURE' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_PICTURE_FIELD'),\n ),\n );\n }",
"protected function getMap()\n {\n if (! $this->map) {\n $this->load();\n }\n\n return $this->map;\n }",
"public static function getMap()\n {\n return self::$map;\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateType'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'PUBLIC_CODE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePublicCode'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_PUBLIC_CODE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'LID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateLid'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_LID_FIELD'),\n\t\t\t),\n\t\t\t'ACTIVE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_ACTIVE_FIELD'),\n\t\t\t),\n\t\t\t'USERID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_USERID_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULTBONUS' => array(\n\t\t\t\t'data_type' => 'float',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_DEFAULTBONUS_FIELD'),\n\t\t\t),\n\t\t\t'BONUSACCOUNTS' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_BONUSACCOUNTS_FIELD'),\n\t\t\t),\n\t\t\t'NUM' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateNum'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_NUM_FIELD'),\n\t\t\t),\n\t\t);\n\t}",
"public function getMapping()\n {\n return $this->mapping;\n }",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'APP_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateType'),\n ),\n 'HANDLER' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateHandler'),\n ),\n 'DATE_ADD' => array(\n 'data_type' => 'datetime',\n 'default_value' => new Main\\Type\\DateTime(),\n ),\n 'AUTHOR_ID' => array(\n 'data_type' => 'integer',\n 'default_value' => 0,\n ),\n 'AUTHOR' => array(\n 'data_type' => '\\Bitrix\\Main\\UserTable',\n 'reference' => array(\n '=this.AUTHOR_ID' => 'ref.ID'\n ),\n 'join_type' => 'LEFT',\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 static function get_map_explorer_definition() {\n return array(\n 'title' => 'Map explorer',\n 'category' => 'Reporting',\n 'description' => 'A map plus grid of data, with various options for exploring the data. This is designed to integrate with the Easy Login feature\\'s '.\n 'preferred taxon groups and locality for the logged in user and is therefore specific to Drupal.'\n );\n }",
"public function getMapping() {\n return $this->mapping;\n }",
"public function getMappings();",
"public function getMappings();",
"function mapper($entity, $entityMap = null)\n {\n return Manager::getMapper($entity, $entityMap);\n }",
"public static function getMap()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'SEARCH_CONTENT_ID' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'primary' => true,\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_ID_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCH_CONTENT_MD5' => array(\r\n\t\t\t\t'data_type' => 'string',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'validation' => array(__CLASS__, 'validateSearchContentMd5'),\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_MD5_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCHABLE_CONTENT' => array(\r\n\t\t\t\t'data_type' => 'text',\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCHABLE_CONTENT_FIELD'),\r\n\t\t\t),\r\n\t\t\t'CONTENT' => array(\r\n\t\t\t\t'data_type' => SearchTable::getEntity(),\r\n\t\t\t\t'reference' => array('=this.SEARCH_CONTENT_ID' => 'ref.ID'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function getMap()\n {\n return $this->map;\n }",
"public function getMap()\n {\n return $this->map;\n }",
"public function getDtdMapping();",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'SOCIAL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateSocial'),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIAL_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_USER_ID_FIELD'),\n ),\n 'SOCIALTEXT' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIALTEXT_FIELD'),\n ),\n );\n }",
"protected function getMap()\n {\n return config('codegenerator.eloquent_type_to_html_type');\n }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'FORUM_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_FORUM_ID'),\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_SITE_ID'),\n\t\t\t),\n\t\t\t'PATH2FORUM_MESSAGE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validatePath'),\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_SITE_ID'),\n\t\t\t),\n\t\t\t'FORUM' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Forum\\Forum',\n\t\t\t\t'reference' => array('=this.FORUM_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'SITE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\Site',\n\t\t\t\t'reference' => array('=this.SITE_ID' => 'ref.LID'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_TYPE' => new EnumField(\n\t\t\t\t'PERSON_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'values' => static::getTypes(),\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_TYPE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_NAME' => new StringField(\n\t\t\t\t'PERSON_NAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonName'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_LASTNAME' => new StringField(\n\t\t\t\t'PERSON_LASTNAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonLastname'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_LASTNAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_MIDDLENAME' => new StringField(\n\t\t\t\t'PERSON_MIDDLENAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonMiddlename'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_MIDDLENAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'EMAIL' => new StringField(\n\t\t\t\t'EMAIL',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateEmail'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_EMAIL_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PHONE' => new StringField(\n\t\t\t\t'PHONE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePhone'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PHONE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'POST_INDEX' => new StringField(\n\t\t\t\t'POST_INDEX',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePostIndex'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_POST_INDEX_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COUNTRY' => new StringField(\n\t\t\t\t'COUNTRY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCountry'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COUNTRY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CITY' => new StringField(\n\t\t\t\t'CITY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCity'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CITY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COMPANY' => new StringField(\n\t\t\t\t'COMPANY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCompany'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COMPANY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'INN' => new StringField(\n\t\t\t\t'INN',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateInn'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_INN_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'KPP' => new StringField(\n\t\t\t\t'KPP',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateKpp'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_KPP_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'ADDRESS' => new StringField(\n\t\t\t\t'ADDRESS',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateAddress'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ADDRESS_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_MODIFY' => new DatetimeField(\n\t\t\t\t'DATE_MODIFY',\n\t\t\t\t[\n\t\t\t\t\t'default' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_MODIFY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_CREATE' => new DatetimeField(\n\t\t\t\t'DATE_CREATE',\n\t\t\t\t[\n\t\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CREATED_BY' => new IntegerField(\n\t\t\t\t'CREATED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CREATED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'MODIFIED_BY' => new IntegerField(\n\t\t\t\t'MODIFIED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_MODIFIED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'SEO_TEXT_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_SEO_TEXT_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'SECTION_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_SECTION_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n (new Reference('SEO_TEXT', SmartseoSeoTextTable::class, Join::on('this.SEO_TEXT_ID', 'ref.ID')))\n ->configureJoinType('left'),\n (new Reference('SECTION', \\Bitrix\\Iblock\\SectionTable::class, Join::on('this.SECTION_ID', 'ref.ID')))\n ->configureJoinType('left'),\n\t\t];\n\t}",
"public function getMap() {\n\t\treturn is_array($this -> _referenceMap) ? $this -> _referenceMap : array();\n\t}",
"function tradeoff_map_node($definition)\n {\n return app(Models\\Resolution\\Map\\MapNode::class)->setData($definition);\n }",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'OBJECT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'TASK_ID' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'ACCESS_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateAccessCode')\n ),\n 'DOMAIN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomain')\n ),\n 'NEGATIVE' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'OBJECT' => array(\n 'data_type' => 'Bitrix\\Disk\\DiskObject',\n 'reference' => array('=this.OBJECT_ID' => 'ref.ID'),\n ),\n 'TASK' => array(\n 'data_type' => 'Bitrix\\Task\\Task',\n 'reference' => array('=this.TASK_ID' => 'ref.ID'),\n ),\n );\n }",
"abstract protected function defineMapping();",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IBLOCK_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateFieldId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_FIELD_ID_FIELD'),\n\t\t\t),\n\t\t\t'IS_REQUIRED' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N','Y'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IS_REQUIRED_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULT_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_DEFAULT_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'IBLOCK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Iblock\\Iblock',\n\t\t\t\t'reference' => array('=this.IBLOCK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}",
"public function getIdentityMap()\n {\n return $this->identityMap;\n }",
"public function getIdentityMap()\n {\n return $this->identityMap;\n }",
"public function entity()\n {\n $data = $this->morphMany('\\ApprovalSequence\\Models\\Entity', 'entity')->get();\n $data = $data->map(function ($item) {\n return $item->entity;\n });\n return $data;\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('LOCATION_ID'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\IntegerField('TYPE'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('VALUE'))\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(null, 255)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('LOCATION', LocationTable::class,\n\t\t\t\tJoin::on('this.LOCATION_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}",
"public function getMappingEntityType();",
"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}",
"public function getIdentityMap()\n {\n if (null == $this->identityMap) {\n $this->setIdentityMap(new IdentityMap());\n }\n return $this->identityMap;\n }",
"public function entityFor(): string;",
"function getEntityMappings()\n {\n return [\n 'Icarus\\QueueMailer' => __DIR__ . '/../Model/'\n ];\n }",
"public function getMapping($sEntityClassName = null)\n {\n return (isset($this->aMappingConfiguration[$sEntityClassName]) === true)\n ? $this->aMappingConfiguration[$sEntityClassName]\n : $this->aMappingConfiguration;\n }",
"public function get_postmeta_mapping() {\n\t\treturn $this->postmeta_mapping;\n\t}",
"public function map()\n {\n return [\n 'full' => ['key' => 'address'],\n 'city' => ['key' => 'city'],\n 'state' => ['key' => 'state'],\n 'zip' => ['key' => 'zip'],\n 'country' => ['key' => 'country'],\n ];\n }",
"abstract protected function buildMap();",
"public function getFilePositionMap(): FilePositionMap\n {\n return $this->file_position_map ?? ($this->file_position_map = new FilePositionMap($this->contents));\n }",
"static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'rev' => array(\n 'type' => 'integer',\n ),\n 'cover' => array(\n 'type' => 'string',\n ),\n 'wiki_id' => array(\n 'type' => 'integer',\n ),\n 'title' => array(\n 'type' => 'string',\n ),\n 'html_cache' => array(\n 'type' => 'string',\n ),\n 'content' => array(\n 'type' => 'string',\n ),\n 'tags' => array(\n 'type' => 'raw',\n ),\n 'comment_tags' => array(\n 'type' => 'raw',\n ),\n 'model' => array(\n 'type' => 'string',\n ),\n 'has_video' => array(\n 'type' => 'integer',\n ),\n 'like_num' => array(\n 'type' => 'integer',\n ),\n 'dislike_num' => array(\n 'type' => 'integer',\n ),\n 'watched_num' => array(\n 'type' => 'integer',\n ),\n 'admin_id' => array(\n 'type' => 'integer',\n ),\n 'do_date' => array(\n 'type' => 'date',\n ),\n 'source' => array(\n 'type' => 'raw',\n ),\n 'tvsou_id' => array(\n 'type' => 'string',\n ),\n 'first_letter' => array(\n 'type' => 'string',\n ),\n 'douban_id' => array(\n 'type' => 'string',\n ),\n 'verify' => array(\n 'type' => 'integer',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'USER_LOG_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_LOG_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'USER_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'COMMENT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_COMMENT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }",
"public function GenerateEntity() {\n return $this->entity->Generate();\n }",
"public static function createFromDOM( \\DOMElement $element, Metadata $metadata ): EntityMap {\n $map = new static();\n\n $x = new \\DOMXPath( $element->ownerDocument );\n $x->registerNamespace( 'edmx', Metadata::NS_EDMX );\n $x->registerNamespace( 'edm', Metadata::NS_EDM );\n\n $map->name = $element->getAttribute( 'Name' );\n $map->key = $x->evaluate( 'string(edm:Key/edm:PropertyRef/@Name)', $element );\n if ( $map->key === '' ) {\n $map->key = null;\n }\n\n $map->isAbstract = $element->hasAttribute( 'Abstract' ) && $element->getAttribute( 'Abstract' ) === 'true';\n $map->baseEntity = $element->hasAttribute( 'BaseType' )? $metadata->stripNamespace( $element->getAttribute( 'BaseType' ) ) : null;\n\n $propertiesList = $x->query( 'edm:Property', $element );\n foreach ( $propertiesList as $propertyElement ) {\n /**\n * @var \\DOMElement $propertyElement\n */\n $propertyName = $propertyElement->getAttribute( 'Name' );\n $concretePropertyName = preg_replace( '~^_(.*)_value$~', '$1', $propertyName );\n\n /*\n * Build the inbound map.\n *\n * As-is properties by default, _(.*)_value => $1\n */\n $map->inboundMap[$propertyName] = $concretePropertyName;\n\n /**\n * Build the field type map. Mapped are the real CRM field names.\n */\n $map->fieldTypes[$concretePropertyName] = $propertyElement->getAttribute( 'Type' );\n\n /*\n * Build the outbound map.\n *\n * As-is properties by default.\n * For _(.*)_value, find corresponding navigation properties.\n * We get a map $1 => [ Type => NavigationPropertyName ]\n */\n $referentialConstraints = $x->query( \"edm:NavigationProperty/edm:ReferentialConstraint[@Property='{$propertyName}']\", $element );\n if ( !$referentialConstraints->length ) {\n $map->outboundMap[$propertyName] = $propertyName;\n continue;\n }\n $map->outboundMap[$concretePropertyName] = [];\n foreach ( $referentialConstraints as $referentialConstraint ) {\n /**\n * @var \\DOMElement $referentialConstraint\n */\n $navigationProperty = $referentialConstraint->parentNode;\n $navType = $metadata->stripNamespace( $navigationProperty->getAttribute( 'Type' ) );\n\n $map->outboundMap[$concretePropertyName][$navType] = $navigationProperty->getAttribute( 'Name' );\n\n /*\n * Resolve possible abstract types into concrete types. E.g. principal => systemuser, team.\n */\n if ( array_key_exists( $navType, $metadata->parentTypesMap ) ) {\n foreach ( $metadata->parentTypesMap[$navType] as $concreteType ) {\n $map->outboundMap[$concretePropertyName][$concreteType] = $navigationProperty->getAttribute( 'Name' );\n }\n }\n }\n }\n\n return $map;\n }",
"protected function classMap()\n {\n $class_map = new ClassMap();\n\n return $class_map->getMap();\n }",
"public function definition()\n {\n return [\n 'entity' => $this->faker->word,\n 'entity_id' => $this->faker->numberBetween(1, 1000),\n 'field' => $this->faker->word,\n 'name' => $this->faker->word,\n 'nameOriginal' => $this->faker->word,\n 'publicPath' => $this->faker->word,\n 'extension' => $this->faker->countryCode,\n 'data' => $this->faker->text,\n ];\n }",
"public static function getMap()\n {\n return [\n (new Fields\\StringField('HASH'))\n ->configurePrimary(true),\n\n new Fields\\IntegerField('RELIABILITY'),\n new Fields\\StringField('ADDRESS'),\n new Fields\\StringField('FULL_NAME'),\n new Fields\\StringField('PHONE'),\n new Fields\\DatetimeField('UPDATED_AT')\n ];\n }",
"public function getEntity( )\n {\n\n return $this->entity;\n\n }",
"public function getMap() : Map {\n // return the private property as-is\n return $this->map;\n }",
"public function getEntities();",
"public function getEntities();",
"public static function getMap()\n {\n $map = [\n 'project' => ProjectResource::class,\n 'issue' => IssueResource::class\n ];\n return $map;\n }",
"public function definition()\n {\n return [\n 'name' => 'Goblin',\n 'damage_stat' => 'str',\n 'xp' => 10,\n 'str' => 1,\n 'dur' => 1,\n 'dex' => 1,\n 'chr' => 1,\n 'int' => 1,\n 'agi' => 1,\n 'focus' => 1,\n 'ac' => 1,\n 'health_range' => '1-8',\n 'attack_range' => '1-6',\n 'gold' => 25,\n 'drop_check' => 6,\n 'max_level' => 0,\n 'game_map_id' => null,\n 'criticality' => 0.03,\n 'accuracy' => 0.01,\n 'dodge' => 0.01,\n 'casting_accuracy' => 0.01,\n ];\n }",
"public function entity ()\n {\n return $this->_entity;\n }",
"public function testBuildMarshalMapBuildEntities(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $translate = $table->behaviors()->get('Translate');\n\n $map = $translate->buildMarshalMap($table->marshaller(), [], []);\n $entity = $table->newEmptyEntity();\n $data = [\n 'en' => [\n 'title' => 'English Title',\n 'body' => 'English Content',\n ],\n 'es' => [\n 'title' => 'Titulo Español',\n 'body' => 'Contenido Español',\n ],\n ];\n $result = $map['_translations']($data, $entity);\n $this->assertEmpty($entity->getErrors(), 'No validation errors.');\n $this->assertCount(2, $result);\n $this->assertArrayHasKey('en', $result);\n $this->assertArrayHasKey('es', $result);\n $this->assertSame('English Title', $result['en']->title);\n $this->assertSame('Titulo Español', $result['es']->title);\n }",
"public function getDefinition() {}",
"public function entity()\r\n {\r\n return $this->entity;\r\n }",
"public function getEntity() {\n return $this->entity;\n }",
"public static function &entityInfo($entity_name)\n\t{\n\t\tif(isset(self::$entity_info[$entity_name])) {\n\t\t\treturn self::$entity_info[$entity_name];\n\t\t}\n\t\t\n\t\t$class = Collection::loadEntity($entity_name);\n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$object = new $class($entity_name);\n\t\t\t\n\t\t\tif(!is_subclass_of($object, Orm::ENTITY_BASE_CLASS) && get_class($object) != Orm::ENTITY_BASE_CLASS) {\n\t\t\t\tthrow new BakedCarrotOrmException(\"Class $class is not a subclass of \" . Orm::ENTITY_BASE_CLASS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class = Orm::ENTITY_BASE_CLASS;\n\t\t\t$object = new $class($entity_name);\n\t\t}\n\t\t\n\t\tself::$entity_info[$entity_name] = $object->info();\n\t\t\n\t\tunset($object);\n\t\t\n\t\treturn self::$entity_info[$entity_name];\n\t}",
"function section__map(){\n return array(\n 'content'=>\"<div style='width:300px; height:300px' style='\n margin-left:auto; margin-right:auto;' id='map'></div>\",\n 'class'=>'main',\n 'label'=>'Map',\n 'order'=>'1'\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'YEAR',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateYear'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_YEAR_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'COPIES_CNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_COPIES_CNT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'PUBLISHINGID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_PUBLISHINGID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew ReferenceField(\n\t\t\t\t'PUBLISHING_ID',\n\t\t\t\t'Listbooks\\PublishingTable',\n\t\t\t\tarray('=this.PUBLISHINGID' => 'ref.ID'),\n\t\t\t)\n\t\t];\n\t}",
"public function getElasticaMapping() {\n\t\t$mapping = new Mapping();\n\n $fields = $this->getElasticaFields();\n\n\t\t$mapping->setProperties($fields);\n\n $callable = get_class($this->owner).'::updateElasticsearchMapping';\n if(is_callable($callable))\n {\n $mapping = call_user_func($callable, $mapping);\n }\n\n\t\treturn $mapping;\n\t}",
"public static function getMap()\n{\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_ID_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('TASKS_ENTITY_TITLE_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'DESCRIPTION_IN_BBCODE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_DESCRIPTION_IN_BBCODE_FIELD'),\n ),\n 'PRIORITY' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validatePriority'),\n 'title' => Loc::getMessage('TASKS_ENTITY_PRIORITY_FIELD'),\n ),\n 'STATUS' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateStatus'),\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_FIELD'),\n ),\n 'RESPONSIBLE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_RESPONSIBLE_ID_FIELD'),\n ),\n 'DATE_START' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_DATE_START_FIELD'),\n ),\n 'DURATION_PLAN' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_PLAN_FIELD'),\n ),\n 'DURATION_FACT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_FACT_FIELD'),\n ),\n 'DURATION_TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateDurationType'),\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_TYPE_FIELD'),\n ),\n 'TIME_ESTIMATE' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_TIME_ESTIMATE_FIELD'),\n ),\n 'REPLICATE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_REPLICATE_FIELD'),\n ),\n 'DEADLINE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_DEADLINE_FIELD'),\n ),\n 'START_DATE_PLAN' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_START_DATE_PLAN_FIELD'),\n ),\n 'END_DATE_PLAN' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_END_DATE_PLAN_FIELD'),\n ),\n 'CREATED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CREATED_BY_FIELD'),\n ),\n 'CREATED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CREATED_DATE_FIELD'),\n ),\n 'CHANGED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CHANGED_BY_FIELD'),\n ),\n 'CHANGED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CHANGED_DATE_FIELD'),\n ),\n 'STATUS_CHANGED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_CHANGED_BY_FIELD'),\n ),\n 'STATUS_CHANGED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_CHANGED_DATE_FIELD'),\n ),\n 'CLOSED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CLOSED_BY_FIELD'),\n ),\n 'CLOSED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CLOSED_DATE_FIELD'),\n ),\n 'GUID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateGuid'),\n 'title' => Loc::getMessage('TASKS_ENTITY_GUID_FIELD'),\n ),\n 'XML_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateXmlId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_XML_ID_FIELD'),\n ),\n 'EXCHANGE_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateExchangeId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_EXCHANGE_ID_FIELD'),\n ),\n 'EXCHANGE_MODIFIED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateExchangeModified'),\n 'title' => Loc::getMessage('TASKS_ENTITY_EXCHANGE_MODIFIED_FIELD'),\n ),\n 'OUTLOOK_VERSION' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_OUTLOOK_VERSION_FIELD'),\n ),\n 'MARK' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateMark'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MARK_FIELD'),\n ),\n 'ALLOW_CHANGE_DEADLINE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ALLOW_CHANGE_DEADLINE_FIELD'),\n ),\n 'ALLOW_TIME_TRACKING' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ALLOW_TIME_TRACKING_FIELD'),\n ),\n 'MATCH_WORK_TIME' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MATCH_WORK_TIME_FIELD'),\n ),\n 'TASK_CONTROL' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_TASK_CONTROL_FIELD'),\n ),\n 'ADD_IN_REPORT' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ADD_IN_REPORT_FIELD'),\n ),\n 'GROUP_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_GROUP_ID_FIELD'),\n ),\n 'PARENT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_PARENT_ID_FIELD'),\n ),\n 'FORUM_TOPIC_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_FORUM_TOPIC_ID_FIELD'),\n ),\n 'MULTITASK' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MULTITASK_FIELD'),\n ),\n 'SITE_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateSiteId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_SITE_ID_FIELD'),\n ),\n 'DECLINE_REASON' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_DECLINE_REASON_FIELD'),\n ),\n 'FORKED_BY_TEMPLATE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_FORKED_BY_TEMPLATE_ID_FIELD'),\n ),\n 'ZOMBIE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ZOMBIE_FIELD'),\n ),\n 'DEADLINE_COUNTED' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_DEADLINE_COUNTED_FIELD'),\n ),\n 'STAGE_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_STAGE_ID_FIELD'),\n ),\n 'SEARCH_INDEX' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_SEARCH_INDEX_FIELD'),\n ),\n );\n}",
"public function getPropertyMappingConfiguration() {}",
"protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'USE' => new Field\\Checkbox('USE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_USE')\n\t\t\t)),\n\t\t\t'CODE' => new Field\\Textarea('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE'),\n\t\t\t\t'help' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE_HELP2'),\n\t\t\t\t'placeholder' => '<script>\n\tvar googletag = googletag || {};\n\tgoogletag.cmd = googletag.cmd || [];\n</script>'\n\t\t\t))\n\t\t);\n\t}",
"static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'channel_code' => array(\n 'type' => 'string',\n ),\n 'time' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }",
"public function getDefinition();",
"public function getDefinition();",
"public function getEntity();",
"public function getEntity();",
"public function getEntity();",
"function tradeoff_map_node_coordinates($definition)\n {\n return app(Models\\Resolution\\Map\\MapNodeCoordinates::class)->setData($definition);\n }",
"public function getEntity()\n\t{\n\t \treturn $this->entity;\n\t}",
"public function getEntity()\r\n {\r\n return $this->entity;\r\n }",
"public function entity() {\n\t\t\treturn $this->entity;\n\t\t}",
"public function definition()\n {\n return [\n 'article_id' => rand(1, 100),\n 'article_cathegory_id' => rand(1, 10)\n ];\n }"
] | [
"0.6637542",
"0.6594023",
"0.648225",
"0.64311457",
"0.64077604",
"0.6392645",
"0.6384917",
"0.6319827",
"0.629275",
"0.6263408",
"0.6239673",
"0.6159177",
"0.61396015",
"0.6062293",
"0.60510415",
"0.59983045",
"0.59882057",
"0.5968825",
"0.59648436",
"0.596274",
"0.596274",
"0.59273875",
"0.58843434",
"0.5866129",
"0.58216625",
"0.58002514",
"0.57921517",
"0.57575846",
"0.5735735",
"0.5691033",
"0.56899387",
"0.56801575",
"0.56779796",
"0.56779796",
"0.5661703",
"0.5661584",
"0.565367",
"0.565367",
"0.5631635",
"0.5623792",
"0.56103766",
"0.559742",
"0.5584529",
"0.5560778",
"0.55528533",
"0.5515704",
"0.54982084",
"0.54512745",
"0.5447925",
"0.5438778",
"0.5438778",
"0.54332536",
"0.54223657",
"0.53965104",
"0.5378425",
"0.53581494",
"0.5351258",
"0.53452766",
"0.53439736",
"0.53414345",
"0.53382355",
"0.5338195",
"0.5332099",
"0.53153455",
"0.5309036",
"0.5301299",
"0.53006434",
"0.52931714",
"0.5280523",
"0.5276008",
"0.5267977",
"0.5265466",
"0.5258486",
"0.525734",
"0.525734",
"0.5240745",
"0.5239523",
"0.52392167",
"0.52205896",
"0.5220305",
"0.5218102",
"0.52163374",
"0.5208456",
"0.52074546",
"0.5195835",
"0.51945716",
"0.518896",
"0.51729476",
"0.5171026",
"0.5164451",
"0.5163174",
"0.5163174",
"0.51510704",
"0.51510704",
"0.51510704",
"0.5141416",
"0.51409626",
"0.51373607",
"0.5135745",
"0.513485"
] | 0.5350025 | 57 |
Create the event listener. | public function __construct()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addRequestCreateListener($listener);",
"public function onEvent();",
"private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}",
"public function listener(Listener $listener);",
"protected function setupListeners()\n {\n //\n }",
"function eventRegister($eventName, EventListener $listener);",
"public function listen($event, $listener);",
"private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }",
"public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;",
"public function setupEventListeners()\r\n\t{\r\n\t\t$blueprints = craft()->courier_blueprints->getAllBlueprints();\r\n\t\t$availableEvents = $this->getAvailableEvents();\r\n\r\n\t\t// Setup event listeners for each blueprint\r\n\t\tforeach ($blueprints as $blueprint) {\r\n\t\t\tif (!$blueprint->eventTriggers) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ($blueprint->eventTriggers as $event) {\r\n\t\t\t\t// Is event currently enabled?\r\n\t\t\t\tif (!isset($availableEvents[$event])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcraft()->on($event, function(Event $event) use ($blueprint) {\r\n\t\t\t\t\tcraft()->courier_blueprints->checkEventConditions($event, $blueprint);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// On the event that an email is sent, create a successful delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailSent', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery'\r\n\t\t]);\r\n\r\n\t\t// On the event that an email fails to send, create a failed delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailFailed', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery',\r\n\t\t]);\r\n\t}",
"protected function registerListeners()\n {\n }",
"public function listen($listener);",
"public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }",
"public function createEvent()\n {\n return new Event();\n }",
"public function attachEvents();",
"public function attachEvents();",
"public function add_event_handler($event, $callback);",
"function addListener(EventListener $listener): void;",
"public static function initListeners() {\n\t\t\n\t\tif(GO::modules()->isInstalled('files') && class_exists('\\GO\\Files\\Controller\\FolderController')){\n\t\t\t$folderController = new \\GO\\Files\\Controller\\FolderController();\n\t\t\t$folderController->addListener('checkmodelfolder', \"GO\\Projects2\\Projects2Module\", \"createParentFolders\");\n\t\t}\n\t\t\n\t\t\\GO\\Base\\Model\\User::model()->addListener('delete', \"GO\\Projects2\\Projects2Module\", \"deleteUser\");\n\n\t}",
"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 }",
"private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }",
"public function testEventCallBackCreate()\n {\n }",
"public function listeners($event);",
"public function addListener($event, $listener, $priority = 0);",
"public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);",
"public function createWatcher();",
"public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}",
"public function init_listeners( $callable ) {\n\t}",
"public static function events();",
"public static function __events () {\n \n }",
"public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}",
"public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );",
"public function addListener($eventName, $listener, $priority = 0);",
"public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}",
"protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }",
"public function __construct()\n {\n// global $callback;\n // $this->eventsArr = $eventsArr;\n $this->callback = function () {\n\n // echo \"event: message\\n\"; // for onmessage listener\n echo \"event: ping\\n\";\n $curDate = date(DATE_ISO8601);\n echo 'data: {\"time\": \"' . $curDate . '\"}';\n echo \"\\n\\n\";\n\n while (($event = ServerSentEvents::popEvent()) != null) {\n $m = json_encode($event->contents);\n echo \"event: $event->event\\n\";\n echo \"data: $m\";\n echo \"\\n\\n\";\n }\n // echo \"event: message\\n\";\n // $curDate = date(DATE_ISO8601);\n // echo 'data: {\"message-time\": \"' . $curDate . '\"}';\n // echo \"\\n\\n\";\n // while(true){\n // if ($index != $this->eventsCounter){\n // ServerSentEvents::sendEvent($this->event, $this->eventBody);\n // $index = $this->eventsCounter;\n // }\n\n // sleep(1);\n // }\n };\n\n $this->setupResponse();\n }",
"private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }",
"public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }",
"public function listen();",
"public function listen() {\n $this->source->listen($this->id);\n }",
"public function addEventListener($event, $callback, $weight = null);",
"public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }",
"public function addListener($name, $listener, $priority = 0);",
"public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }",
"public function on($event, $callback){ }",
"public function appendListenerForEvent(string $eventType, callable $listener): callable;",
"public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }",
"public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }",
"protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }",
"protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }",
"public function listeners($eventName);",
"public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }",
"public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }",
"function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"public function __construct()\n {\n Hook::listen(__CLASS__);\n }",
"function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}",
"public function __construct()\n {\n $this->events = new EventDispatcher();\n }",
"protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }",
"public function onCreate($callback)\n {\n $this->listeners[] = $callback;\n return $this;\n }",
"public function listen($events, $listener = null): void;",
"public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }",
"public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }",
"protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }",
"public static function creating($callback)\n {\n self::listenEvent('creating', $callback);\n }",
"public function attach(string $event, callable $listener, int $priority = 0): void;",
"protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}",
"public function __construct()\n {\n $this->listnerCode = config('settings.listener_code.DeletingVoucherEventListener');\n }",
"protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }",
"function listenTo(string $eventName, callable $callback)\n {\n EventManager::register($eventName, $callback);\n }",
"public function attach($identifier, $event, callable $listener, $priority = 1)\n {\n }",
"public function testRegisiterListenerMethodAddsAListener()\n\t{\n\t\t$instance = new Dispatcher();\n\n\t\t$instance->register_listener('some_event', 'my_function');\n\n\t\t$this->assertSame(array('some_event' => array('my_function')), $instance->listeners);\n\t\t$this->assertAttributeSame(array('some_event' => array('my_function')), 'listeners', $instance);\n\t}",
"public static function create($className, array &$extraTabs, $selectedTabId)\r\n {\r\n $createClass = XenForo_Application::resolveDynamicClass($className, 'listener_th');\r\n if (!$createClass) {\r\n throw new XenForo_Exception(\"Invalid listener '$className' specified\");\r\n }\r\n \r\n return new $createClass($extraTabs, $selectedTabId);\r\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }",
"protected static function loadListeners() {\n\t\t\n\t\t// default var\n\t\t$configDir = Config::getOption(\"configDir\");\n\t\t\n\t\t// make sure the listener data exists\n\t\tif (file_exists($configDir.\"/listeners.json\")) {\n\t\t\t\n\t\t\t// get listener list data\n\t\t\t$listenerList = json_decode(file_get_contents($configDir.\"/listeners.json\"), true);\n\t\t\t\n\t\t\t// get the listener info\n\t\t\tforeach ($listenerList[\"listeners\"] as $listenerName) {\n\t\t\t\t\n\t\t\t\tif ($listenerName[0] != \"_\") {\n\t\t\t\t\t$listener = new $listenerName();\n\t\t\t\t\t$listeners = $listener->getListeners();\n\t\t\t\t\tforeach ($listeners as $event => $eventProps) {\n\t\t\t\t\t\t$eventPriority = (isset($eventProps[\"priority\"])) ? $eventProps[\"priority\"] : 0;\n\t\t\t\t\t\tself::$instance->addListener($event, array($listener, $eventProps[\"callable\"]), $eventPriority);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}",
"function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }",
"public function createEvents()\n {\n //\n\n return 'something';\n }",
"public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }",
"public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }",
"public function setUp()\n {\n if ($this->getOption('listener') === true) \n $this->addListener(new BlameableListener($this->_options));\n }",
"public function addListener()\n {\n $dispatcher = $this->wrapper->getDispatcher();\n $listener = new TestListener();\n\n $dispatcher->addListener(PsKillEvents::PSKILL_PREPARE, [$listener, 'onPrepare']);\n $dispatcher->addListener(PsKillEvents::PSKILL_SUCCESS, [$listener, 'onSuccess']);\n $dispatcher->addListener(PsKillEvents::PSKILL_ERROR, [$listener, 'onError']);\n $dispatcher->addListener(PsKillEvents::PSKILL_BYPASS, [$listener, 'onBypass']);\n\n return $listener;\n }",
"public static function addEventListener($event, $listenerClassName) {\n\t\tif (!is_a($listenerClassName, EventListenerInterface::class, TRUE)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid CMIS Service EventListener: %s must implement %s',\n\t\t\t\t\t$listenerClassName,\n\t\t\t\t\tEventListenerInterface::class\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tstatic::$eventListeners[get_called_class()][$event][] = $listenerClassName;\n\t}",
"public function makeListener($listener, $wildcard = false): Closure;",
"public function createSubscriber();",
"public function addEventListener($events, $eventListener)\n {\n $this->eventListeners[] = array('events' => $events, 'listener' => $eventListener);\n }",
"function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"function __construct()\n\t{\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"IsRecordEditable\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}",
"public function startListening();",
"public function addEntryAddedListener(callable $listener): SubscriptionInterface;",
"function __construct()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }",
"function on_creation() {\n $this->init();\n }",
"public function addEventListener(ListenerInterface $eventListener)\n {\n $this->eventListeners[] = $eventListener;\n }"
] | [
"0.656817",
"0.62854403",
"0.6221445",
"0.61955786",
"0.6161211",
"0.6128959",
"0.6094744",
"0.60562915",
"0.6050664",
"0.60421985",
"0.59603083",
"0.59593344",
"0.5956495",
"0.5945495",
"0.58809704",
"0.58809704",
"0.58737487",
"0.5862446",
"0.5854378",
"0.5845639",
"0.58226717",
"0.58211005",
"0.57911354",
"0.57896113",
"0.57892233",
"0.5770833",
"0.5763587",
"0.5745061",
"0.574112",
"0.5736853",
"0.57193893",
"0.57054496",
"0.56984276",
"0.5683926",
"0.56750184",
"0.5667236",
"0.5660601",
"0.5660215",
"0.56600446",
"0.56461436",
"0.56354463",
"0.56251144",
"0.56155723",
"0.5606013",
"0.5592899",
"0.55778444",
"0.55775005",
"0.5560067",
"0.5545433",
"0.55437547",
"0.554372",
"0.5538046",
"0.55291843",
"0.5526797",
"0.5525863",
"0.55115646",
"0.5499565",
"0.54963106",
"0.5484767",
"0.5482588",
"0.5480688",
"0.5478515",
"0.54749393",
"0.54698896",
"0.5469662",
"0.5467868",
"0.5466349",
"0.54653925",
"0.5451749",
"0.5449486",
"0.54492855",
"0.5442158",
"0.5430327",
"0.5421827",
"0.5389329",
"0.53852844",
"0.5379073",
"0.53776264",
"0.53744966",
"0.5367766",
"0.53600234",
"0.53572863",
"0.5348434",
"0.5342003",
"0.5340989",
"0.5333021",
"0.5332584",
"0.53287435",
"0.53265256",
"0.5325384",
"0.5307595",
"0.52982867",
"0.5298005",
"0.529668",
"0.52889353",
"0.52795464",
"0.5275319",
"0.527017",
"0.52669907",
"0.52669126",
"0.52630085"
] | 0.0 | -1 |
Handle User Profile Creation Event. | public function handle($table)
{
// Add additional user profile base on project here
$table->string('idnumber');
$table->text('photo');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function create_user_handler($event)\n {\n //get the event data.\n $event_data = $event->get_data();\n\n try {\n //user data\n $userid=false;\n if(array_key_exists('relateduserid', $event_data)){\n $userid = $event_data['relateduserid'];\n $event_data['userid'] = $userid;\n }elseif(array_key_exists('userid', $event_data)){\n $userid = $event_data['userid'];\n }\n if ($userid) {\n $exists = usermanager::user_exists($userid);\n if(!$exists){\n $success = usermanager::create_user(0,$userid,\"\",0);\n }\n }\n\n } catch (\\Exception $error) {\n debugging(\"fetching user error for authplugin request failed with error: \" . $error->getMessage(), DEBUG_ALL);\n }\n }",
"public function actionCreate()\n {\n $user = new User(['scenario' => 'create']);\n $profile = new Profile();\n\n if ($user->load(Yii::$app->request->post()) && $profile->load(Yii::$app->request->post())) {\n if ($user->validate() && $profile->validate()) {\n //$user->populateRelation('profile', $profile);\n if ($user->save(false)) {\n $user->link('profile', $profile);\n Yii::$app->session->setFlash('success', Module::t('users', 'User has been successfully created.'));\n return $this->redirect(['update', 'id' => $user->id]);\n } else {\n Yii::$app->session->setFlash('danger', Module::t('users', 'User has not been saved. Please try again!'));\n return $this->refresh();\n }\n }\n }\n\n return $this->render('create', [\n 'user' => $user,\n 'profile' => $profile\n ]);\n }",
"public function actionProfilecreate()\n {\n $model = new Profile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('profilecreate', [\n 'model' => $model,\n ]);\n }\n }",
"public function redirect_user_to_profile_creation( $puid ) {\n\n\t\t// Get current url w/ query strings which will be passed back\n\t\t$curr_url = remove_query_arg( 'code' );\n\n\t\t// Ensure it's a full url\n\t\tif ( isset( $_SERVER['HTTP_HOST'] ) && false === strpos( $curr_url, $_SERVER['HTTP_HOST'] ) ) {\n\t\t\t$curr_url = site_url( $curr_url, is_ssl() ? 'https' : 'http' );\n\t\t}\n\n\t\t// Get the logout url which wil be used if they cancel the profile creation\n\t\t$logout_url = str_replace( '&', '&', wp_logout_url( site_url() ) . '&profile-cancel=1' );\n\n\t\t$args = array(\n\t\t\t'referrer' => urlencode( $curr_url ),\n\t\t\t'cancelUrl' => urlencode( $logout_url ),\n\t\t);\n\n\t\t// This is the entire url for the profile creation process and redirection\n\t\t$url = add_query_arg( $args, $this->aad_settings( 'create_profile_endpoint' ) );\n\n\t\t// Send them there\n\t\twp_redirect( esc_url_raw( $url ) );\n\t\texit;\n\t}",
"public function createuserprofileAction(Request $request)\n {\n\t\tif (!$this->get('security.context')->isGranted('IS_AUTHENTICATED_FULLY')) {\n\t\t\t throw new AccessDeniedException();\n\t\t}\n\t\t// get loged in user Id\t\n\t\t$userId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t\t\t\n\t\t$em = $this->getDoctrine()->getManager();\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\t$entity = $em->getRepository('WebsolutioDemoBundle:UserProfile')->findOneByUser($userId);\n\t\t}\n \n\t\tif (!$entity) {\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$entity = new UserProfile('UTF-8');\n\t\t\t$entity->setUser($this->getDoctrine()->getManager()->getReference('WebsolutioDemoBundle:User',$userId));\n\t\t\t\t\t\t\t\n\t\t\t$em->persist($entity);\n\t\t\t$em->flush();\n\t\t\t$em->clear();\n\t\t}\n\t\t\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_show', array('id' => $userId)));\n\t\t}\t\n\t}",
"public function onProfileSave(AuthProfileEvent $event)\n {\n\t\t$account = $event->getAccount();\n\t\t\n\t\t$to = \"[email protected], [email protected], [email protected]\";\n\t\t$subject = \"New member registration\";\n\n\t\t$message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t\t<title>New member registration</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<table style='border-collapse: collapse;'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style='border: 1px solid #aaa; background-color: #f2f2f2'>Name</th>\n\t\t\t\t\t<th style='border: 1px solid #aaa; background-color: #f2f2f2'>Email</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style='border: 1px solid #aaa'>\".$account->getDisplayname().\"</td>\n\t\t\t\t\t<td style='border: 1px solid #aaa'>\".$account->getEmail().\"</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\";\n\n\t\t// Always set content-type when sending HTML email\n\t\t$headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t\t$headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\n\t\t// More headers\n\t\t$headers .= 'From: <cawee.org>' . \"\\r\\n\";\n\t\t//$headers .= 'Cc: [email protected]' . \"\\r\\n\";\n\n\t\t$result = mail($to,$subject,$message,$headers);\n }",
"public function creating(Profile $profile)\n {\n $profile->avatar = 'https://www.gravatar.com/avatar/'.md5($profile->gravatar_email);\n }",
"public function create()\n\t{\n\t\t//\n\t\t$user = Auth::user();\n\t\tif($user->profiles()->first()){\n\t\treturn Redirect::to('/profiles/');\n\t\t}else{\n\t\treturn View::make('profiles.create');\t\n\t\t}\n\t\t\n\t}",
"public function createProfile(array $data);",
"public function create()\n {\n $user = $this->userProfileService->findUser()->getUser();\n \n return redirect()->route('user_profile.edit', $user->id);\n }",
"public function createAction()\n {\n $profileForm = new Application_Form_Profile(['id' => 'create-profile']);\n $this->view->profileForm = $profileForm;\n\n /**\n * GET handler request\n */\n $requestShowProfileFormOnly = !$this->getRequest()->isPost();\n if ($requestShowProfileFormOnly) {\n return; //show profile form now\n }\n\n /**\n * POST handler request\n */\n $invalidProfileSubmited = !$profileForm->isValid($this->getRequest()->getPost());\n if ($invalidProfileSubmited) {\n return; //show profile form with errors messages\n }\n\n /**\n * Persit valid profile after filtered\n */\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileModelFactory = new Application_Factory_ProfileModel();\n\n $profileEntity = $profileModelFactory->createService($profileForm->getValues());\n $profileRepo = $profileRepoFactory->createService();\n $profileRepo->save($profileEntity);\n\n return $this->_helper->redirector('index', 'profile', 'default');\n }",
"public function createProfile($profile){\n $this->createProfileFiles($profile);\n $this->createProfileScript($profile);\n $this->createConfigIni($profile);\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Profile;\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['Profile']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Profile'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->user_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 handleCreateUserEvent(\\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser $frontendUser, \\RKW\\RkwRegistration\\Domain\\Model\\Registration $registration, $signalInformation)\n {\n\n // simply do nothing! Service is actually not needed\n\n }",
"public function actionCreate()\n {\n $model = new User();\n\n $profile = new UserProfile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $userProfile = Yii::$app->request->post('UserProfile');\n $profile->user_id = $model->id;\n $profile->phone = $userProfile['phone'];\n $profile->firstname = $userProfile['firstname'];\n $profile->lastname = $userProfile['lastname'];\n $profile->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'profile' => $profile,\n ]);\n }",
"public function created(User $user)\n {\n Userprofile::create([\n 'users_id' => $user->id,\n 'address' => 'Your Address',\n 'phone_number' => 'Your Number',\n 'city' => 'Your City',\n 'country' => 'Your Country',\n 'body' => 'Something About Yourself',\n 'user_img' => 'Your image here'\n ]);\n }",
"public function __invoke(CreateProfileRequest $request)\n {\n }",
"public function store(Request $request)\n {\n\n $this->validator($request->all())->validate();\n\n event(new Registered($user = $this->created($request->all())));\n $userId = $user->id;\n $date = [\n 'user_id' => $userId,\n 'image' =>'profile.jpg',\n 'about_text' =>''\n ];\n $profile = Profile::create($date);\n\n $action_by = Auth::user()->name;\n $action_for = $request->name;\n $action = 'Create user';\n\n Log::create([\n 'action_by' => $action_by,\n 'action_for' => $action_for,\n 'action' => $action,\n ]);\n\n\n Session::flash('message', 'You successfully create a user');\n return redirect()->route('agent.users.index');\n }",
"public function create()\n\t{\n\t\treturn view('admin.profiles.create');\n\t}",
"public function postPersist(LifecycleEventArgs $event)\n {\n if (!$this->isEnabled()) {\n return;\n }\n\n $entity = $event->getEntity();\n\n if (!$entity instanceof Registration) {\n return;\n }\n\n $this->container->get(RegistrationService::class)->createUser($entity);\n }",
"public function createUser($name, $pass, $profile, array $extra = []);",
"public function handleProfile()\n\t{\n\t\t$profile = $this->profile;\n\t\t$data = Input::only(array('email', 'location', 'website', 'quote'));\n\n\t\tif($profile->program->type->name == 'vmbo')\n\t\t{\n\t\t\t// if(Input::has('quote'))\n\t\t\t// {\n\t\t\t// \t$data['quote'] = Input::get('quote');\n\t\t\t// }\n\t\t\tif(Input::has('next_program'))\n\t\t\t{\n\t\t\t\t$data['next_program'] = Input::get('next_program');\n\t\t\t}\n\t\t}\n\n\t\t$profileData = $data;\n\t\t$socialMediaData = Input::get('social_media');\n\n\t\t$this->profileService->updateProfile($profile, $profileData);\n\t\t$this->profileService->syncSocialMedia($profile, $socialMediaData);\n\n\t\treturn Redirect::action('datacollector.controller@index');\n\t}",
"public function store(ProfileCreateRequest $request)\n {\n $profile = new Profile([\n 'nombre' => $request['nombre'],\n 'apP' => $request['apP'],\n 'apM' => $request['apM'],\n 'telefono' => $request['telefono'],\n 'fechaNac' => $request['telefono'],\n 'user_id' =>$request['id'],\n ]);\n $profile->save();\n $user = User::find($request['id']);\n\n Session::flash('message','Datos ingresados Correctamente');\n return view('profileUsr.profile',compact('user','profile'));\n\n }",
"public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $input['password'] = bcrypt('password');\n $input['api_token'] = str_random(60);\n\n $profile = $input['profile'];\n $profile['driver_id'] = strtoupper(uniqid());\n unset($input['profile']);\n\n if ($request->hasFile('file')) {\n $file = $request->file('file');\n $path = $file->store('documents');\n\n $profile['document_file'] = $path;\n }\n\n\n if ($request->hasFile('picture')) {\n $file = $request->file('picture');\n $path = $file->store('documents');\n\n $profile['profile_picture'] = $path;\n }\n unset($input['file']);\n unset($input['picture']);\n\n $user = User::create($input);\n $user->profile()->create($profile);\n\n return redirect('/users');\n }",
"public function onProfileSave(ProfileEvent $event)\n {\n $this->historyFacade->save(\n $event->{ProfileEvent::ENTITY},\n self::SUCCESS_SAVE_TITLE\n );\n return; \n }",
"public function create()\n {\n date_default_timezone_set('Asia/Kuala_Lumpur');\n $profiles = new Profiles;\n $profiles->profile_id = $request->input('data.profile_id');\n $profiles->profile_name = $request->input('data.profile_name');\n $profiles->profile_email = $request->input('data.profile_email');\n $profiles->save();\n return 'Data Created';\n }",
"function save_profile() {\n global $wpdb;\n\n // Get the current subscriber, fail if not found\n $user = $this->get_user_from_request(true);\n\n // Conatains the cleaned up user data to be saved\n $data = array();\n $data['id'] = $user->id;\n\n $options_profile = get_option('newsletter_profile', array());\n $options_main = get_option('newsletter_main', array());\n\n // Not an elegant interaction between modules but...\n $subscription_module = NewsletterSubscription::instance();\n\n if (!$this->is_email($_REQUEST['ne'])) {\n $user->alert = $this->options['profile_error'];\n return $user;\n }\n\n $email = $this->normalize_email(stripslashes($_REQUEST['ne']));\n $email_changed = ($email != $user->email);\n\n // If the email has been changed, check if it is available\n if ($email_changed) {\n $tmp = $this->get_user($email);\n if ($tmp != null && $tmp->id != $user->id) {\n // TODO: Move the label on profile setting panel\n $user->alert = $this->options['error'];\n return $user;\n }\n $data['status'] = Newsletter::STATUS_NOT_CONFIRMED;\n }\n\n // General data\n $data['email'] = $email;\n if (isset($_REQUEST['nn'])) {\n $data['name'] = $this->normalize_name(stripslashes($_REQUEST['nn']));\n if ($subscription_module->is_spam_text($data['name'])) {\n die();\n }\n }\n if (isset($_REQUEST['ns'])) {\n $data['surname'] = $this->normalize_name(stripslashes($_REQUEST['ns']));\n if ($subscription_module->is_spam_text($data['surname'])) {\n die();\n }\n }\n if ($options_profile['sex_status'] >= 1) {\n $data['sex'] = $_REQUEST['nx'][0];\n // Wrong data injection check\n if ($data['sex'] != 'm' && $data['sex'] != 'f' && $data['sex'] != 'n') {\n die('Wrong sex field');\n }\n }\n\n // Lists. If not list is present or there is no list to choose or all are unchecked.\n $nl = array();\n if (isset($_REQUEST['nl']) && is_array($_REQUEST['nl'])) {\n $nl = $_REQUEST['nl'];\n }\n\n // Every possible list shown in the profile must be processed\n $lists = $this->get_lists_for_profile();\n foreach ($lists as $list) {\n $field_name = 'list_' . $list->id;\n $data[$field_name] = in_array($list->id, $nl) ? 1 : 0;\n }\n\n // Profile\n for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {\n // Private fields cannot be changed by the subscriber\n if ($options_profile['profile_' . $i . '_status'] == 0) {\n continue;\n }\n $data['profile_' . $i] = stripslashes($_REQUEST['np' . $i]);\n }\n\n\n // Feed by Mail service is saved here\n $data = apply_filters('newsletter_profile_save', $data);\n\n if ($user->status == TNP_User::STATUS_NOT_CONFIRMED) {\n $data['status'] = TNP_User::STATUS_CONFIRMED;\n }\n\n $user = $this->save_user($data);\n $this->add_user_log($user, 'profile');\n\n // Send the activation again only if we use double opt-in, otherwise it has no meaning\n // TODO: Maybe define a specific email for that and not the activation email\n if ($email_changed && $subscription_module->is_double_optin()) {\n $subscription_module->send_activation_email($user);\n // TODO: Move this option on new profile configuration panel\n $alert = $this->options['profile_email_changed'];\n }\n\n if (isset($alert)) {\n $user->alert = $alert;\n } else {\n // TODO: Move this label on profile settings panel\n $user->alert = $this->options['saved'];\n }\n return $user;\n }",
"public function creating(User $user)\n {\n if(!isset($user->profile_image)) {\n $user->profile_image = config('images.default_user_avatar');\n }\n }",
"public static function user_created(core\\event\\user_created $event)\n {\n\n global $CFG;\n $user_data = user_get_users_by_id(array($event->relateduserid));\n\n // User password should be encrypted. Using Openssl for it.\n // We will use token as the key as it is present on both sites.\n // Open SSL encryption initialization.\n $enc_method = 'AES-128-CTR';\n\n\n $api_handler = api_handler_instance();\n if (isset($CFG->eb_connection_settings)) {\n $sites = unserialize($CFG->eb_connection_settings);\n $synch_conditions = unserialize($CFG->eb_synch_settings);\n\n foreach ($sites as $key => $value) {\n if ($synch_conditions[$value[\"wp_name\"]][\"user_creation\"] && $value['wp_token']) {\n $password = '';\n $enc_iv = '';\n // If new password in not empty\n if (isset($_POST['newpassword']) && $_POST['newpassword']) {\n $enc_key = openssl_digest($value[\"wp_token\"], 'SHA256', true);\n $enc_iv = substr(hash('sha256', $value[\"wp_token\"]), 0, 16);\n // $crypttext = openssl_encrypt($_POST['newpassword'], $enc_method, $enc_key, 0, $enc_iv) . \"::\" . bin2hex($enc_iv);\n $password = openssl_encrypt($_POST['newpassword'], $enc_method, $enc_key, 0, $enc_iv);\n }\n\n $request_data = array(\n 'action' => 'user_creation',\n 'user_id' => $event->relateduserid,\n 'user_name' => $user_data[$event->relateduserid]->username,\n 'first_name' => $user_data[$event->relateduserid]->firstname,\n 'last_name' => $user_data[$event->relateduserid]->lastname,\n 'email' => $user_data[$event->relateduserid]->email,\n 'password' => $password,\n 'enc_iv' => $enc_iv,\n 'secret_key' => $value['wp_token'], // Adding Token for verification in WP from Moodle.\n );\n\n $api_handler->connect_to_wp_with_args($value[\"wp_url\"], $request_data);\n }\n }\n }\n\n }",
"public function actionCreate()\n {\n $model = new UserProfile();\n\n $model->user_id = Yii::$app->user->identity->id;\n\n\n $POST_VARIABLE = Yii::$app->request->post('Place');\n echo $POST_VARIABLE['first_name'];\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } elseif ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash(\"success\", Yii::t('app', 'Profile successfully created!'));\n return $this->redirect(['view']);\n\n } else {\n// echo $model->user_id;\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }",
"public function handleProviderCallback($social)\n {\n $userInfo = Socialite::driver($social)->stateless()->user();\n\n\n //check if user exists and log user in\n $user = User::where('email',$userInfo->email)->first();\n if ($user){\n if (Auth::loginUsingId($user->id)){\n return redirect()->route('profiles.profile.create');\n }\n }\n //else sign the user up\n $userSignUp = User::create([\n 'name'=>$userInfo->name,\n 'email'=>$userInfo->email,\n 'avatar'=>$userInfo->avatar,\n 'provider'=>$social,\n 'is_status'=>'3',\n 'verified'=>1,\n 'provider_id'=>$userInfo->id,\n ]);\n //finally log the user in\n if ($userSignUp){\n if (Auth::loginUsingId($userSignUp->id)){\n return redirect()->route('profiles.profile.create');\n }\n }\n }",
"public function create()\n {\n /** get the id of user */\n $id = Auth::user()->id;\n // dd($id);\n\n /** get the collection of user details */\n $profiles = User::find($id)->user_details;\n // dd($profiles);\n\n return view('shared.form_profiles')->with('id',$id);\n }",
"public function create()\n\t{\n\t\t$profile = Profile::first();\n\t\treturn view('admin.profile.create', compact('profile'));\n\t}",
"public function create()\n {\n $user = Auth::user();\n $roleName = $user->usersRoles->first()->role->name;\n $user_id = $this->usersRepository->findWhere(['id' => $user->id])->first();\n\n return view('profiles.create')->with('user_id',$user_id)->with('roleName',$roleName);\n }",
"public function created(User $user)\n {\n\n // Assign a profile Image\n if($user->sex == 'male'){\n $user->avatar = 'blue.png';\n }\n elseif ($user->sex == 'female') {\n $user->avatar = 'pink.png';\n }\n else{\n $user->avatar = 'gray.png';\n }\n\n // Assign Name\n if($user->lastname !== null){\n $user->name = $user->firstname . ' ' . $user->lastname;\n }else{\n $user->name = $user->firstname;\n }\n\n /*Create Default Settings*/\n $user->settings()->create([]);\n \n\n $user->save();\n }",
"public function store(StoreProfile $request)\n {\n //dd($request->all());\n $name = 'images/no-thumbnail.jpeg';\n $path = 'images/no-thumbnail.jpeg';\n if($request->has('thumbnail')){\n $extension = \".\".$request->thumbnail->getClientOriginalExtension();\n $name = round(1111,9999999).'_'.time();\n $name = $name.$extension;\n $path = $request->thumbnail->storeAs('profiles',$name,'public');\n }\n $user = User::create([\n 'name'=>$request->name,\n 'email'=>$request->email,\n 'password'=> bcrypt($request->password),\n 'status'=>$request->status,\n ]);\n\n if($user){\n $profile = Profile::create([\n 'user_id' => $user->id,\n 'name' => $request->email,\n 'slug' => $request->slug,\n 'phone' => $request->phone,\n 'address' => $request->address,\n 'thumbnail' => 'profiles/'.$name,\n ]);\n }\n if ($user && $profile) {\n return Redirect::to('admin/profile')\n ->with('success', 'User Created Successfully');\n } else {\n return back()->with('message', 'Error Inserting new User');\n }\n }",
"public function store(StoreUserRequest $request)\n {\n // echo '<pre>'; // user profile\n // print_r($request->all()); exit();\n if ($request->hasFile('profile_pic')) {\n $file = $request->file('profile_pic');\n $image = $file->getClientOriginalExtension();\n $newfile = time().'_'.rand().'_'.'user-profile'.'.'.$image;\n $fmove = $file->move(public_path().'/user/image/',$newfile);\n $user_pic = $newfile;\n }\n\n $user = User::create([\n 'role_id' => 2,\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'avatar_type' => 'profile-image',\n 'avatar_location' =>isset($user_pic)?$user_pic:'',\n 'password' => $request->password,\n 'active' => isset($request->active) && $request->active === '1',\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n 'confirmed' => isset($request->confirmed) && $request->confirmed === '1',\n ]);\n //Send confirmation email if requested and account approval is off\n if ($user->confirmed === false && ! config('access.users.requires_approval')) {\n $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n }\n if (!empty($user->id)) {\n //echo $user->id; exit();\n $userProfile = new UserProfile; \n $userProfile->user_id = $user->id; \n $userProfile->gender = $request->gender; \n $userProfile->date_of_birth = $request->date_of_birth;\n $userProfile->interests = isset($request->interests)? implode(\",\",$request->interests):''; \n $userProfile->contact_numbers = $request->contact_numbers; \n $userProfile->country = $request->country; \n $userProfile->state = $request->state; \n $userProfile->city = $request->city; \n $userProfile->address = $request->address; \n $userProfile->interested_in = $request->interested_in;\n $userProfile->summery = $request->summery;\n $userProfile->profile_pic = isset($user_pic)?$user_pic:'';\n $userProfile->save(); \n } \n return redirect()->route('admin.user')->withFlashSuccess(__('alerts.backend.users.created'));\n }",
"public function store(Request $request)\n {\n $path = 'images/profile/no-thumbnail.jpeg';\n if ($request->has('thumbnail')) {\n $extension = \".\" . $request->thumbnail->getClientOriginalExtension();\n $name = basename($request->thumbnail->getClientOriginalName(), $extension) . time();\n $name = $name . $extension;\n $path = $request->thumbnail->storeAs('images/profile', $name, 'public');\n }\n $user = User::create([\n 'email' => $request->email,\n 'password' => bcrypt($request->password),\n 'status' => $request->status,\n ]);\n if ($user) {\n $profile = Profile::create([\n 'user_id' => $user->id,\n 'name' => $request->name,\n 'thumbnail' => $path,\n 'country_id' => $request->country_id,\n 'state_id' => $request->state_id,\n 'city_id' => $request->city_id,\n 'phone' => $request->phone,\n 'slug' => $request->slug,\n ]);\n }\n if ($user && $profile) {\n return redirect(route('admin.profile.index'))->with('message', 'User Created Successfully');\n } else {\n return back()->with('message', 'Error Inserting new User');\n }\n }",
"protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }",
"public function create()\n {\n $user = Auth::user();\n return view('admin.profile.create', compact('user'));\n }",
"function createProfile() {\n if($_SERVER['REQUEST_METHOD'] !== 'POST') {\n return null;\n }\n\n try {\n $userId = getUserId();\n\n $profileId = $_POST['profileId'];\n $about = $_POST['about'];\n $about = escapeString($about);\n\n if(is_numeric($profileId)) {\n $query = \"UPDATE profile SET user_id=$userId, about_me='$about'\n WHERE id = $profileId\";\n } else {\n $query = \"INSERT INTO profile(user_id, about_me) VALUES ($userId, '$about')\";\n }\n\n $conn = getConnection();\n $result = $conn->query($query);\n\n if(!$result) {\n throw new Exception(\"Save profile failed\");\n }\n\n if(!is_numeric($profileId)) {\n $profileId = $conn->insert_id;\n }\n\n uploadImage($profileId);\n\n header('Location: index.php');\n } catch(Exception $e) {\n return $e->getMessage();\n }\n}",
"public function createUser($profilePic){\r\n\t\t//get the signUp form data in the form of key = value (form name = form input)\r\n\t\t$post = $this -> sanitize();\r\n\t\textract($post);\r\n\t\t//encrypt password\r\n\t\t$password = sha1($password);\r\n\t\t//query\r\n\t\t$query = \"INSERT INTO users VALUES(NULL,'$username','$password','$email', '$profilePic', 'user')\";\r\n\t\t$data = $this -> updateDeleteQuery($query);\r\n\t\tif($data){\r\n\t\t\t//run query to get the userID of user just created\r\n\t\t\t$userQuery = \"SELECT userID from users WHERE username='$username'\";\r\n\t\t\t//store result in variable, should return only one string so it wont be an array\r\n\t\t\t$user = $this -> singleSelectQuery($userQuery); \r\n\t\t\t$userID = $user['userID'];\r\n\t\t\t$rankQuery = \"INSERT INTO rank VALUES(NULL, '$userID', 1, 1, 1, 1)\";\r\n\t\t\t$result = $this -> updateDeleteQuery($rankQuery);\r\n\t\t\treturn $result;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static function userCreateSuccess(){\n self::$IntelligenceService->addToIntelligenceStack(self::USER_INTELLIGENCE_CREATE_KEY, self::USER_INTELLIGENCE_SUCCESS);\n }",
"static function createProfile($user_id, $name)\n\t{\n\t\tif(is_null($user_id) || is_null($name))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$data = array(\"user_id\" => $user_id, \"name\" => $name);\n\t\t$statement = \"INSERT INTO PROFILE (owner_id, name) VALUES (:user_id, :name)\";\n\n\t\t$row = Database::query($statement, $data);\n\n\t\tif($row != '')\n\t\t\treturn $row['lastInsertId'];\n\t\telse\n\t\t\treturn false;\n\t}",
"public function onNewUserCreated($name)\n {\n $this->_logger->debug(\"New user: $name\");\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if (isset($_POST['User']))\n {\n\n $transaction = Yii::app()->db->beginTransaction();\n\n try\n {\n $model->setAttributes($_POST['User']);\n $model->salt = Registration::model()->generateSalt();\n $model->password = Registration::model()->hashPassword($model->password, $model->salt);\n $model->registrationIp = Yii::app()->request->userHostAddress;\n\n if ($model->save())\n {\n $profile = new Profile();\n $profile->user_id = $model->id;\n if ($profile->save())\n {\n $transaction->commit();\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Новый пользователь добавлен!'));\n $this->redirect(array('view', 'id' => $model->id));\n }\n else\n {\n throw new CDbException(Yii::t('user', 'При создании пользователя произошла ошибка! Подробности в журнале исполнения.'));\n }\n }\n\n }\n catch (CDbException $e)\n {\n $transaction->rollback();\n Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, UserModule::$logCategory);\n Yii::app()->user->setFlash(YFlashMessages::ERROR_MESSAGE, $e->getMessage());\n $this->redirect(array('create'));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function create()\n {\n //\n return View('profile.createprofile');\n }",
"public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }",
"public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }",
"public function created(EntryInterface $entry)\n {\n event(new UserWasCreated($entry));\n\n parent::created($entry);\n }",
"private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }",
"public function createUserAction() {\n $this->authService->createUser();\n die();\n }",
"public function createProfile()\n {\n if (self::$hook_statistics) {\n $profile = '';\n $profile .= 'Page' . ': ' . wa()->getConfig()->getCurrentUrl() . \"\\r\\n\";\n $profile .= \"----------------\\r\\n\";\n\n foreach (self::$hook_statistics as $hook_name => $hook) {\n $profile .= \"\\r\\n\";\n\n // Общие данные по хуку\n $profile .= $this->addLogCount('Hook', $hook_name, $hook['count'], $hook['time']);\n\n // Список точек наблюдения\n if (!empty($hook['points'])) {\n $profile .= \"Points:\\r\\n\";\n $profile .= $this->addLogPoints($hook) . \"\\r\\n\";\n }\n\n // Данные о вызовах\n if (!empty($hook['caller'])) {\n ksort($hook['caller']);\n $profile .= \"Callers:\\r\\n\";\n foreach ($hook['caller'] as $caller_id => $caller) {\n $profile .= self::TAB;\n $caller_name = $this->getCallerName($caller);\n $profile .= $this->addLogCount($caller_name['title'], $caller_name['name'], $caller['count'], $caller['time']);\n\n // Методы\n if (!empty($caller['calls'])) {\n $profile .= $this->addLogCallerCalls($caller);\n }\n\n // Точки\n if (!empty($hook['points'])) {\n $profile .= $this->addLogPoints($caller, self::TAB);\n }\n }\n }\n }\n\n waLog::log($profile, self::PROFILE_FILE);\n }\n }",
"public function store()\n\t{\n\n\t\t// get current user\n\t\t$user = Auth::user();\n\n\t\t// get data\n\t\t$input = Input::get();\n\n\t\t// create record\n\t\t$profile = new Profile;\n\t\t$profile->business = $input['business'];\n\t\t$profile->name = $input['name'];\n\t\t$profile->last = $input['last'];\n\t\t$profile->contact = $input['contact'];\n\t\t$profile->address = $input['address'];\n\t\t$profile->address2 = $input['address2'];\n\t\t$profile->city = $input['city'];\n\t\t$profile->state = $input['state'];\n\t\t$profile->zip = $input['zip'];\n\t\t$profile->country = $input['country'];\n\t\t$profile->save();\n\n\t\t// Link it to user\n\t\t$user->profiles()->attach($profile->id);\n\n\t\treturn Redirect::back();\n\t\t\n\t}",
"public function store(Request $request)\n {\n if (Auth::check()) {\n $profile = new Userprofile($request->all());\n Auth::user()->userprofile()->save($profile);\n //$profile->save();\n return 'success';\n // The user is logged in...\n // Maybe add a Redirect::to()\n } else {\n return 'failed';\n // User is not logged in...\n }\n }",
"abstract protected function getUserProfile();",
"public function create()\n {\n return view('admin.profiles.create');\n }",
"public function store(CreateUserRequest $request)\n {\n\n // Try creating new user\n $newUser = User::createUserWithProfile($request->all());\n\n // Event new registered user\n event(new Registered($newUser));\n // Send user registered notification\n $newUser->sendUserRegisteredNotification();\n\n // Check if user need to verify email if not app will try to login the new user\n if (config('access.users.verify_email')) {\n // Send Email for Verification\n $newUser->sendEmailVerificationNotification();\n }\n\n return $newUser->sendResponse();\n }",
"public function create_profile(Request $request)\n {\n //validate incoming request \n $this->validate($request, [\n 'first_name' => 'required|string',\n 'last_name' => 'required|string',\n 'phone_number'=>'required',\n 'date_of_birth'=>'required'\n \n ]);\n\n try \n {\n $profile = new User_profile();\n \n $profile->user_id = $request->input('user_id');\n $profile->first_name = $request->input('first_name');\n $profile->last_name = $request->input('last_name');\n $profile->phone_number = $request->input('phone_number');\n $profile->date_of_birth = $request->input('date_of_birth');\n\n $profile->save();\n\n return response()->json( [\n 'entity' => 'profile', \n 'action' => 'create', \n 'result' => 'success'\n ], 201);\n\n } \n catch (\\Exception $e) \n {\n return response()->json( [\n 'entity' => 'profile', \n 'action' => 'create', \n 'result' => 'failed'\n ], 409);\n }\n }",
"public function createUser(){\n \n $password = DbrLib::rand_string(8);\n \n /**\n * create username \n */\n $firstName = strtolower(self::translitStringToAscii($this->pprs_first_name));\n $secondName = strtolower(self::translitStringToAscii($this->pprs_second_name));\n $username = $firstName . substr($secondName, 0, 1);\n $i = 1;\n while(User::model()->findByAttributes(['username'=>$username])){\n $i ++;\n if($i> strlen($secondName)){\n $username = $firstName . DbrLib::rand_string(2);\n }\n $username = $firstName . substr($secondName, 0, $i); \n }\n \n /**\n * get email from person contacts\n */\n $contacts = $this->ppcnPersonContacts;\n $email = '';\n foreach($contacts as $contact){\n if($contact->ppcn_pcnt_type == PcntContactType::TYPE_EMAIL ){\n $email = trim($contact->ppcn_value);\n }\n }\n \n /**\n * create user record\n */\n $user = new User();\n $user->username = $username;\n $user->password = $password;\n $user->email = $email;\n $user->status = User::STATUS_ACTIVE;\n \n if(!$user->validate()){\n return CHtml::errorSummary($user);\n }\n \n $user->save();\n \n /**\n * create profile record\n */\n $profile=new Profile;\n $profile->user_id=$user->id;\n $profile->first_name = $this->pprs_first_name;\n $profile->last_name = $this->pprs_second_name;\n $profile->sys_ccmp_id = Yii::app()->sysCompany->getActiveCompany();\n $profile->person_id=$this->primaryKey;\n\t\t$profile->save(); \n \n return true;\n \n \n }",
"protected function saveProfile($user)\n\t{\n\t}",
"public function handleProviderCallback()\n\n {\n $user = Socialite::driver('facebook')->user();\n\n $gender = $user->user['gender'];\n $ext_id = $user->user['id'];\n $verified = $user->user['verified'];\n $avatar = $user->avatar;\n $name = explode(' ',$user->name);\n\n\n $social_exist = User::where('ext_id',$ext_id)->first();\n\n\n if($social_exist)\n {\n return $this->loginUsingId($social_exist->id);\n }\n else\n {\n $user_create = User::create([\n 'uuid' => Uuid::generate(5,$user->email, Uuid::NS_DNS),\n \"firstname\" => \"$name[0]\",\n \"lastname\" => \"$name[1]\",\n \"email\" => \"$user->email\",\n 'password' => bcrypt($ext_id),\n \"gender\" => \"$gender\",\n \"avatar\" => $avatar,\n \"ext_id\" => $ext_id,\n \"ext_source\" => \"facebook\",\n \"ext_verified\" => \"$verified\"\n ]);\n\n $userObj = User::find($user_create->id);\n\n if(Event::fire(new WelcomeUser($user_create)))\n {\n return $this->loginUsingId($user_create->id);\n }else\n {\n //Redirect to error page and log in the incident\n }\n }\n }",
"public function create()\n {\n return redirect('profile');\n }",
"public function profile (request $request) {\n\t\t$userInfo = resolve('userInfo');\n\n\t\tif ($request->isMethod('post') && $request->tab == \"profile\") {\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\t$usr_role = $request->usr_role;\n\t\t\t} else {\n\t\t\t\t$usr_role = 'CP';\n\t\t\t}\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\t$dataProfile = array(\n\t\t\t\t\t'usr_employment_id' => $request->usr_employment_id,\n\t\t\t\t\t'usr_role' \t\t\t\t\t=> $usr_role,\n\t\t\t\t\t'usr_firstname' \t\t=> $request->usr_firstname,\n\t\t\t\t\t'usr_lastname' \t\t\t=> $request->usr_lastname,\n\t\t\t\t\t'usr_nric' \t\t\t\t\t=> $request->usr_nric,\n\t\t\t\t\t'usr_dob' \t\t\t\t\t=> $request->usr_dob,\n\t\t\t\t\t'usr_citizen' \t\t\t=> $request->usr_citizen,\n\t\t\t\t\t'usr_add1' \t\t\t\t\t=> $request->usr_add1,\n\t\t\t\t\t'usr_add2' \t\t\t\t\t=> $request->usr_add2,\n\t\t\t\t\t'usr_postcode' \t\t\t=> $request->usr_postcode,\n\t\t\t\t\t'usr_state' \t\t\t\t=> $request->usr_state,\n\t\t\t\t\t'usr_country' \t\t\t=> $request->usr_country,\n\t\t\t\t\t'usr_education' \t\t=> $request->usr_education,\n\t\t\t\t\t'usr_qualification' => $request->usr_qualification,\n\t\t\t\t\t'usr_jobtitle' \t\t\t=> $request->usr_jobtitle,\n\t\t\t\t\t'usr_division' \t\t\t=> $request->usr_division,\n\t\t\t\t\t'usr_employment' \t\t=> $request->usr_employment,\n\t\t\t\t\t'usr_mobile' \t\t\t\t=> $request->usr_mobile,\n\t\t\t\t\t'usr_email' \t\t\t\t=> $request->usr_email,\n\t\t\t\t\t'usr_bank_name' \t\t=> $request->usr_bank_name,\n\t\t\t\t\t'usr_bank_acc_no' \t=> $request->usr_bank_acc_no,\n\t\t\t\t\t'usr_kwsp_no' \t\t\t=> $request->usr_kwsp_no,\n\t\t\t\t\t'usr_updated' \t\t\t=> Carbon::now()\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$dataProfile = array(\n\t\t\t\t\t'usr_firstname' \t\t=> $request->usr_firstname,\n\t\t\t\t\t'usr_lastname' \t\t\t=> $request->usr_lastname,\n\t\t\t\t\t'usr_nric' \t\t\t\t\t=> $request->usr_nric,\n\t\t\t\t\t'usr_dob' \t\t\t\t\t=> $request->usr_dob,\n\t\t\t\t\t'usr_citizen' \t\t\t=> $request->usr_citizen,\n\t\t\t\t\t'usr_add1' \t\t\t\t\t=> $request->usr_add1,\n\t\t\t\t\t'usr_add2' \t\t\t\t\t=> $request->usr_add2,\n\t\t\t\t\t'usr_postcode' \t\t\t=> $request->usr_postcode,\n\t\t\t\t\t'usr_state' \t\t\t\t=> $request->usr_state,\n\t\t\t\t\t'usr_country' \t\t\t=> $request->usr_country,\n\t\t\t\t\t'usr_education' \t\t=> $request->usr_education,\n\t\t\t\t\t'usr_qualification' => $request->usr_qualification,\n\t\t\t\t\t'usr_jobtitle' \t\t\t=> $request->usr_jobtitle,\n\t\t\t\t\t'usr_mobile' \t\t\t\t=> $request->usr_mobile,\n\t\t\t\t\t'usr_email' \t\t\t\t=> $request->usr_email,\n\t\t\t\t\t'usr_bank_name' \t\t=> $request->usr_bank_name,\n\t\t\t\t\t'usr_bank_acc_no' \t=> $request->usr_bank_acc_no,\n\t\t\t\t\t'usr_kwsp_no' \t\t\t=> $request->usr_kwsp_no,\n\t\t\t\t\t'usr_updated' \t\t\t=> Carbon::now()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// echo '<pre>'; print_r($request->usr_role); die();\n\t\t\t$updateProfile = DB::table('users')->where('usr_id', $request->usr_id)->update($dataProfile);\n\n\t\t\tLog::doAddLog (\"Update profile\", $request->usr_id, $request->usr_firstname.' '.$request->usr_lastname);\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\treturn redirect('view-profile/'.$request->usr_id)->with('success', \"Successfully update user profile.\");\n\t\t\t} else {\n\t\t\t\treturn redirect('profile')->with('success', \"Successfully update user profile.\");\n\t\t\t}\n\n\n\t\t} else if ($request->isMethod('post') && $request->tab == \"password\"){\n\n\t\t\t// echo $request->password2; die();\n\t\t\tif($request->password1 != $request->password2){\n\t\t\t\treturn redirect('profile')->with('error', \"Password confirmation didnt match. Please try again.\");\n\t\t\t} else {\n\t\t\t\t$pass = hash('sha256', $request->password1);\n\n\t\t\t\t$dataPassword = array (\n\t\t\t\t\t'usr_pword' => $pass\n\t\t\t\t);\n\t\t\t\t$updatePassword = DB::table('users')->where('usr_id', $request->usr_id)->update($dataPassword);\n\t\t\t\tLog::doAddLog (\"Update password\", $request->usr_id);\n\t\t\t\treturn redirect('profile#t02')->with('success', \"Successfully update new password.\");\n\t\t\t}\n\t\t} else if ($request->isMethod('post') && $request->tab == \"bank\"){\n\n\t\t\t$dataBank = array (\n\t\t\t\t'usr_bank_name' \t=> $request->usr_bank_name,\n\t\t\t\t'usr_bank_acc_no' => $request->usr_bank_acc_no,\n\t\t\t\t'usr_kwsp_no' \t\t=> $request->usr_kwsp_no\n\t\t\t);\n\n\t\t\t$updateBank = DB::table('users')->where('usr_id', $request->usr_id)->update($dataBank);\n\t\t\treturn redirect('profile#t04')->with('success', \"Successfully update Bank & KWSP info.\");\n\t\t}\n\n return view('profile')->with('user',$userInfo);\n }",
"public function createUserProfile($data) {\n\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT COUNT(*)\n FROM users AS u\n JOIN profiles AS p ON p.userID = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n $result = $stmt->fetch(PDO::FETCH_COLUMN);\n\n if ($result) {\n $sql = 'UPDATE profiles\n SET firstName=?, lastName=?, dob=?, addressFirst=?, addressSecond=?, city=?, postcode=?, mobile=?, bio=?\n WHERE userID = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio'],\n $userID\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n else {\n $sql = 'INSERT INTO profiles (userID, firstName, lastName, dob, addressFirst, addressSecond, city, postcode, mobile, bio)\n VALUES (?,?,?,?,?,?,?,?,?,?)';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $userID,\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio']\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n }\n }",
"public function onUserSignUp($event) \n {\n $event->user->notify(new NotifyUser($event->user, 'signup'));\n }",
"public function create_member_profile()\n {\n if ( ! Session::access('can_admin_members')) {\n return Cp::unauthorizedAccess();\n }\n\n $data = [];\n\n if (Request::has('group_id')) {\n if ( ! Session::access('can_admin_mbr_groups')) {\n return Cp::unauthorizedAccess();\n }\n\n $data['group_id'] = Request::input('group_id');\n }\n\n // ------------------------------------\n // Instantiate validation class\n // ------------------------------------\n\n $VAL = new ValidateAccount(\n [\n 'request_type' => 'new', // new or update\n 'require_password' => false,\n 'screen_name' => Request::input('screen_name'),\n 'password' => Request::input('password'),\n 'password_confirm' => Request::input('password_confirm'),\n 'email' => Request::input('email'),\n ]\n );\n\n $VAL->validateScreenName();\n $VAL->validateEmail();\n $VAL->validatePassword();\n\n // ------------------------------------\n // Display error is there are any\n // ------------------------------------\n\n if (count($VAL->errors()) > 0) {\n return Cp::errorMessage($VAL->errors());\n }\n\n // Assign the query data\n $data['password'] = Hash::make(Request::input('password'));\n $data['ip_address'] = Request::ip();\n $data['unique_id'] = Uuid::uuid4();\n $data['join_date'] = Carbon::now();\n $data['email'] = Request::input('email');\n $data['screen_name'] = Request::input('screen_name');\n\n // Was a member group ID submitted?\n $data['group_id'] = ( ! Request::input('group_id')) ? 2 : Request::input('group_id');\n\n // Create records\n $member_id = DB::table('members')->insertGetId($data);\n DB::table('member_data')->insert(['member_id' => $member_id]);\n DB::table('member_homepage')->insert(['member_id' => $member_id]);\n\n $message = __('members.new_member_added');\n\n // Write log file\n Cp::log($message.' '.$data['email']);\n\n // Update global stat\n Stats::update_member_stats();\n\n // Build success message\n return $this->view_all_members($message.' <b>'.stripslashes($data['screen_name']).'</b>');\n }",
"public function postProfile() {\n $this->_adminUserRepository->updateProfile ( $this->auth->user ()->id );\n return redirect ( 'users/profile' )->withSuccess ( trans ( 'user::adminuser.profile.success' ) );\n }",
"public function profile_complete() {\n $data = array();\n if (!$this->user->is_logged_in()) {\n redirect(\"/account/info\");\n }\n\n $this->user->get_user($this->user->getMyId());\n $data['user'] = $this->user;\n\n $this->load->view('account/profile_complete', $data);\n }",
"public function create(Request $request)\n {\n $user = Auth::user();\n $profile = $user->profile; \n return view('profile.create',compact('profile'));\n }",
"protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }",
"public function doCreate() {\n if(\n isset($_POST['email']) &&\n isset($_POST['password']) &&\n isset($_POST['lastName']) &&\n isset($_POST['firstName']) &&\n isset($_POST['address']) &&\n isset($_POST['postalCode']) &&\n isset($_POST['city'])\n ) {\n $alreadyExist = $this->userManager->findByEmail($_POST['email']);\n\n if(!$alreadyExist) {\n $newUser = new User($_POST);\n $this->userManager->create($newUser);\n $page = 'login';\n }\n else {\n $error = \"ERROR : This email (\".$_POST['email'].\") is used by another user\";\n $page = 'create';\n }\n }\n\n require('./View/default.php');\n }",
"public function profileAction(){\n /** @var Object_User $user */\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['phone'])){\n $user->setPhone($data['phone']);\n }\n if(isset($data['email'])){\n $user->setPhone($data['email']);\n }\n if(isset($data['workphone'])){\n $user->setWorkPhone($data['workphone']);\n }\n if(isset($data['workemail'])){\n $user->setWorkEmail($data['workemail']);\n }\n if(!$user->save()){\n $this->setErrorResponse('Cannot update user profile');\n }\n $this->_helper->json($user);\n }",
"public function saveProfile()\n {\n if ($this->validate()) {\n $user = $this->user;\n\n $graph = Yii::$container\n ->get(\\common\\components\\Graph::class, [$this->user]);\n\n if ($this->timezone) {\n $user->timezone = $this->timezone;\n }\n if ($this->expose_graph) {\n $user->expose_graph = true;\n\n // generate behaviors graph image\n $checkins_last_month = (Yii::$container->get(\\common\\interfaces\\UserBehaviorInterface::class))\n ->getCheckInBreakdown();\n\n // if they haven't done a check-in in the last month this will explode\n // because $checkins_last_month is an empty array\n if ($checkins_last_month) {\n $graph->create($checkins_last_month, true);\n }\n } else {\n $user->expose_graph = false;\n // remove behaviors graph image\n $graph->destroy();\n }\n\n if ($this->send_email) {\n $user->send_email = true;\n $user->email_category = $this->email_category;\n $user->partner_email1 = $this->partner_email1;\n $user->partner_email2 = $this->partner_email2;\n $user->partner_email3 = $this->partner_email3;\n } else {\n $user->send_email = false;\n $user->email_category = 4; // default to \"Speeding Up\"\n $user->partner_email1 = null;\n $user->partner_email2 = null;\n $user->partner_email3 = null;\n }\n $user->save();\n return $user;\n }\n\n return null;\n }",
"public function create_user()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('/admin/login', 'refresh');\n\t\t}\n\t\t$this->data['title'] = $this->lang->line('create_user_heading');\n\n\t\t//See the ion_auth config to check if allow_user_registration is TRUE\n\t\tif( ! $this->config->item('allow_user_registration', 'ion_auth')){\n\n\t\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t\tredirect('/admin', 'refresh');\n\t\t\t}\n\n\t\t}\n\n\n\t\t$tables = $this->config->item('tables', 'ion_auth');\n\t\t$identity_column = $this->config->item('identity', 'ion_auth');\n\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required');\n\t\t$this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required');\n\t\tif ($identity_column !== 'email')\n\t\t{\n\t\t\t$this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']');\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]');\n\t\t}\n\t\t$this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n\t\t$this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n\t\t$this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t$this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t$identity = ($identity_column === 'email') ? $email : $this->input->post('identity');\n\t\t\t$password = $this->input->post('password');\n\n\t\t\t$additional_data = array(\n\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t'company' => $this->input->post('company'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t);\n\t\t}\n\t\tif ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data))\n\t\t{\n\t\t\t// check to see if we are creating the user\n\t\t\t// redirect them back to the admin page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\tredirect(\"auth\", 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create user form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['first_name'] = array(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'first_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('first_name'),\n\t\t\t);\n\t\t\t$this->data['last_name'] = array(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'last_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('last_name'),\n\t\t\t);\n\t\t\t$this->data['identity'] = array(\n\t\t\t\t'name' => 'identity',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t);\n\t\t\t$this->data['email'] = array(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'email',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\n\t\t\t);\n\t\t\t$this->data['company'] = array(\n\t\t\t\t'name' => 'company',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'company',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('company'),\n\t\t\t);\n\t\t\t$this->data['phone'] = array(\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'phone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('phone'),\n\t\t\t);\n\t\t\t$this->data['password'] = array(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\n\t\t\t);\n\t\t\t$this->data['password_confirm'] = array(\n\t\t\t\t'name' => 'password_confirm',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password_confirm',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password_confirm'),\n\t\t\t);\n\n\n\t\t\t$this->load->view('templates/header',$this->data);\n\t\t\t$this->load->view('/admin/create_user');\n\t\t\t$this->load->view('templates/footer');\n\t\t}\n\t}",
"public function create()\n {\n return view('admin.profile.create');\n }",
"public function new_profile(){\n\n\t\t// -- error checking -- //\n\t\t$errors = array();\n\t\t\t\t\n\n\t\t\t\tif(empty($_POST) === false){\n\t\t\t\t\t$required_fields = array('full_name','location', 'user_bio');\n\n\n\t\t\t\t\tforeach($_POST as $key=>$value) {\n\t\t\t\t\t\tif (empty($value) && in_array($key, $required_fields) === true) {\n\t\t\t\t\t\t\t$errors[] = 'Please fill out all fields';\n\t\t\t\t\t\n\t\t\t\t\t\t\treturn $errors;\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}\n\t\t// if no errors found add user_profile data to the database.\n\t\t\t\tif(empty($_POST) === false && empty($errors) === true){\n\n\t\t\t\t\t$tmp_name = $_FILES['images']['tmp_name'];\n\t\t\t\t\t$uploadfilename = $_FILES['images'][\"name\"];\n\t\t\t\t\t$saveddate=date(\"mdy-Hms\");\n\t\t\t\t\t$newfilename = \"./uploads/user_image/\".basename($saveddate.\"-\".$uploadfilename);\n\t\t\t\t\t$user_file = '';\n\t\t\t\t\t\n\t\t\t\t\tif($_FILES['images']['name']){\n\t\t\t\t\t$user_file = basename($saveddate.\"-\".$uploadfilename);\n\t\t\t\t\t}\n\t\t\t\t\t//move file to storage\n\t\t\t\t\tmove_uploaded_file($tmp_name, $newfilename);\n\t\t\t\t\t\n\t\t\t\t\t//get current user\n\t\t\t\t\t$user_name = $_SESSION['username'];\n\t\t\t\t\t// get user id for the logged in user\n\t\t\t\t\t$user_id = Database::user_id_query($user_name);\n\t\t\t\t\t$full_name = isset($_POST['full_name'])? $_POST['full_name'] : null;\n\t\t\t\t\t$location = isset($_POST['location'])? $_POST['location'] : null;\n\t\t\t\t\t$user_bio = isset($_POST['user_bio'])? $_POST['user_bio'] : null;\n\t\t\t\t\t\n\t\t\t\t\t// put profile data into array \n\t\t\t\t\t$new_user_profile = array(\n\t\t\t\t\t\t'full_name' => $full_name,\n\t\t\t\t\t\t'location' => $location,\n\t\t\t\t\t\t'user_bio' => $user_bio,\n\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t'join_date' => ''\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif($_FILES['images']['name']){\n\t\t\t\t\t\t$new_user_profile['user_file'] = $user_file;\n\t\t\t\t\t}\n\t\t\t\t\t//call static function to insert profile data array into the database\n\t\t\t\t\tUserProfileHelper::new_profile($new_user_profile);\n\t\t\t\t}\n\t}",
"public function store(createProfileRequest $request)\n {\n \n\n $avatar=$request->avatar->store('avatar');\n\n $profile= new Profile();\n\n $profile->user_id=auth()->user()->id;\n $profile->nomor_telepon=$request->nomor_telepon;\n $profile->nomor_ktp=$request->nomor_ktp;\n $profile->alamat=$request->alamat;\n $profile->avatar=$avatar;\n \n $profile->save();\n\n Session()->flash('completed','Create Profile Successfully');\n\n return redirect(route('home'));\n }",
"public function createAction()\n {\n if(isset($_FILES['user_avatar']) && $_FILES['user_avatar']['size']!=0)\n $avatar = $_FILES['user_avatar'];\n else\n $avatar = null;\n\n $user = new User($_POST);\n if($user->save($avatar)){\n if(($avatar && user::uploadAvatar($user->email,$avatar)) || !$avatar){\n Flash::addMessage('Registered Successfully, Please login!');\n }else{\n Flash::addMessage('Registered Successfully, Please login! Uploaded Avatar file not allowed. Please try uploading Avatar later through Profile page');\n }\n\n if(isset($_SESSION['admin']) && $_SESSION['admin'])\n $this->redirect('/museum/gamify/admin');\n else\n $this->redirect('/museum/gamify');\n\n }else{\n if(isset($_SESSION['admin']) && $_SESSION['admin'])\n View::renderTemplate('Admin/index.html', array(\n 'user' => $user));\n else\n View::renderTemplate('Home/index.html', array(\n 'user' => $user));\n //var_dump($user->errors);\n } \n }",
"public function add() {\n\t\tRouter::redirect('/users/profile');\t\n\t}",
"public function actionCreate()\n {\n $model = new ProfileModel();\n $model->scenario = Constants::SCENARIO_SIGNUP;\n\n $db = \\Yii::$app->db;\n $transaction = $db->beginTransaction();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //now insert the login credentials into teh authentication model\n $authModel = new AuthenticationModel();\n $authModel->isNewRecord = true;\n\n $authModel->USER_ID = $model->USER_ID;\n $authModel->PASSWORD = $model->PASSWORD;\n $authModel->ACCOUNT_AUTH_KEY = $model->ACCOUNT_AUTH_KEY;\n if ($authModel->save()) {\n //commit transaction\n $transaction->commit();\n //$this->redirect(['view', 'id' => $model->USER_ID]);\n $this->redirect(['//site/login']);\n } else {\n //roll back the transaction\n $model->PASSWORD = null; //clear the password field\n $model->REPEAT_PASSWORD = null; //clear the repeat password field\n $model->ACCOUNT_AUTH_KEY = null;\n $transaction->rollback();\n }\n }\n return $this->render('create', ['model' => $model,]);\n }",
"public function createUser()\n {\n $result = 1;\n \n $this->registrationDate = date('Y-m-d');\n $this->validation = uniqid();\n \n $transaction = $this->dbConnection->beginTransaction();\n \n try\n { \n if($this->save()){\n //Get the idUser of the new User and specify it in the table verifIdentity\n $idUser = Yii::app()->db->getLastInsertId();\n $verifIdentity = VerifIdentity::model()->findByPk($this->serialNumber);\n $verifIdentity->idUser = $idUser;\n if(!$verifIdentity->save())\n throw new CDbException(null); \n\n //Upload of Profile Picture\n if($this->profilePicture !== \"default\")\n {\n $result = $this->addPicture($this->profilePicture, $this->profilePictureExtension);\n if($result !== 1)\n {\n $this->addError('pictureUploader',$result);\n throw new CException(null); \n }\n }\n\n $transaction->commit();\n }\n else $result = 0;\n }\n catch(Exception $e)\n {\n if($e !== null)\n $this->addError('pictureUploader',\"Problem during create process\");\n $transaction->rollBack();\n $result = 0;\n } \n\n return $result;\n }",
"public function getUserProfile() {\n\n\t\t$data = $this->api->get( 'people/~:('. implode(',', $this->config['fields']) .')?format=json' );\n\n\t\t// if the provider identifier is not received, we assume the auth has failed\n\t\tif ( ! isset( $data->id ) ) {\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response: \" . Hybrid_Logger::dumpData( $data ), 6 );\n\t\t}\n\n\t\t// # store the user profile.\n\t\t$this->user->profile->identifier = ( property_exists ( $data, 'id' ) ) ? $data->id : '';\n\t\t$this->user->profile->firstName = ( property_exists ( $data, 'firstName' ) ) ? $data->firstName : '';\n\t\t$this->user->profile->lastName = ( property_exists ( $data, 'lastName' ) ) ? $data->lastName : '';\n\t\t$this->user->profile->profileURL = ( property_exists ( $data, 'publicProfileUrl' ) ) ? $data->publicProfileUrl : '';\n\t\t$this->user->profile->email = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->emailVerified = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->photoURL = ( property_exists ( $data, 'pictureUrl' ) ) ? $data->pictureUrl : '';\n\t\t$this->user->profile->description = ( property_exists ( $data, 'summary' ) ) ? $data->summary : '';\n\t\t$this->user->profile->country = ( property_exists ( $data, 'country' ) ) ? strtoupper( $data->country ) : '';\n\t\t$this->user->profile->displayName = trim( $this->user->profile->firstName . ' ' . $this->user->profile->lastName );\n\n\t\tif ( property_exists( $data, 'phoneNumbers' ) && property_exists( $data->phoneNumbers, 'phoneNumber' ) ) {\n\t\t\t$this->user->profile->phone = (string) $data->phoneNumbers->phoneNumber;\n\t\t} else {\n\t\t\t$this->user->profile->phone = null;\n\t\t}\n\n\t\tif ( property_exists( $data, 'dateOfBirth' ) ) {\n\t\t\t$this->user->profile->birthDay = (string) $data->dateOfBirth->day;\n\t\t\t$this->user->profile->birthMonth = (string) $data->dateOfBirth->month;\n\t\t\t$this->user->profile->birthYear = (string) $data->dateOfBirth->year;\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }",
"protected function create(array $data)\n {\n\n define('UPLOAD_DIR', 'uploads/profiles/');\n $img = $data['profilePictureEncoded'];\n $newImage = str_replace('data:image/png;base64,', '', $img);\n $image = explode(\",\",$img);\n $test = base64_decode($image[1]);\n $fileName = UPLOAD_DIR . uniqid() . '.jpeg';\n file_put_contents($fileName, $test);\n\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'profile_picture' => '/' . $fileName,\n 'type' => 1,\n ]);\n }",
"protected function create(Request $request)\n {\n\n // return ($request);\n\n // For Image submission \n $image = $request->file('profile');\n $profile = time().'.'.$image->getClientOriginalExtension();\n $destinationpath = public_path('/images');\n $image->move($destinationpath,$profile);\n\n $member = new User();\n $member ->fname=$request->fname;\n $member ->lname=$request->lname;\n $member ->email=$request->email;\n $member ->password=Hash::make($request['password']);\n $member ->phone=$request->phone;\n $member ->pincode=$request->pincode;\n $member ->city=$request->city;\n $member ->state=$request->state;\n $member ->country=$request->country;\n $member ->profile=$profile;\n $member ->save();\n echo \"Data Submitted\";\n }",
"protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }",
"public function addUser($input) {\n $sql = \"INSERT INTO \n usertable (username, password, type, email, firstname, lastname) \n VALUES (:username, :password, :type, :email, :firstname, :lastname)\";\n\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':username', $input->getUserName(), PDO::PARAM_STR);\n $stmt->bindParam(':password', $input->getUserPassword(), PDO::PARAM_STR);\n $stmt->bindParam(':type', $input->getUserType(), PDO::PARAM_STR);\n $stmt->bindParam(':email', $input->getUserEmail(), PDO::PARAM_STR);\n $stmt->bindParam(':firstname', $input->getFirstname(), PDO::PARAM_STR);\n $stmt->bindParam(':lastname', $input->getLastname(), PDO::PARAM_STR);\n\n $stmt->execute();\n// echo 'User Registered.';\n\n $username = $input->getUserName();\n $sql = \"SELECT * FROM usertable WHERE username = '$username'\";\n foreach (parent::$this->db_connect->query($sql) as $row) {\n $custController = new profile_controller();\n $custController->newProfile($row['userid']);\n }\n }",
"protected function _storeProfile()\n {\n $projectProfileFile = $this->_loadedProfile->search('ProjectProfileFile');\n\n $name = $projectProfileFile->getContext()->getPath();\n\n $this->_registry->getResponse()->appendContent('Updating project profile \\'' . $name . '\\'');\n\n $projectProfileFile->getContext()->save();\n }",
"public function store(ProfileFormRequest $request)\n {\n\n $this->updateUser($request->name, $request->email);\n\n Profile::create([\n\n 'user_id' => auth()->id(),\n\n 'summary' => $request->summary,\n\n 'birthdate' => $request->date,\n\n 'country' => $request->country ?? null,\n\n 'state' => $request->state ?? null,\n\n ]);\n\n return redirect('/profile')->withSuccess('Profile was successfully created');\n }",
"public function actionCreate()\n {\n $model = new User();\n $employee=new UserProfile();\n if ($model->load(Yii::$app->request->post()) && $employee->load(Yii::$app->request->post())) {\n $model->password=Yii::$app->getSecurity()->generatePasswordHash($model->password);\n if($model->save()){\n $employee->user_id=$model->id;\n $employee->photo = UploadedFile::getInstance($employee, 'photo');\n if ($employee->photo){ \n $photo_name='profile_'.date('Ymdhis').'.' . $employee->photo->extension; \n $employee->photo->saveAs(\\Yii::$app->basePath.'/web/images/' . $photo_name);\n $employee->photo=$photo_name;\n }\n if($employee->save())\n {\n return $this->redirect(['index']);\n }\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'employee'=>$employee\n ]);\n }",
"public function create()\n {\n return view('user.profile', ['admin' => true]);\n }",
"public function createCompanyProfile($input);",
"public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }",
"public function create()\n {\n return view('profiles.create');\n }",
"public function create()\n {\n return view('profiles.create');\n }",
"public function create()\n {\n return view('profiles.create');\n }",
"function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function create()\n {\n return view('profile.create');\n }",
"public function create()\n {\n return view('profile.create');\n }"
] | [
"0.6839326",
"0.6519557",
"0.6429307",
"0.6349028",
"0.6180859",
"0.6167281",
"0.60826916",
"0.60597295",
"0.60545886",
"0.60141456",
"0.59867096",
"0.598572",
"0.5956071",
"0.59364104",
"0.58905786",
"0.5871619",
"0.5857083",
"0.58481306",
"0.5844022",
"0.58338356",
"0.58300257",
"0.5822471",
"0.5767319",
"0.57670385",
"0.57648885",
"0.57617015",
"0.5761215",
"0.57572716",
"0.5736968",
"0.57245594",
"0.5713065",
"0.56895655",
"0.5688512",
"0.5686764",
"0.5686306",
"0.5675434",
"0.5673372",
"0.56704485",
"0.56606305",
"0.56512445",
"0.5646531",
"0.560128",
"0.558683",
"0.5585435",
"0.55793446",
"0.55744284",
"0.5573364",
"0.55608237",
"0.55608237",
"0.5560645",
"0.5557927",
"0.5550857",
"0.55496556",
"0.5518196",
"0.5506562",
"0.55025274",
"0.54901546",
"0.5489882",
"0.5487674",
"0.5470623",
"0.54703224",
"0.5469561",
"0.5461601",
"0.5459119",
"0.5452873",
"0.5452447",
"0.5443788",
"0.54418397",
"0.54297805",
"0.54278344",
"0.54255956",
"0.54153216",
"0.5412776",
"0.54053634",
"0.540425",
"0.54008955",
"0.53969103",
"0.5391611",
"0.5382479",
"0.5379822",
"0.5375762",
"0.5370822",
"0.5367818",
"0.5367574",
"0.53634554",
"0.53592426",
"0.53580254",
"0.53517056",
"0.5342371",
"0.5341261",
"0.532527",
"0.5323715",
"0.5319988",
"0.5316292",
"0.530931",
"0.530931",
"0.530931",
"0.5309177",
"0.53060114",
"0.53054625",
"0.53054625"
] | 0.0 | -1 |
Constructor function of CategoryRepository | public function __construct(Category $model)
{
parent::__construct($model);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(CategoryRepository $category)\n {\n $this->category = $category;\n\n }",
"public function __construct(\n CategoryRepository $categoryRepository\n ) {\n $this->categoryRepository = $categoryRepository;\n }",
"public function __construct(CategoryRepo $repo)\n {\n $this->repo = $repo;\n }",
"public function __construct(CategoryRepository $categoryRepository)\n {\n $this->categoryRepository = $categoryRepository;\n }",
"public function __construct(CategoryRepository $categoryRepository)\n {\n $this->categoryTable = $categoryRepository->getTableData();\n }",
"public function __construct(CategoryRepository $categories)\n {\n $this->categories = $categories;\n }",
"public function __construct(CategoryInterface $repository)\n {\n $this->repository = $repository;\n }",
"public function __construct(ContentCategoryRepository $contentCategoryRepo)\n {\n // Construct\n $this->contentCategoryRepo = $contentCategoryRepo;\n }",
"public function __construct(ExpenseCategoryRepository $repo)\n {\n parent::__construct();\n\n $this->repo = $repo;\n\n $this->tenant = true;\n }",
"public function __construct(GalleryCategoryRepository $gallerycategory)\n {\n $this->gallerycategory = $gallerycategory;\n }",
"public function __construct(CategoryRepository $categories){\n $this->middleware('auth');\n\n $this->categories = $categories;\n\n }",
"public function __construct(PostRepository $post, CategoryRepository $category)\n {\n parent::__construct();\n\n $this->category = $category;\n $this->post = $post;\n\n }",
"public function __construct(NewsCategoryRepository $newsCategory) {\n\n $this->middleware('auth:api');\n\n $this->newsCateg = $newsCategory;\n }",
"public function __construct() {\n parent::__construct( 'categories' );\n\n // We want to make sure they match\n if ( isset( $this->category_id ) )\n $this->id = $this->category_id;\n }",
"public function __construct(HandbookCategoryRepositoryInterface $handbookCategoryRepository)\n {\n $this->handbookCategoryRepository = $handbookCategoryRepository;\n }",
"public function __construct($params = [])\n {\n $this->repo = new CategoryRepository();\n $this->validate = new CategoryValidation();\n $this->params = $params;\n }",
"public function __construct()\n {\n $this->readCategory = new ReadCategories();\n }",
"public function __construct()\n {\n $this->cate = Category::all();\n }",
"public function __construct(CategoryRepository $CategoryRepository, UploaderService $uploaderService)\n {\n $this->uploaderService = $uploaderService;\n $this->CategoryRepository = $CategoryRepository;\n }",
"public function __construct() {\n parent::__construct();\n \n $query = \"SELECT * from categories\";\n // execute the SQL query in the database and return an array \n \n $this->query($query);\n }",
"public function __construct()\n {\n $this->citiesRepository = new CitiesRepository();\n }",
"public function __construct() {\n $this->articleModel = $this->loadModel('Article');\n $this->categories = $this->articleModel->findAllCategories();\n }",
"public function __construct(CategoryValidator $categoryValidator, CategoryRepository $categoryRepository)\n {\n $this->categoryValidator = $categoryValidator;\n $this->categoryRepostory = $categoryRepository;\n }",
"public function __construct()\n {\n $categories = Category::orderBy('id', 'ASC')->get();\n\n $this->CategoryList = $categories;\n }",
"public function getRepository(): CategoryRepository\n {\n return $this->repository;\n }",
"public function __construct(CategoryRepository $categoryRepository, PostRepository $postRepository) {\n $this->postRepository = $postRepository;\n $this->categoryRepository = $categoryRepository;\n }",
"public function __construct(ConfigSettingRepository $repository, ConfigCategoryRepository $configCategoryRepository)\n {\n parent::__construct();\n $this->middleware('acl');\n $this->repository = $repository;\n $this->configCategoryRepository = $configCategoryRepository;\n }",
"public function __construct(Category $category)\n {\n $this->category = $category;\n }",
"public function __construct(Category $category)\n {\n $this->category = $category;\n }",
"public function __construct(Category $categories)\n {\n $this->categories = $categories;\n }",
"public function __construct()\n {\n $this->category = \\App\\Models\\Category::whereFeatured(true)->get();\n }",
"public function __construct()\n {\n //Call parent\n parent::__construct();\n\n //Load helpers\n $this->load->helper(array('form', 'url'));\n\n //Load libraries\n $this->load->library('form_validation');\n\n //Get all categories\n $categories_data = $this->Category_model->getCategories();\n\n //Fill array field\n foreach ($categories_data as $c) {\n $this->categories[$c->id] = $c->name;\n }\n }",
"function __construct()\n {\n parent::__construct();\n\t\t\t\t$this->load->model('Category');\n }",
"public function __construct(\n protected CategoryRepository $categoryRepository,\n protected VelocityCategoryRepository $velocityCategoryRepository\n )\n {\n $this->_config = request('_config');\n }",
"public function __construct()\n {\n // $this->categories = Category::orderBy('id','desc')->get();\n\n }",
"public function _construct(Categoria $categoria){\n\n\t\t$this->categoria = $categoria;\n\t}",
"public function __construct()\n {\n $cats = get_categories();\n if(class_exists('Category'))\n {\n if( is_array($cats) && count($cats)>0 ){\n $idC = 0;\n foreach($cats as &$cat)\n {\n $category = new Category($cat->term_id, $cat->name, $cat->slug, $cat->parent);\n $this->lstCat[$idC] = $category->convertToArray(array('id', 'name', 'slug', 'parent'));\n $this->lstCat[$idC]['aff']=true;\n $idC++;\n }unset($cat);\n }\n }\n }",
"public function __construct()\n {\n $this->typeRepo = new TypesRepository();\n }",
"public function __construct(CategoryRepository $category, LocaleRepository $locale, RoleRepository $role, PermissionRepository $permission)\n {\n $this->category = $category;\n $this->locale = $locale;\n $this->role = $role;\n $this->permission = $permission;\n\n parent::__construct();\n }",
"public function __construct()\n {\n// $this->repo = new CourseRepository;\n }",
"public function __construct(){\r\n\t\t\tparent::__construct();\r\n\t\t\t$this->categoryModel = $this->model('Category'); \r\n\t\t}",
"public function __construct(CategoryRepository $categoryRepository, EntityManagerInterface $em)\n {\n //$this->middleware('guest', ['except' => 'logout']);\n $this->categoryRepository = $categoryRepository;\n $this->em = $em;\n\n // middleware to require login\n\n }",
"public function __construct(Categories $categories)\n {\n $this->categories = $categories;\n }",
"public function __construct(\n CrawlPostRepository $CrawlPostRepository,\n PostFrameRepository $FrameRepository, \n DynamicRepository $dynamicRepository,\n CategoryRepository $categoryRepository\n )\n {\n $this->repository = $CrawlPostRepository;\n $this->frames = $FrameRepository;\n $this->dynamics = $dynamicRepository;\n $this->categories = $categoryRepository;\n $this->init();\n \n }",
"public function _construct()\r\n {\r\n $this->_init('items/melicategoriesfilter', 'category_id');\r\n }",
"public function __construct(\n SearchRepository $repository, \n DynamicRepository $dynamicRepository, \n ProductRepository $productRepository,\n CategoryRepository $categoryRepository\n )\n {\n $this->repository = $repository;\n $this->dynamicRepository = $dynamicRepository->addDefaultParam('deleted', 'deleted', 0);\n $this->productRepository = $productRepository->addDefaultParam('deleted', 'deleted', 0);\n $this->categoryRepository = $categoryRepository->addDefaultParam('deleted', 'deleted', 0);\n \n $this->init();\n }",
"public function __construct() {\n $this->_resourceName = 'category';\n parent::__construct();\n }",
"public function __construct()\n {\n if (!isLoggedIn())\n {\n redirect('users/login');\n }\n\n // Check for admin\n if (!$_SESSION['admin'] > 0)\n {\n redirect('pages');\n }\n\n // instantiate category\n $this->categoryModel = $this->model('Category');\n }",
"public function __construct()\n {\n parent::__construct(\n 'label', 'description', // Categories\n 'slug', 'title', 'content', 'created_at', 'modified_at', 'owner', 'fk_category_id' // Posts\n );\n $this->categories = Reflector::reflect('Http\\Models\\Blog\\Category');\n $this->posts = Reflector::reflect('Http\\Models\\Blog\\Post');\n $this->populate();\n\n }",
"public function __construct()\n {\n $this->categories = new ArrayCollection();\n }",
"public function __construct()\n {\n $this->categories = new ArrayCollection();\n }",
"public function __construct(\\App\\Categroy $categories)\n {\n // Dependencies automatically resolved by service container...\n $this->categories = $categories;\n }",
"public function createCategory();",
"public function __construct()\n {\n $this->categories = [];\n $this->faker = Factory::create();\n $this->useContext('symfony_doctrine_context', new SymfonyDoctrineContext());\n }",
"public function __construct()\n {\n $this->postRepository = new PostRepository();\n $this->userRepository = new UserRepository();\n $this->commentRepository = new CommentRepository();\n $this->replyRepository = new ReplyRepository();\n }",
"public function __construct(NewsRepository $repository)\n {\n $this->repository = $repository;\n }",
"function init_category($title) {\n $category = ORM::for_table('pw_category')->create();\n $category->cat_title = $title;\n $category->save();\n return $category;\n}",
"public function __construct(HandbookCategoryRepositoryInterface $handbookCategoryRepository,\n NeedTypeRepositoryInterface $needTypesRepository)\n {\n $this->handbookCategoryRepository = $handbookCategoryRepository;\n $this->needTypesRepository = $needTypesRepository;\n }",
"public function __construct(CouponRepository $repository)\n {\n $this->repository = $repository;\n }",
"public function __construct(DoctorRepository $repository)\n {\n $this->repository = $repository;\n }",
"public function getCategoryRepo()\n {\n if ($this->_categoriesRepo === null || !$this->_categoriesRepo) {\n $this->_categoriesRepo = $this->getEntityRepository(Category::class);\n }\n\n return $this->_categoriesRepo;\n }",
"public function getCategoryRepo()\n {\n if ($this->_categoriesRepo === null || !$this->_categoriesRepo) {\n $this->_categoriesRepo = $this->getEntityRepository(Category::class);\n }\n\n return $this->_categoriesRepo;\n }",
"public function newCategory(): CategoryInterface;",
"public function __construct()\n\t{\n\t\t$this->category_model = '';\n\t\t$this->root_names = array(\n\t\t\t'expense' => 'Expenses',\n\t\t\t'income' => 'Incomes',\n\t\t);\n\t}",
"public function fromCategories(string ...$categories): self;",
"public function __construct(\n ProductRepository $productRepository,\n CategoryRepository $categoryRepository, \n AttributeRepository $attributeRepository,\n AttributeValueRepository $attributeValueRepository,\n ProductAttributeRepository $productAttributeRepository,\n TagRefRepository $tagRefRepository,\n MetadataRepository $metadataRepository, \n FileRepository $fileRepository,\n WarehouseRepository $warehouseRepository,\n ProductUrlRepository $productUrlRepository\n )\n {\n $this->repository = $productRepository;\n $this->categoryRepository = $categoryRepository;\n $this->attributeRepository = $attributeRepository;\n $this->attributeValueRepository = $attributeValueRepository;\n $this->productAttributeRepository = $productAttributeRepository;\n $this->tagRefRepository = $tagRefRepository;\n $this->metadataRepository = $metadataRepository;\n $this->fileRepository = $fileRepository;\n $this->warehouseRepository = $warehouseRepository;\n $this->productUrlRepository = $productUrlRepository;\n $this->init();\n \n }",
"public function __construct(CategoryService $categoryService)\n {\n parent::__construct();\n $this->categoryService = $categoryService;\n }",
"public function __construct(CategoryService $categoryService)\n {\n parent::__construct();\n $this->categoryService = $categoryService;\n }",
"public function __construct(HotelRepository $hotelRepository) {\n $this->hotelRepository = $hotelRepository;\n }",
"public function __construct( $categories_id = null ) {\n\t\tif (!is_null($categories_id)) {\n\t\t\t$sql = 'select c.*, cd.* from cart_categories c LEFT JOIN cart_categories_description cd ON (cd.categories_id = c.categories_id) where c.categories_id=' . $categories_id;\n\t\t\tif (!$result = Database::singleton()->query_fetch($sql)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// sets from cart_categories table\n\t\t\t$this->setId($result['categories_id']);\n\t\t\t$this->setImage($result['categories_image']);\n\t\t\t$this->setParent_id($result['parent_id']);\n\t\t\t$this->setSort_order($result['sort_order']);\n\t\t\t$this->setDate_added($result['date_added']);\n\t\t\t$this->setLast_modified($result['last_modified']);\n\t\t\t$this->setStatus($result['categories_status']);\n\t\t\t\n\t\t\t// sets from cart_categories_description table\n\t\t\t$this->setName($result['categories_name']);\n\t\t\t$this->setDescription($result['categories_description']);\n\t\t}\n\t}",
"public function __construct(MenuRepositoryInterface $menuRepository,\n NeedTypeRepositoryInterface $needsRepository,\n HandbookCategoryRepositoryInterface $categoryRepository)\n {\n $this->menuItems = $menuRepository;\n $this->needs = $needsRepository;\n $this->categories = $categoryRepository;\n }",
"public function __construct() {\n parent::__construct();\n \n //llamo al helper url\n $this->load->helper(\"url\"); \n \n //llamo o incluyo el modelo\n $this->load->model(\"CategoriesModel\");\n \n //cargo la libreria de sesiones\n $this->load->library(\"session\");\n }",
"public function __construct($categoryType = self::ALL_CATEGORY)\n {\n $this->categoryType = $categoryType;\n }",
"public function __construct(ProductRepository $productRepo, CategoryRepository $categoryRepo, AttributeRepository $attributeRepo, PostHistoryRepository $postHistoryRepo, RoomRepository $roomRepo, FacilitiesRepository $facilitiesRepo, Room $room) {\n $this->productRepo = $productRepo;\n $this->categoryRepo = $categoryRepo;\n $this->attributeRepo = $attributeRepo;\n $this->postHistoryRepo = $postHistoryRepo;\n $this->roomRepo = $roomRepo;\n $this->facilitiesRepo = $facilitiesRepo;\n $this->room=$room;\n }",
"public function __construct(CityRepository $cityRepository)\n {\n $this->city = $cityRepository;\n }",
"public function __construct(AttributeCategory $attributeCategory)\n {\n $this->attributeCategory = $attributeCategory;\n }",
"public function __construct(MusicSampleRepository $repository)\n {\n $this->repository = $repository;\n }",
"public function __construct(Category $model)\n {\n $this->model = $model;\n }",
"public function __construct(\n CategoryInterface $categoryRepository,\n ProductInterface $productRepository\n ) {\n $this->categoryRepository = $categoryRepository;\n $this->productRepository = $productRepository;\n }",
"public function __construct() {\n// $group = new \\App\\Models\\Group;\n// $permission = new \\App\\Models\\Permission;\n// $this->repository = new \\App\\Repositories\\AclRepository($user, $group, $permission);\n// $this->faker = \\Faker\\Factory::create();\n }",
"public function __construct(){\r\n\t\tparent::__construct();\r\n\t\tif (!$this->session->userdata('logado')){\r\n\t\t\tredirect(base_url('admin/login'));\r\n\t\t}\r\n\t\t$this->load->model('categorias_model','modelcategorias');\r\n\t\t//guarda em uma variavel a lista de tipos\r\n\t\t//após carregar o model no construtor eu vou chamar um metodo do model carregado\r\n\t\t$this->categorias = $this->modelcategorias->listar_categorias();\r\n\t}",
"public function __construct()\n {\n $this->categoriess = Category::where('parent_id', null)->orderBy('order','ASC')->get();\n\n\n\n\n\n\n }",
"public function __construct(DataRepository $repository)\n {\n $this->repository = $repository;\n }",
"public function __construct(CategoryMapper $categoryMapper) {\n $this->categoryMapper = $categoryMapper;\n }",
"public function __construct()\n {\n parent::__construct();\n $this->userRepository = new UserRepository();\n }",
"public function __construct()\n {\n\n $this->SubCategory = new SubCategoriesModel;\n $this->Functions = new ModelFunctions();\n }",
"public function __construct(DatabaseStudentRepository $repository) {\n $this->repository = $repository;\n }",
"public function __construct(DistrictRepository $repository)\n {\n $this->repository = $repository;\n }",
"public function __construct(CountryRepository $countryRepository)\n {\n $this->countryRepository = $countryRepository;\n }",
"public function __construct(AdRepository $adRepository)\n {\n $this->adRepository = $adRepository;\n }",
"public function __construct(AreaRepository $repository)\n {\n $this->repository = $repository;\n }",
"function __construct() {\n\t //llamo al contructor de Controller.php\n\t parent::__construct();\n\n\t //instancio el modelo\n $this->modelo(array('cortos','ediciones','categorias'));\n\n\n\t}",
"public function __construct( )\n {\n $this->genericRepository = new DtGenericRepository();\n $this->genericRepository->type = \"\\App\\Models\\Objects\\Entities\\Account\";\n }",
"public function __construct()\n {\n $this->kitchenRecipeRepository = app(KitchenRecipeRepository::class);\n $this->kitchenIngredientRepository = app(KitchenIngredientRepository::class);\n $this->kitchenIngredientKitchenRecipeRepository = app(KitchenIngredientKitchenRecipeRepository::class);\n }",
"public function __construct()\n {\n $menus = CategoryType::join('categories', 'category_type.category_id', 'categories.id')\n ->where('categories.deleted_at', null)->get();\n $this->reading_menus = $menus->where('mediatype_id', 1);\n $this->listen_menus = $menus->where('mediatype_id', 2);\n $this->video_menus = $menus->where('mediatype_id', 3);\n }",
"public function __construct(Container $container, array $config = array())\n\t{\n\t\t$config['tableName'] = '#__ars_categories';\n\t\t$config['idFieldName'] = 'id';\n\t\t$config['aliasFields'] = [\n\t\t\t'slug' \t => 'alias',\n\t\t\t'enabled' => 'published',\n\t\t\t'created_on' => 'created',\n\t\t\t'modified_on' => 'modified',\n\t\t\t'locked_on' => 'checked_out_time',\n\t\t\t'locked_by' => 'checked_out',\n\t\t];\n\n\t\t// Automatic checks should not take place on these fields:\n\t\t$config['fieldsSkipChecks'] = [\n\t\t\t'description',\n\t\t\t'groups',\n\t\t\t'vgroup_id',\n\t\t\t'show_unauth_links',\n\t\t\t'redirect_unauth',\n\t\t\t'language',\n\t\t\t'checked_out',\n\t\t\t'checked_out_time',\n\t\t\t'modified',\n\t\t\t'modified_by',\n\t\t\t'created',\n\t\t\t'created_by',\n\t\t];\n\n\t\tparent::__construct($container, $config);\n\n\t\t// Relations\n\t\t$this->belongsTo('visualGroup', 'VisualGroups', 'vgroup_id', 'id');\n\t\t$this->hasMany('releases', 'Releases', 'id', 'category_id');\n\n\t\t$this->with(['visualGroup']);\n\n\t\t// Behaviours\n\t\t$this->addBehaviour('Filters');\n\t\t$this->addBehaviour('Created');\n\t\t$this->addBehaviour('Modified');\n\t\t$this->addBehaviour('Assets');\n\n\t\t// Some filters we will have to handle programmatically so we need to exclude them from the behaviour\n\t\t$this->blacklistFilters([\n\t\t\t'vgroup_id',\n\t\t\t'language'\n\t\t]);\n\t}",
"public function __invoke(){\n $dbCate = new CategoriesTable(new TableGateway(\"categories\", $this->adapter));\n return $dbCate->getCategories();\n }",
"public function __construct(CommentRepository $repo)\n {\n parent::__construct();\n\n $this->repo = $repo;\n\n $this->tenant = true;\n }",
"public function __construct()\n {\n $this->repository = new EloquentRoleRepository;\n }",
"public function __construct(LanguageRepository $languageRepo)\n {\n $this->languageRepository = $languageRepo;\n }"
] | [
"0.8309143",
"0.80564696",
"0.78581125",
"0.7823766",
"0.7742342",
"0.76505667",
"0.74075615",
"0.7318511",
"0.7288167",
"0.7176974",
"0.7089984",
"0.705166",
"0.6941576",
"0.6939461",
"0.685942",
"0.6849061",
"0.6823687",
"0.6798244",
"0.6796409",
"0.6779477",
"0.6777811",
"0.6707754",
"0.6689666",
"0.66751814",
"0.6588384",
"0.65288776",
"0.65284216",
"0.6527106",
"0.6527106",
"0.649659",
"0.6453787",
"0.6451469",
"0.6435676",
"0.64280754",
"0.64279974",
"0.64084226",
"0.63778764",
"0.6376265",
"0.6363555",
"0.63515997",
"0.6330725",
"0.6317669",
"0.6309449",
"0.6257789",
"0.6256927",
"0.62299293",
"0.62278885",
"0.622567",
"0.62231266",
"0.6208952",
"0.6208952",
"0.62050927",
"0.61708033",
"0.61639565",
"0.6157119",
"0.6142767",
"0.6141983",
"0.6125285",
"0.61185527",
"0.61006325",
"0.6097612",
"0.6097612",
"0.6089163",
"0.6070059",
"0.60608137",
"0.60501546",
"0.6043818",
"0.6043818",
"0.6037923",
"0.6018995",
"0.60144114",
"0.6009666",
"0.6006859",
"0.6006143",
"0.60056996",
"0.5998765",
"0.59952086",
"0.59842753",
"0.5978638",
"0.59723014",
"0.5948454",
"0.5945427",
"0.5937014",
"0.5917714",
"0.59126216",
"0.59015757",
"0.5900819",
"0.5890687",
"0.5890354",
"0.5886421",
"0.58844036",
"0.5860787",
"0.58603483",
"0.58207405",
"0.5820675",
"0.58128524",
"0.5807443",
"0.5807345",
"0.57871014",
"0.57827026"
] | 0.6210552 | 49 |
Retrieve courses in term. Filters main query to only include immediate children of the current term. | function get_courses() {
global $wp_query;
$wp_query->set('tax_query', get_immediate_children());
$wp_query->get_posts();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function courses(){\n return Catalog::where('active',1)\n ->where('for_sale', 1)\n ->where('litmos_deleted', 0)\n ->orderBy('name')\n ->lists( 'name', 'id');\n }",
"function i4_lms_get_courses() {\n global $wpdb, $wpcwdb;\n\n $SQL = \"SELECT course_id, course_title\n\t\t\tFROM $wpcwdb->courses\n\t\t\tORDER BY course_title ASC\n\t\t\t\";\n\n $courses = $wpdb->get_results($SQL);\n\n return $courses;\n }",
"public static function find_courses($search) {\n global $DB;\n\n // Validate parameters passed from web service.\n $params = self::validate_parameters(self::find_courses_parameters(), array('search' => $search));\n\n // Capability check.\n if (!has_capability('moodle/course:viewhiddencourses', context_system::instance())) {\n return false;\n }\n\n // Build query.\n $searchsql = '';\n $searchparams = array();\n $searchlikes = array();\n $searchfields = array('c.shortname', 'c.fullname', 'c.idnumber');\n for ($i = 0; $i < count($searchfields); $i++) {\n $searchlikes[$i] = $DB->sql_like($searchfields[$i], \":s{$i}\", false, false);\n $searchparams[\"s{$i}\"] = '%' . $search . '%';\n }\n // We exclude the front page.\n $searchsql = '(' . implode(' OR ', $searchlikes) . ') AND c.id != 1';\n\n // Run query.\n $fields = 'c.id,c.idnumber,c.shortname,c.fullname';\n $sql = \"SELECT $fields FROM {course} c WHERE $searchsql ORDER BY c.shortname ASC\";\n $courses = $DB->get_records_sql($sql, $searchparams, 0);\n return $courses;\n }",
"function cicleinscription_get_courses_all(){\n\tglobal $DB;\n\t$sort = 'fullname ASC';\n\t$courses = $DB->get_records_sql(\"\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\tfullname,\n\t\t\t\tshortname \n\t\t\tFROM {course}\n\t\t\tWHERE\n\t\t\t\tcategory <> 0\n\t\t\tORDER BY {$sort}\");\n\n\treturn $courses;\n}",
"private function getCoursesWithLogs()\n {\n return $this->entityManager->createQueryBuilder()\n ->select('course')\n ->from(Course::class, 'course')\n ->innerJoin(ActionLog::class, 'log', Expr\\Join::WITH, 'course.id = log.course')\n ->andWhere('course.sandbox = :false')\n ->andWhere('course.id in (:ids)')\n ->setParameter('false', false)\n ->setParameter('ids', $this->getAvailableCoursesIds())\n ->orderBy('course.info.title', 'ASC')\n ->getQuery()\n ->getResult();\n }",
"public function getCourses()\n {\n return $this->hasMany(Course::className(), ['language' => 'ISO']);\n }",
"function get_immediate_children( $course_type = null ) {\n\tif (empty($course_type)) {\n\t\t$course_type = get_term_by('slug', get_query_var('term'), 'course_type');\n\t}\n\n\treturn array(\n\t\t'relation' => 'AND',\n\t\tarray(\n\t\t\t'taxonomy' => 'course_type',\n\t\t\t'terms' => $course_type->term_id\n\t\t),\n\t\tarray(\n\t\t\t'taxonomy' => 'course_type',\n\t\t\t'terms' => get_term_children( $course_type->term_id, 'course_type'),\n\t\t\t'operator' => 'NOT IN'\n\t\t)\n\t);\n}",
"public function getCourses()\n {\n return $this->courses;\n }",
"function i4_get_all_courses() {\n global $wpcwdb, $wpdb;\n\n $course_table_name = $wpdb->prefix . 'wpcw_courses';\n\n $wpdb->show_errors();\n\n $SQL = \"SELECT course_id, course_title FROM $course_table_name ORDER BY course_title\";\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }",
"public function get_courses(){\n return $this->courses;\n }",
"public function courses()\n {\n return $this->morphedByMany(Course::class, 'subjectables');\n }",
"public function category_wise_course_get() {\n $category_id = $_GET['category_id'];\n $courses = $this->api_model->category_wise_course_get($category_id);\n $this->set_response($courses, REST_Controller::HTTP_OK);\n }",
"public function get_courses(){\n\t\t$query = $this->db->get('course');\n\t\treturn $query->result();\n\t}",
"public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->frontpage_courseboxes($chelper, $courses);\r\n }",
"public function find($account_id, $search_term) {\n $uri = \"/api/v1/accounts/$account_id/courses?search_term=$search_term\";\n $response = $this->get($uri);\n if (!is_null($response)) {\n foreach ($response as $entry) {\n $courseResult = new CourseResult($entry);\n if ($search_term === $courseResult->sis_course_id) {\n return $courseResult;\n }\n }\n }\n return new CourseResult();\n }",
"public function courses()\n {\n return $this->hasMany('\\T4KModels\\Course')->orderBy('title');\n }",
"public function getCourses()\n {\n return $this->hasMany(Section::className(), ['course_id' => 'course_id', 'sec_id' => 'sec_id', 'semester' => 'semester', 'year' => 'year'])->viaTable('teaches', ['ID' => 'ID']);\n }",
"public function frontpage_my_courses() {\n\n global $USER, $CFG, $DB;\n $content = html_writer::start_tag('div', array('class' => 'frontpage-enrolled-courses') );\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('mycourses'));\n $coursehtml = parent::frontpage_my_courses();\n if ($coursehtml == '') {\n\n $coursehtml = \"<div id='mycourses'><style> #frontpage-course-list.frontpage-mycourse-list { display:none;}\";\n $coursehtml .= \"</style></div>\";\n }\n $content .= $coursehtml;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n\n return $content;\n }",
"public function courses()\t{\n\t\treturn $this->hasMany('Course');\n\t}",
"public static function courses()\n {\n return Course::all()->toArray();\n }",
"public static function getCourses()\n {\n global $cont;\n $courses = $cont->prepare(\"SELECT courses.id AS courseId , courses.title AS title , courses.price AS price , courses.body AS body , courses.image AS `image` , categories.name AS catName FROM courses INNER JOIN categories ON courses.catagory_id = categories.id\");\n $courses->execute();\n return $courses;\n }",
"public function meCourses()\n {\n return Course::where('user_id', Auth::user()->id)->simplePaginate(10);\n }",
"function get_sections($crn,$term,$course) {\n global $dbh;\n \n // get all courses offered in same term with same course name\n $query = 'SELECT term_code,crn FROM courses WHERE term_code = ? and concat(subject_code,\" \",course_number) = ? ORDER BY section_number';\n \n $resultset = prepared_query($dbh, $query, array($term,$course));\n \n $sections = array();\n while ($row = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n // if the CRN does not match current course, add it as a different section\n if ($row['crn'] != $crn) $sections[] = '<a href=\"javascript:void(0);\" onclick=\"getDetail('.$row['term_code'].','.$row['crn'].')\">'.$row['crn'].'</a>';\n }\n return $sections; \n}",
"public function getAllCourses()\n {\n $courses = TableRegistry::getTableLocator()->get('Courses');\n $courses = $courses->find('all')->distinct('id')->toArray();\n return $courses;\n }",
"function local_mediacore_fetch_courses() {\n global $DB;\n $query = \"SELECT *\n FROM {course}\n WHERE format != :format\n AND visible = :visible\n ORDER BY shortname ASC\";\n return $DB->get_records_sql($query, array(\n 'format' => 'site',\n 'visible' => '1',\n ));\n}",
"public function getCourses($online_only = false)\n {\n $query = '';\n if ($this->parent_target_group instanceof self) {\n // If object IS a child\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_2_categories AS c2c ON c2c.course_id = courses.course_id '\n .'WHERE c2t.target_group_id = '. $this->parent_target_group->target_group_id .' '\n .'AND c2c.category_id = '. $this->target_group_id .' ';\n } else {\n // If object is NOT a child\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id '\n .'WHERE c2t.target_group_id = '. $this->target_group_id .' ';\n }\n if ($online_only) {\n $query .= \"AND online_status = 'online' \"\n .'AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .') ';\n }\n $query .= 'GROUP BY course_id '\n .'ORDER BY date_start, name';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n $courses = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $courses[] = new Course((int) $result->getValue('course_id'));\n $result->next();\n }\n return $courses;\n }",
"public function actionCourses()\n\t{\n\t\t//echo \"In Courses\";\n\t\tif (!isset($_REQUEST['username'])){\n\t\t\t$_REQUEST['username'] = Yii::app()->user->name;\n\t\t}\n\t\t//if (!Yii::app()->user->checkAccess('admin')){\n\t\t//\t$this->model=User::model()->findByPk(Yii::app()->user->name);\n\t\t//} else {\n\t\t\t$this->model = DrcUser::loadModel();\n\t\t\t//}\n\t\t//$title = \"Title\";\n\t\t//$contentTitle = \"Courses: title\";\n\t\t$title = \"({$this->model->username}) {$this->model->first_name} {$this->model->last_name}\";\n\t\t$contentTitle = \"Courses: {$this->model->term->description}\";\n\t\tif (!Yii::app()->user->checkAccess('admin') && !Yii::app()->user->checkAccess('staff')){\n\t\t\t$title = $this->model->term->description;\n\t\t\t$contentTitle = \"Courses\";\n\t\t}\n\t\t$this->renderView(array(\n\t\t\t'title' => $title,\n\t\t\t'contentView' => '../course/_list',\n\t\t\t'contentTitle' => $contentTitle,\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t\t'menuRoute' => 'drcUser/courses',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('drcUser/update', array('term_code'=> $this->model->term_code, 'username'=>$this->model->username)) . '\"><i class=\"icon-plus\"></i> User Profile</a>',\n\t\t));\n\t}",
"protected function showmycourses() {\n global $USER, $PAGE;\n\n // Create a navigation cache to point at the same node as the main navigation\n // cache\n $cache = new navigation_cache('navigation');\n\n // If the user isn't logged in or is a guest we don't want to display anything\n if (!isloggedin() || isguestuser()) {\n return false;\n }\n\n // Check the cache to see if we have loaded my courses already\n // there is a very good chance that we have\n if (!$cache->cached('mycourses')) {\n $cache->mycourses = get_my_courses($USER->id);\n }\n $courses = $cache->mycourses;\n\n // If no courses to display here, return before adding anything\n if (!is_array($courses) || count($courses)==0) {\n return false;\n }\n\n // Add a branch labelled something like My Courses\n $mymoodle = $PAGE->navigation->get('mymoodle', navigation_node::TYPE_CUSTOM);\n $mycoursesbranch = $mymoodle->add(get_string('mycourses'), null,navigation_node::TYPE_CATEGORY, null, 'mycourses');\n $PAGE->navigation->add_courses($courses, 'mycourses');\n $mymoodle->get($mycoursesbranch)->type = navigation_node::TYPE_CUSTOM;\n return true;\n }",
"function listDescendantCourses() {\n $courses = courselist_roftools::get_courses_from_parent_rofpath($this->getRofPathId());\n return array_keys($courses);\n }",
"public function getCursos($id){\n\t\treturn $this->query(\"SELECT fullname FROM mdl_course WHERE category = ? \",array($id));\n\t\t\n\t}",
"function get_all_courses()\n {\n $this->db->select('cs.*,cat.name as category');\n $this->db->from('courses as cs');\n $this->db->join('courses_categories_gp as cc', 'cc.course_id=cs.id');\n $this->db->join('categories as cat', 'cat.id=cc.category_id');\n $this->db->where('cat.status', 1);\n $this->db->where('cs.status', 1);\n $this->db->order_by('cs.sort_order', 'asc');\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n $courses = $query->result();\n return $courses;\n }\n return false;\n }",
"public function subcategoriascie10()\n {\n $parametros = Input::only('term');\n\n $data = SubCategoriasCie10::where(function($query) use ($parametros) {\n $query->where('codigo','LIKE',\"%\".$parametros['term'].\"%\")\n ->orWhere('nombre','LIKE',\"%\".$parametros['term'].\"%\");\n });\n\n $data = $data->get();\n return $this->respuestaVerTodo($data);\n }",
"function get_all_courses()\n\t{\n\t\t// fetch all data\n\t\treturn $this->db->query('SELECT * FROM courses')->result_array();\n\t}",
"public function courses() {\n return $this->hasMany('App\\Course', 'schoolYearID', 'schoolYearID');\n }",
"public function courses()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = business_id, localKey = id)\n \treturn $this->hasMany(Course::class);\n }",
"public function getCoursesByFieldId($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_course';\n\t\t\t$select_what\t= 'id, vc_course AS vc_name';\n\t\t\t$conditions\t\t= \"id_field = {$id} ORDER BY vc_course ASC\";\n\t\t\t$return\t\t\t= ($id) ? $db->getAllRows_Arr($table, $select_what, $conditions) : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }",
"protected function getCourseSubCategories(Request $request){\n \t$id = InputSanitise::inputInt($request->get('id'));\n \tif(isset($id)){\n \t\treturn CourseSubCategory::getCourseSubCategoriesByCategoryId($id);\n \t}\n }",
"public function scopeCourses($query, Course $course)\n\t{\n\t\treturn $query->where('course_id', '=', $course->id);\n\t}",
"public function coursesCategoryList()\n { \n return CourseCategories::all();\n }",
"function get_child_contexts($context) {\n\n global $CFG;\n $children = array();\n\n switch ($context->contextlevel) {\n\n case CONTEXT_BLOCK:\n // No children.\n return array();\n break;\n\n case CONTEXT_MODULE:\n // No children.\n return array();\n break;\n\n case CONTEXT_GROUP:\n // No children.\n return array();\n break;\n\n case CONTEXT_COURSE:\n // Find all block instances for the course.\n $page = new page_course;\n $page->id = $context->instanceid;\n $page->type = 'course-view';\n if ($blocks = blocks_get_by_page_pinned($page)) {\n foreach ($blocks['l'] as $leftblock) {\n if ($child = get_context_instance(CONTEXT_BLOCK, $leftblock->id)) {\n array_push($children, $child->id);\n }\n }\n foreach ($blocks['r'] as $rightblock) {\n if ($child = get_context_instance(CONTEXT_BLOCK, $rightblock->id)) {\n array_push($children, $child->id);\n }\n }\n }\n // Find all module instances for the course.\n if ($modules = get_records('course_modules', 'course', $context->instanceid)) {\n foreach ($modules as $module) {\n if ($child = get_context_instance(CONTEXT_MODULE, $module->id)) {\n array_push($children, $child->id);\n }\n }\n }\n // Find all group instances for the course.\n if ($groupids = groups_get_groups($context->instanceid)) {\n foreach ($groupids as $groupid) {\n if ($child = get_context_instance(CONTEXT_GROUP, $groupid)) {\n array_push($children, $child->id);\n }\n }\n }\n return $children;\n break;\n\n case CONTEXT_COURSECAT:\n // We need to get the contexts for:\n // 1) The subcategories of the given category\n // 2) The courses in the given category and all its subcategories\n // 3) All the child contexts for these courses\n\n $categories = get_all_subcategories($context->instanceid);\n\n // Add the contexts for all the subcategories.\n foreach ($categories as $catid) {\n if ($catci = get_context_instance(CONTEXT_COURSECAT, $catid)) {\n array_push($children, $catci->id);\n }\n }\n\n // Add the parent category as well so we can find the contexts\n // for its courses.\n array_unshift($categories, $context->instanceid);\n\n foreach ($categories as $catid) {\n // Find all courses for the category.\n if ($courses = get_records('course', 'category', $catid)) {\n foreach ($courses as $course) {\n if ($courseci = get_context_instance(CONTEXT_COURSE, $course->id)) {\n array_push($children, $courseci->id);\n $children = array_merge($children, get_child_contexts($courseci));\n }\n }\n }\n }\n return $children;\n break;\n\n case CONTEXT_USER:\n // No children.\n return array();\n break;\n\n case CONTEXT_PERSONAL:\n // No children.\n return array();\n break;\n\n case CONTEXT_SYSTEM:\n // Just get all the contexts except for CONTEXT_SYSTEM level.\n $sql = 'SELECT c.id '.\n 'FROM '.$CFG->prefix.'context AS c '.\n 'WHERE contextlevel != '.CONTEXT_SYSTEM;\n\n $contexts = get_records_sql($sql);\n foreach ($contexts as $cid) {\n array_push($children, $cid->id);\n }\n return $children;\n break;\n\n default:\n error('This is an unknown context (' . $context->contextlevel . ') in get_child_contexts!');\n return false;\n }\n}",
"function cicleinscription_get_courses_by_cicle_and_courseid($courseid, $cicleinscriptionid){\n\tglobal $DB;\n\t$sql = \"SELECT\n\t\t\t\tccp.*,\n\t\t\t\tc.fullname,\n\t\t\t\tc.shortname\n\t\t\tFROM \n\t\t\t\tmdl_ci_course_prematriculation as ccp\n\t\t\tINNER JOIN\n\t\t\t\tmdl_course c\n\t\t\tON\n\t\t\t\tc.id = ccp.courseid\n\t\t\tWHERE \n\t\t\t\tccp.cicleinscriptionid = ? AND ccp.courseid = ?\";\n\treturn $DB->get_record_sql($sql, array($cicleinscriptionid, $courseid));\n}",
"public function GetCourses()\n\t\t{\n $course_students = CourseStudent::GetAll(['student_id' => $this->GetAttribute(static::$primary_key)]);\n $courses = array();\n\n foreach ($course_students as $course_student) {\n $courses[] = Course::GetFromPrimaryKey($course_student->GetAttribute('course_id'));\n }\n\n return $courses;\n\t\t}",
"private function getCourses($year, $quarter, $em, $parents) {\n if (!$parents) {\n $repo = $em->getRepository('CCDataBundle:Curriculum');\n $parents = $repo->findBy(array());\n }\n\n $courses = [];\n // for each curricula\n foreach($parents as $curriculum) {\n\n // get all courses\n $url = 'https://ws.admin.washington.edu/student/v4/public/course.json'.\n '?year='.$year.\n '&quarter='.$quarter.\n '&future_terms=0'.\n '&curriculum_abbreviation='.rawurlencode($curriculum->getAbbreviation()).\n '&page_size=500';\n $data = $this->getJsonObject($url);\n\n // then split each \n $courseChunks = array_chunk($data->Courses, 100);\n foreach($courseChunks as $courseChunk) {\n $urlArray = [];\n foreach($courseChunk as $chunk) {\n $courseUrl = 'https://ws.admin.washington.edu/student/v4/public/course/'.\n $year.','.\n $quarter.','.\n rawurlencode($curriculum->getAbbreviation()).','.\n $chunk->CourseNumber.'.json';\n $urlArray[] = $courseUrl;\n }\n $result = $this->getJsonObjects($urlArray);\n\n foreach($result as $course) {\n $crs = new Course();\n $crs->setNumber($course->CourseNumber)\n ->setTitle($course->CourseTitle)\n ->setLongTitle($course->CourseTitleLong)\n ->setCurriculum($curriculum)\n ->setDescription($course->CourseDescription)\n ->setCreditControl($course->CreditControl)\n ->setGradingSystem($course->GradingSystem)\n ->setMaxCredits($course->MaximumCredit)\n ->setMaxTermCredits($course->MaximumTermCredit)\n ->setMinTermCredits($course->MinimumTermCredit)\n ->setGenEd($course->GeneralEducationRequirements);\n $em->merge($crs);\n\n $courses[] = $crs;\n }\n }\n $em->flush();\n }\n return $courses;\n }",
"public static function get_all_courses() {\n\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $courses = glueserver_course_db::glueserver_get_all_courses();\n $returns = array();\n foreach ($courses as $course) {\n $course = new glueserver_course($course);\n $returns[] = $course->get_data();\n }\n return $returns;\n }",
"public function search_by_category($searchString)\n {\n $courses = Course::search($searchString)\n ->within('GTACourses_Categories')\n ->raw();\n return $courses;\n }",
"public function get_course($params) {\n global $DB, $CFG;\n\n require_once($CFG->dirroot . '/local/intelliboard/locallib.php');\n\n $rolefilter = new in_filter($this->get_teacher_roles(), \"trole\");\n $teachersSelect = get_operator(\n 'GROUP_CONCAT',\n \"CONCAT(u.firstname, ' ', u.lastname)\",\n ['separator' => ', ']\n );\n\n $course = $DB->get_record_sql(\n \"SELECT c.*,\n {$teachersSelect} as teachers\n FROM {course} c\n JOIN {context} cx ON cx.instanceid = c.id AND\n cx.contextlevel = :coursecx\n LEFT JOIN {role_assignments} ra ON ra.roleid \" . $rolefilter->get_sql() . \" AND\n ra.contextid = cx.id\n LEFT JOIN {user} u ON u.id = ra.userid\n WHERE c.id = :courseid\n GROUP BY c.id\",\n array_merge(['courseid' => $params['courseid'], 'coursecx' => CONTEXT_COURSE], $rolefilter->get_params())\n );\n\n if($course) {\n $course->url = (\n new moodle_url('/course/view.php', ['id' => $course->id])\n )->out();\n } else {\n return new \\stdClass();\n }\n\n return $course;\n }",
"public function getcoursesByid_course ($id_course){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM courses \";\n $sqlQuery .= \" WHERE id_course= $id_course \";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }",
"public function getByCriteria() {\n $ret = array();\n $sql = \"SELECT DISTINCT C.courseID FROM Course C INNER JOIN Section S ON C.courseID=S.courseID WHERE S.sessionYear = :sessionYear AND S.sessionCode = :sessionCode AND S.term = :term\";\n $params = array(':sessionCode' => $this->code, ':sessionYear' => $this->year, ':term' => $this->term);\n foreach($this->filters as $name => $val) {\n $sql .= ' AND '.$name.'=:'.$name;\n $params[':'.$name] = $val;\n }\n $stmt = $this->conn->prepare($sql);\n $stmt->execute($params);\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $ret[] = new Course($row['courseID'], $this->head);\n echo $row['courseID'];\n }\n return $ret;\n return (!empty($ret)) ? $ret : false;\n }",
"public function getCoursesByTag($categoria)\n {\n $db = new MainModel();\n $query = \"select c.id as idCurso, c.name as nombreCurso, c.picture as imagen, CONCAT(u.name, ' ',u.lastname) as nombreAsesor,\n mt.name as subcategoria from course_tag as ct inner join courses as c on ct.course_id = c.id inner join users as u on c.user_id = u.id \n inner join tags as t on ct.tag_id = t.id inner join maintags as mt on t.mainTag_id = mt.id WHERE mt.id =\" . $categoria;\n return $response = $db->consultQueryAll($query);\n }",
"function get_all_courses_category_wise($category)\n {\n $this->db->select('cs.*,cat.name as category');\n $this->db->from('courses as cs');\n $this->db->join('courses_categories_gp as cc', 'cc.course_id=cs.id');\n $this->db->join('categories as cat', 'cat.id=cc.category_id');\n $this->db->where('cat.seo_url', $category);\n $this->db->where('cat.status', 1);\n $this->db->where('cs.status', 1);\n $this->db->order_by('cs.sort_order', 'asc');\n $query = $this->db->get();\n // return $this->db->last_query();\n if ($query->num_rows() > 0) {\n $courses = $query->result();\n return $courses;\n }\n return false;\n }",
"function getCourseCategoryByCourseId($id){\n $select=$this->select()->where(\" courseid = ?\",$id);\n return $this->fetchAll($select)->toArray();\n }",
"public function courseList()\n {\n return $this->belongTo(CourseList::class);\n }",
"public function frontpage_available_courses() {\n global $CFG, $DB;\n\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')));\n\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\n if (!$totalcount &&\n !$this->page->user_is_editing() &&\n has_capability('moodle/course:create', \\context_system::instance())\n ) {\n // Print link to create a new course, for the 1st available category.\n return $this->add_new_course_button();\n }\n $latestcard = get_config('theme_remui', 'enablenewcoursecards');\n $coursehtml = '<div class=\"\">\n <div class=\"card-deck slick-course-slider slick-slider ' . ($latestcard ? 'latest-cards' : '') . '\">';\n\n if (!empty($courses)) {\n foreach ($courses as $course) {\n $coursesummary = strip_tags($chelper->get_course_formatted_summary(\n $course,\n array('overflowdiv' => false, 'noclean' => false, 'para' => false)\n ));\n $coursesummary = strlen($coursesummary) > 100 ? substr($coursesummary, 0, 100).\"...\" : $coursesummary;\n $image = \\theme_remui_coursehandler::get_course_image($course, 1);\n $coursename = strip_tags($chelper->get_course_formatted_name($course));\n if (!$latestcard) {\n $coursehtml .= \"\n <div class='card w-100 rounded-bottom mx-0 bg-transparent d-inline-flex flex-column' style='height: 100%;'>\n <div class='m-2 bg-white border' style='height: 100%;'>\n <div\n class='rounded-top'\n style='height: 200px;\n background-image: url({$image});\n background-size: cover;\n background-position: center;\n box-shadow: 0 2px 5px #cccccc;'>\n </div>\n <div class='card-body p-3'>\n <h4 class='card-title m-1 ellipsis ellipsis-2'>\n <a\n href='{$CFG->wwwroot}/course/view.php?id={$course->id}'\n class='font-weight-400 blue-grey-600 font-size-18'>\n {$coursename}\n </a>\n </h4>\n <p class='card-text m-1'>{$coursesummary}</p>\n </div>\n </div>\n </div>\";\n } else {\n if (isset($course->startdate)) {\n $startdate = date('d M, Y', $course->startdate);\n $day = substr($startdate, 0, 2);\n $month = substr($startdate, 3, 3);\n $year = substr($startdate, 8, 4);\n }\n $categoryname = $DB->get_record('course_categories', array('id' => $course->category))->name;\n $categoryname = strip_tags(format_text($categoryname));\n $coursehtml .= \"\n <div class='px-1 course_card card '>\n <div class='wrapper h-100'\n style='background-image: url({$image});\n background-size: cover;\n background-position: center;\n position: relative;'>\n <div class='date btn-primary'>\n <span class='day'>{$day}</span>\n <span class='month'>{$month}</span>\n <span class='year'>{$year}</span>\n </div>\n <div class='data'>\n <div class='content' title='{$coursename}'>\n <span class='author'>{$categoryname}</span>\n <h4 class='title ellipsis ellipsis-3' style='-webkit-box-orient: vertical;visibility: visible;'>\n <a href='{$CFG->wwwroot}/course/view.php?id={$course->id}'>{$coursename}</a>\n </h4>\n <p class='text'>{$coursesummary}</p>\n </div>\n </div>\n </div>\n </div>\";\n }\n }\n }\n\n $coursehtml .= '</div></div>';\n\n $coursehtml .= \" <div class='available-courses button-container w-100 text-center '>\n <button type='button' class='btn btn-floating btn-primary btn-prev btn-sm'>\n <i class='icon fa fa-chevron-left' aria-hidden='true'></i>\n </button>\n <button type='button' class='btn btn-floating btn-primary btn-next btn-sm'>\n <i class='icon fa fa-chevron-right' aria-hidden='true'></i>\n </button>\n </div>\";\n\n $coursehtml .= \"\n <div class='row'>\n <div class='col-12 text-right'>\n <a href='{$CFG->wwwroot}/course' class='btn btn-primary'>\" . get_string('viewallcourses', 'core').\"</a>\n </div>\n </div>\";\n\n return $coursehtml;\n }",
"public function courses()\n {\n return $this->hasMany('App\\Course');\n }",
"public function getallCategories(){\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = '*';\n\t \treturn $terms = NeCategory::model()->findAll($criteria);\n\t}",
"public function findcoursesByString ( $str ){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM courses \";\n $sqlQuery .= \" WHERE description LIKE % $str %\";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }",
"function getCourseWikiList() {\n return $this->getWikiListByGroup(0);\n }",
"public function my_courses_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->my_courses_get($logged_in_user_details['user_id']);\n }else{\n\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"function cicleinscription_get_all_courses_visible($cicleinscriptionid){\n\tglobal $DB;\n\t$sort = 'c.fullname ASC';\n\t$visibility = 1;\n\t\n\t$courses = $DB->get_records_sql(\"\n\t\tSELECT\n\t\t\tc.id,\n\t\t\tc.shortname,\n\t\t\tc.fullname,\n\t\t\tcc.name as catname,\n\t\t\tcc.id as catid\n\t\tFROM\n\t\t\t{course} c\n\t\tINNER JOIN\n\t\t\t{course_categories} cc\n\t\tON c.category = cc.id\n\t\tWHERE\n\t\t\tc.id NOT IN (\n\t\t\tSELECT \n\t\t\t\tcourseid\n\t\t\tFROM \n\t\t\t\t{ci_course_prematriculation}\n\t\t\tWHERE \n\t\t\t\tcicleinscriptionid = ?)\n\t\tAND\n\t\t\tc.visible = ?\n\t\tORDER BY {$sort}\", array($cicleinscriptionid, $visibility));\n\t\n\treturn $courses;\n}",
"public static function get_courses($category) {\n global $DB, $CFG;\n\n\n $params = self::validate_parameters(self::get_courses_parameters(), array(\n 'categoryid' => $category,\n ));\n if (!$category) {\n return array(array('id' => 0, 'fullname' => get_string('all')));\n }\n $category = $DB->get_record('course_categories', array('id' => $category), '*', MUST_EXIST);\n $courses = get_courses($category->id);\n foreach ($courses as $c) {\n if (!$c->visible) {\n unset($courses[$c->id]);\n }\n }\n return $courses;\n }",
"public function category_wise_course_get($category_id) {\n\t\t$category_details = $this->crud_model->get_category_details_by_id($category_id)->row_array();\n\n\t\tif ($category_details['parent'] > 0) {\n\t\t\t$this->db->where('sub_category_id', $category_id);\n\t\t}else {\n\t\t\t$this->db->where('category_id', $category_id);\n\t\t}\n\t\t$this->db->where('status', 'active');\n\t\t$courses = $this->db->get('course')->result_array();\n\n\t\t// This block of codes return the required data of courses\n\t\t$result = array();\n\t\t$result = $this->course_data($courses);\n\t\treturn $result;\n\t}",
"public static function getLatestCoursesForPageSidebar()\n {\n return Yii::$app->db->cache(function ($db) {\n return Kurs::find()\n ->recently(6)\n ->active()\n ->with([\n 'user' => function ($query) {\n return $query->select(['id', 'firstname', 'lastname']);\n },\n ])\n// ->select('id,title,published_at,image,user_id,slug')\n// ->asArray()\n ->all();\n }, null, new TagDependency(['tags' => ['user', 'kurs']]));\n }",
"public function get_course_categories($instructor_id){\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->TABLENAME);\n\t\t$this->db->where('instructor_id', $instructor_id);\n\t\t$this->db->join('course_category', \"course_category.category_id = $this->TABLENAME.category_id\");\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}",
"public function getCourseList()\n {\n $course_list = [];\n\n foreach($this->sections as $section)\n {\n $course_list[$section->getCourseId()] = $section->course_subject.' '.$section->course_number.' '.$section->course_name;\n }\n\n return $course_list;\n }",
"public function get_categories() {\n global $DB;\n $categories = array();\n $results = $DB->get_records('course_categories', array('parent' => '0', 'visible' => '1', 'depth' => '1'));\n if (!empty($results)) {\n foreach ($results as $value) {\n $categories[$value->id] = $value->name;\n }\n }\n return $categories;\n }",
"public function getCoursesAttribute(){\n $semesters = $this->program_semesters;\n $courses = new Collection();\n foreach($semesters as $semester){\n $sem = ProgramSemester::with('courses')->findOrFail($semester->id);\n foreach($sem->courses as $course){\n $courses->push($course);\n }\n }\n return $courses;\n }",
"public function courses( $id ){\r\n $select = \"SELECT `courses`.`id`, `courses`.`name` \r\n FROM `courses`\r\n LEFT JOIN `enrollment`\r\n ON `enrollment`.`course_id` = `courses`.`id`\r\n WHERE `enrollment`.`student_id`=:id\";\r\n $sth = $this->db->pdo->prepare($select );\r\n $sth->bindParam( ':id', $id );\r\n $sth->execute();\r\n $result = $sth->fetchAll( PDO::FETCH_ASSOC );\r\n return $result;\r\n }",
"public function get_all_courses_record() {\n $slct_query =\"SELECT * FROM courses WHERE course_deleted='0'\";\n $slct_exe =mysqli_query($GLOBALS['con'],$slct_query) or die(mysqli_error($GLOBALS['con']));\n return $slct_exe; //returning all the courses records\n }",
"public function getAllCourses()\n {\n $courses = $this->courseRepository->getAllCourses();\n if (isset($courses['errorMsg'])) {\n $courses = $this->makeEmptyCollection();\n }\n\n return view('front-end.courses.list', ['courses' => $courses]);\n }",
"public function get_all_courses_by_id($id) {\n $slct_query =\"SELECT * FROM courses WHERE course_id='$id' AND course_deleted='0'\";\n $slct_exe =mysqli_query($GLOBALS['con'],$slct_query) or die(mysqli_error($GLOBALS['con']));\n return $slct_exe;// return the record\n }",
"public function courses() {\n\t\treturn $this->belongsToMany('Course')->withPivot('course_role')->orderBy('id');\n\t}",
"private function get_users_courses($userid, $roleid = null) {\n global $DB;\n\n $values = array(\n $userid\n );\n\n $sql = 'SELECT DISTINCT\n crs.id,\n crs.fullname\n FROM {role_assignments} ra\n JOIN {context} ct ON ct.id = ra.contextid\n JOIN {course} crs ON crs.id = ct.instanceid\n WHERE ra.userid = ?';\n\n if ($categorycontext = $this->userdirectory->get_category_context()) {\n $path = $categorycontext->path . '/%';\n $sql .= \" AND ct.path LIKE ?\";\n $values[] = $path;\n }\n\n if (!is_null($roleid)) {\n $sql .= ' AND ra.roleid = ? ';\n $values[] = $roleid;\n }\n\n $sql .= 'ORDER BY crs.fullname';\n\n return $DB->get_records_sql($sql, $values);\n }",
"function i4_get_assigned_courses($user_id) {\n global $wpcwdb, $wpdb;\n\n $wpdb->show_errors();\n //SELECT `course_title` FROM `wp_wpcw_user_courses` LEFT JOIN wp_wpcw_courses ON wp_wpcw_user_courses.course_id=wp_wpcw_courses.course_id WHERE `user_id`= 3\n\n $SQL = $wpdb->prepare(\"SELECT $wpcwdb->courses.course_id, $wpcwdb->courses.course_title FROM $wpcwdb->user_courses LEFT JOIN $wpcwdb->courses ON $wpcwdb->user_courses.course_id=$wpcwdb->courses.course_id WHERE user_id = %d ORDER BY LOWER($wpcwdb->courses.course_title)\", $user_id);\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }",
"public function courses()\n {\n return $this->hasMany('App\\Models\\Course');\n }",
"private function init_category_and_course() {\n global $DB;\n\n // Category.\n $category = new stdClass;\n $category->name = 'category';\n $category->id = $DB->insert_record('course_categories', $category);\n context_coursecat::instance($category->id);\n\n // Course.\n $coursedata = new stdClass;\n $coursedata->category = $category->id;\n $coursedata->fullname = 'fullname';\n $course = create_course($coursedata);\n\n return context_course::instance($course->id);\n }",
"function cl_woo_get_cat_filter_children( $parent_term_id = null ) {\n\n\t$output = array();\n\t$child_terms = null;\n\n\t//Get children of this term\n\t$child_terms = Prso_Woocom::get_product_terms(\n\t\tarray(\n\t\t\t'parent' => $parent_term_id,\n\t\t)\n\t);\n\n\tif ( isset( $child_terms->terms ) && ! empty( $child_terms->terms ) ) {\n\n\t\tforeach ( $child_terms->terms as $key => $grandchild_term ) {\n\n\t\t\t$child_terms->terms[ $key ]->children = cl_woo_get_cat_filter_children( $grandchild_term->term_id );\n\n\t\t}\n\n\t\t$output = $child_terms->terms;\n\n\t}\n\n\treturn $output;\n}",
"public static function sq_selectSubjectsCourse()\n {\n return \"SELECT corsi.PK_id, corsi.nome AS c_name, lauree.nome AS l_name\n FROM corsi INNER JOIN lauree ON corsi.FK_laurea = lauree.PK_id\";\n }",
"public static function get_courses_list( $max = '-1' ) {\n\t\t$courses = self::get_courses( $max );\n\t\t$options = array(\n\t\t\t'' => __( 'All Courses', 'ibx-wpfomo' ),\n\t\t);\n\n\t\tforeach ( $courses as $course ) {\n\t\t\t$options[ $course->ID ] = $course->post_title;\n\t\t}\n\n\t\treturn $options;\n\t}",
"function prepare_get_filtred_course_list($filter = array())\n{\n $tbl_mdb_names = claro_sql_get_main_tbl();\n\n $sqlFilter = array();\n // Prepare filter deal with KEY WORDS classification call\n if (isset($filter['search']))\n $sqlFilter[] = \"( co.`intitule` LIKE '%\". claro_sql_escape(pr_star_replace($filter['search'])) .\"%'\" . \"\\n\"\n . \" OR co.`administrativeNumber` LIKE '%\". claro_sql_escape(pr_star_replace($filter['search'])) .\"%'\" . \"\\n\"\n . \")\";\n \n \n // Create the WHERE clauses\n $sqlFilter = sizeof($sqlFilter) ? \"WHERE \" . implode(\" AND \",$sqlFilter) : \"\";\n \n // Build the complete SQL request\n $sql = \"SELECT co.`cours_id` AS `id`, \" . \"\\n\"\n . \"co.`administrativeNumber` AS `officialCode`, \" . \"\\n\"\n . \"co.`intitule` AS `intitule`, \" . \"\\n\"\n . \"co.`code` AS `sysCode`, \" . \"\\n\"\n . \"co.`sourceCourseId` AS `sourceCourseId`, \" . \"\\n\"\n . \"co.`isSourceCourse` AS `isSourceCourse`, \" . \"\\n\"\n . \"co.`visibility` AS `visibility`, \" . \"\\n\"\n . \"co.`access` AS `access`, \" . \"\\n\"\n . \"co.`registration` AS `registration`, \" . \"\\n\"\n . \"co.`registrationKey` AS `registrationKey`, \" . \"\\n\"\n . \"co.`directory` AS `repository`, \" . \"\\n\"\n . \"co.`status` AS `status` \" . \"\\n\"\n . \"FROM `\" . $tbl_mdb_names['course'] . \"` AS co \" . \"\\n\"\n . $sqlFilter ;\n \n return $sql;\n}",
"public function testTermQueryWithChildTerm() {\n\n\t\t$parent_id = $this->createTermObject( [\n\t\t\t'name' => 'Parent Category',\n\t\t\t'taxonomy' => 'category',\n\t\t] );\n\n\t\t$child_id = $this->createTermObject( [\n\t\t\t'name' => 'Child category',\n\t\t\t'taxonomy' => 'category',\n\t\t\t'parent' => $parent_id,\n\t\t] );\n\n\t\t$global_parent_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $parent_id );\n\t\t$global_child_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $child_id );\n\n\t\t$query = \"\n\t\tquery {\n\t\t\tcategory(id: \\\"{$global_parent_id}\\\") {\n\t\t\t\tid\n\t\t\t\tcategoryId\n\t\t\t\tchildren {\n\t\t\t\t\tnodes {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tcategoryId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\";\n\n\t\t$actual = do_graphql_request( $query );\n\n\t\t$expected = [\n\t\t\t'data' => [\n\t\t\t\t'category' => [\n\t\t\t\t\t'id' => $global_parent_id,\n\t\t\t\t\t'categoryId' => $parent_id,\n\t\t\t\t\t'children' => [\n\t\t\t\t\t\t'nodes' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'id' => $global_child_id,\n\t\t\t\t\t\t\t\t'categoryId' => $child_id,\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$this->assertEquals( $expected, $actual );\n\n\t}",
"public function getRecentCreatedCoursesBySubject(string $subject)\n {\n $result = $this\n ->_model\n ->whereHas('subjects', function ($query) use ($subject) {\n $query->where('slug', $subject);\n })\n ->orderBy('created_at', 'desc')\n ->get();\n\n return $result;\n }",
"function gen_course_list( $strfilter = '', $arrayfilter = NULL, $filtinvert = false )\n{\n $courselist = array();\n $catcnt = 0;\n // get the list of course categories\n $categories = get_categories();\n foreach ($categories as $cat) {\n // for each category, add the <optgroup> to the string array first\n $courselist[$catcnt] = '<optgroup label=\"'.htmlspecialchars( $cat->name ).'\">';\n // get the course list in that category\n $courses = get_courses($cat->id, 'c.sortorder ASC', 'c.fullname, c.id');\n $coursecnt = 0;\n\n // for each course, check the specified filter\n foreach ($courses as $course) {\n if (( !empty($strfilter) && strripos($course->fullname, $strfilter) === false ) || ( $arrayfilter !== NULL && in_array($course->id, $arrayfilter) === $filtinvert )) {\n continue;\n }\n // if we pass the filter, add the option to the current string\n $courselist[$catcnt] .= '<option value=\"'.$course->id.'\">'.$course->fullname.'</option>';\n $coursecnt++;\n }\n\n // if no courses pass the filter in that category, delete the current string\n if ($coursecnt == 0) {\n unset($courselist[$catcnt]);\n } else {\n $courselist[$catcnt] .= '</optgroup>';\n $catcnt++;\n }\n }\n\n // return the html code with categorized courses\n return implode(' ', $courselist);\n}",
"public function getCourses($conn){\n $courses = [];\n $courses = CourseModel::getCourses($conn);\n return $courses;\n \n }",
"public function get_all_courses() {\n\t\t$sql = \"SELECT course_id FROM peducator_courses \n\t\tWHERE peducator_id='$this->peducator_id'\";\n\t\t$result = mysqli_query($this->connect_to_db, $sql);\n\n\t\t$arr = [];\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\tarray_push($arr, get_course($row['course_id']));\n\t\t}\n\n\t\treturn $arr;\n\n\t}",
"public function search(Request $request){\n\n // Get all courses the user is currently registered in\n $user = User::find(Auth::user()->id);\n $registered_courses = $user->courses()->get();\n\n // validate the user input\n $this->validate($request, ['search_input' => 'required',]);\n $input = $request->input(\"search_input\");\n\n $courses = array();\n\n // find the courses associated with the user input\n $courses_by_name = Course::where('class', 'ilike', '%'.$input.'%')->get();\n $courses_by_title = Course::where('title', 'ilike', '%'.$input.'%')->get();\n\n // courses information by course name\n foreach($courses_by_name as $cbn){\n if(!in_array($cbn, $courses)){\n if($registered_courses->where('title', $cbn->title)->count() === 0){\n $item = array();\n $item['id'] = $cbn->id;\n $item['class'] = $cbn->class;\n $item['section'] = $cbn->section;\n $item['title'] = $cbn->title;\n $item['teacher'] = \"\";\n $courses[] = $item;\n }\n }\n }\n\n // courses information by course title\n foreach($courses_by_title as $cbt){\n if(!in_array($cbt, $courses)){\n if($registered_courses->where('title', $cbt->title)->count() === 0){\n $item = array();\n $item['id'] = $cbt->id;\n $item['class'] = $cbt->class;\n $item['section'] = $cbt->section;\n $item['title'] = $cbt->title;\n $item['teacher'] = \"\";\n $courses[] = $item;\n }\n }\n }\n\n // courses information by course teacher's name\n $allCourses = Course::all();\n foreach ($allCourses as $aCourse){\n $found = $aCourse->teachers()\n ->where('name','ilike', \"%$input%\")\n ->get();\n if(count($found) > 0 && !in_array($aCourse, $courses)){\n if($registered_courses->where('title', $aCourse->title)->count() === 0) {\n $item = array();\n $item['id'] = $aCourse->id;\n $item['class'] = $aCourse->class;\n $item['section'] = $aCourse->section;\n $item['title'] = $aCourse->title;\n $item['teacher'] = $found[0]->name;\n $courses[] = $item;\n }\n }\n }\n\n $paginated_courses = $this->constructPagination($courses);\n\n return view('coursemanager.index', ['registered_courses' => $registered_courses, 'courses' => $paginated_courses,\n 'user' => $user,]);\n }",
"public function Search(Request $request)\n {\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n $input = Input::all();\n $input['search'] = strtolower($input['search']);\n $input['search'] = lcfirst($input['search']);\n $entries = collect();\n $col =$entries;\n $perPage = 6;\n $currentPageSearchResults = $col->slice(($currentPage - 1) * $perPage, $perPage)->all();\n $courses = new LengthAwarePaginator($currentPageSearchResults, count($col), $perPage);\n if (isset($input['category-id']) and $input['search']) {\n $category = Category::where('name', $input['category-id'])->first();\n $rs = Course::where('category_id', $category->id)->get();\n $cs = Course::whereHas('tags', function ($query) use ($input) {\n $query->where('tag_name', 'like', $input['search']);\n })->get();\n $entries = collect();\n foreach ($rs as $course) {\n foreach ($cs as $c) {\n $temp = Usecourse::where('activated',1)->whereHas('course', function ($query) use ($c) {\n $query->where('course_id', $c);\n })->orwhereHas('course', function ($query) use ($course) {\n $query->where('course_id', $course->id);\n })->get();\n $entries = $entries->merge($temp);\n $col =$entries;\n $currentPageSearchResults = $col->slice(($currentPage - 1) * $perPage, $perPage)->all();\n $courses = new LengthAwarePaginator($currentPageSearchResults, count($col), $perPage);\n }\n }\n } elseif ($input['search']) {\n $cs = Course::whereHas('tags', function ($query) use ($input) {\n $query->where('tag_name', 'like', $input['search']);\n })->get();\n $entries = collect();\n foreach ($cs as $c)\n {\n $temp = Usecourse::where('activated',1)->whereHas('course', function ($query) use ($c) {\n $query->where('course_id', $c->id);\n })->get();\n $entries = $entries->merge($temp);\n $col =$entries;\n\n $currentPageSearchResults = $col->slice(($currentPage - 1) * $perPage, $perPage)->all();\n $courses = new LengthAwarePaginator($currentPageSearchResults, count($col), $perPage);\n\n }\n } elseif(isset($input['category-id'])) {\n $category = Category::where('name', $input['category-id'])->first();\n $cs = Course::where('category_id', $category->id)->get();\n $entries = collect();\n foreach ($cs as $course) {\n $temp = Usecourse::where('activated',1)->whereHas('course', function ($query) use ($course) {\n $query->where('course_id', $course->id);\n })->get();\n $entries = $entries->merge($temp);\n $col =$entries;\n\n $currentPageSearchResults = $col->slice(($currentPage - 1) * $perPage, $perPage)->all();\n $courses = new LengthAwarePaginator($currentPageSearchResults, count($col), $perPage);\n }\n }else{\n $courses = Usecourse::paginate(6);\n }\n \n// $courses = Usecourse::whereHas('course', function ($query) use ($course) {\n// $query->where('course_id', $course->id);\n// });\n\n// $result = array();\n// $list = array();\n// $list[] = 0;\n// $courses = Course::whereHas('tags', function ($query) use ($input) {\n// $query->where('tag_name', 'like', $input['search']);\n// })->get();\n $categories = Category::all();\n foreach ($courses as $course) {\n $course['name'] = $course->course->name;\n $sections = $course->course->sections;\n $course['time'] = 0;\n foreach ($sections as $section) {\n $course['time'] = $course['time'] + $section->duration;\n\n }\n echo $course['duration'] . \"\\n\";\n // No Need For teachers Yet in index page\n// $counter=0;\n// foreach ($course->teachers as $teacher){\n// if($counter)\n// $course['teachers']=$course['teachers'].\",\".$teacher->name;\n// else\n// $course['teachers']=$teacher->name;\n// $counter++;\n// }\n $course['Durations'] = 0;\n $counter = 0;\n $time = 0;\n foreach ($course->course->sections as $section) {\n $counter++;\n $time += $section->time;\n }\n $course['duration'] = $time;\n $course['sections_count'] = $counter;\n $course['rate'] = -1;\n $check = 0;\n foreach ($course->reviews as $review) {\n if ($check == 0) {\n $course['rate'] = 0;\n $check = 1;\n }\n $course['rate'] += $review->pivot->rate;\n }\n if ($check == 1)\n $course['rate'] = $course['rate'] / count($course->reviews);\n $course['reviews_count'] = count($course->reviews);\n $course['category_name'] = $course->course->category->name;\n }\n $tags = Tag::all();\n $categories = Category::all();\n $teachers = Teacher::all();\n\n $popular_courses = Usecourse::whereHas('reviews', function ($q) {\n $q->where('rate', '>=', 5);\n })->paginate(3);\n\n// $popular_courses = Usecourse::whereHas('reviews', function ($q) {\n// $q->select(DB::raw('avg(rate) as avg_rate, course_id'))\n// ->groupBy('course_id')->having('avg_rate','>=',5);\n// })->get();\n\n foreach ($popular_courses as $course) {\n $course['name'] = $course->course->name;\n $sections = $course->course->sections;\n $course['time'] = 0;\n foreach ($sections as $section) {\n $course['time'] = $course['time'] + $section->duration;\n\n }\n echo $course['duration'] . \"\\n\";\n }\n\n return view('courses.courses-list')->with(['courses' => $courses, 'categories' => $categories, 'popular_courses' => $popular_courses]);\n }",
"function get_ta_courses($username){\n $result = srch_by_sam($username);\n if(is_null($result)){\n return NULL;\n } \n\n $sql_conn = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASSWD, DATABASE);\n if(!$sql_conn){\n return NULL;\n }\n \n $groups = $result[\"memberof\"];\n unset($groups[\"count\"]);\n\n $courses = array();\n foreach($groups as $group) { //Iterate groups the user is a member of\n $group_sam = dn_to_sam($group);\n if(is_null($group_sam)){\n continue; //In theory, this is not possible, but we'll check\n }\n\n #group_sam is returned from LDAP, so we won't worry about SQL injection here\n $query = \"SELECT course_name FROM courses WHERE ldap_group ='\".$group_sam.\"'\";\n $result = mysqli_query($sql_conn, $query);\n if(!mysqli_num_rows($result)){\n continue; //No class in the database with this ldap group\n }\n \n //possible multiple courses use the same ldap_group\n while($entry = mysqli_fetch_assoc($result)){\n $courses[] = $entry[\"course_name\"]; \n }\n }\n \n mysqli_close($sql_conn);\n return $courses;\n}",
"function cl_woo_prepare_cat_filter_data( $terms ) {\n\n\t//var\n\t$output = array();\n\n\tforeach ( $terms as $key => $term ) {\n\n\t\tif ( 'uncategorized' === $term->slug ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$output[ $key ] = $term;\n\n\t\t$child_terms = null;\n\n\t\t//Get children\n\t\t$output[ $key ]->children = cl_woo_get_cat_filter_children( $term->term_id );\n\n\t}\n\n\treturn $output;\n}",
"public function courses()\n {\n return $this->belongsToMany(Course::class, 'results', 'idRegistrationF', 'idCourseF');\n }",
"public function courses(){\n $courses = Course::all();\n return View('admin.courses',compact('courses'));\n }",
"function databaseGetCoursesForOccurrence($occurrenceId) {\n //\n // http://dev4.krubner.com/private.php?page=private_reservations\n\n global $controller; \n\n $query = \"SELECT * FROM lk_courses where lk_occurrence_id = $occurrenceId order by order_of_appearance \"; \n $arrayOfCourses = $controller->command('databaseFetchSqlWithTrust', $query, 'databaseGetCoursesForOccurrence'); \n return $arrayOfCourses; \n}",
"public function scopeTurnCourses($query, Turn $turn)\n\t{\n\t\treturn $query->where('turn_id','=',$turn->id);\n\t}",
"public function supportsCourseSearch() {\n \treturn $this->manager->supportsCourseSearch();\n\t}",
"private function getCatalogWhereTerms () {\n\t\tif ($this->session->getCourseCatalogId()->isEqual($this->session->getCombinedCatalogId()))\n\t\t\treturn 'TRUE';\n\t\telse\n\t\t\treturn 'catalog_id = :catalog_id';\n\t}",
"function getCourseCategoryByCategoryId($id){\n\n $select=$this->select()->where(\" categoryid = ?\",$id);\n return $this->fetchAll($select)->toArray();\n }",
"function getAllTerms(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllTerms();\r\n }",
"public static function showCourses($id)\n {\n global $cont;\n $courses = $cont->prepare(\"SELECT courses.id AS courseId , courses.title AS title , courses.price AS price , courses.body AS body , courses.image AS `image` , categories.name AS catName FROM courses INNER JOIN categories ON courses.catagory_id = categories.id WHERE categories.id = ?\");\n $courses->execute([$id]);\n return $courses->fetchAll();\n }",
"public function courses() {\n return $this->belongsToMany('C2Y\\Course', 'classes_courses', 'class_id', 'course_id');\n }",
"public function getCourses()\n {\n return array(\n 1 => \"Kids Stage I (Pre School)\",\n 2 => \"Kids Stage II (Grade 01)\",\n 3 => \"Kids Stage III (Grade 02 - 05)\",\n 4 => \"School IT Syllabus (Grade 06 - 09)\",\n 5 => \"O/L ICT (Grade 09 - 11)\",\n 6 => \"A/L IT\",\n 7 => \"A/L GIT\",\n 8 => \"MS Office\",\n 9 => \"Graphic Designer\",\n 10 => \"Hardware & Networking\",\n 11 => \"Software Engineering\",\n 12 => \"Web Designing\",\n 13 => \"Type Setting\"\n );\n }"
] | [
"0.6011304",
"0.58016616",
"0.579713",
"0.5718078",
"0.5711828",
"0.553655",
"0.5533967",
"0.54997486",
"0.54840714",
"0.5471198",
"0.5442092",
"0.54361",
"0.5424699",
"0.53994745",
"0.538072",
"0.5361214",
"0.53362775",
"0.5317572",
"0.53126884",
"0.5290739",
"0.5289793",
"0.5270822",
"0.5246299",
"0.5243164",
"0.52358365",
"0.5213789",
"0.52126837",
"0.5199325",
"0.5193673",
"0.5185855",
"0.5173486",
"0.5172498",
"0.5160022",
"0.5142518",
"0.51371944",
"0.5119325",
"0.5119284",
"0.5108176",
"0.5101946",
"0.50817305",
"0.50669664",
"0.5065673",
"0.5047009",
"0.50394297",
"0.50321966",
"0.5020778",
"0.5016147",
"0.500551",
"0.49997997",
"0.4995361",
"0.49825254",
"0.49809667",
"0.49791422",
"0.49710634",
"0.49699473",
"0.49698892",
"0.49586818",
"0.49462715",
"0.49378473",
"0.49283043",
"0.49210566",
"0.49129593",
"0.49105227",
"0.48911685",
"0.48845416",
"0.4880821",
"0.4866785",
"0.48572508",
"0.48527998",
"0.48399627",
"0.48372144",
"0.48299152",
"0.4825897",
"0.48154417",
"0.48109642",
"0.48109555",
"0.47835645",
"0.47834706",
"0.47656617",
"0.4758972",
"0.47587803",
"0.47549158",
"0.47539374",
"0.47411665",
"0.47332475",
"0.47225103",
"0.47176632",
"0.4708365",
"0.46971184",
"0.46930438",
"0.46851644",
"0.46819586",
"0.4677277",
"0.46746245",
"0.46745095",
"0.4664632",
"0.46639124",
"0.46624458",
"0.46488553",
"0.46451765"
] | 0.68748456 | 0 |
Retrieve child courses. Gets child courses of the term which are not assigned to any of its children. | function get_immediate_children( $course_type = null ) {
if (empty($course_type)) {
$course_type = get_term_by('slug', get_query_var('term'), 'course_type');
}
return array(
'relation' => 'AND',
array(
'taxonomy' => 'course_type',
'terms' => $course_type->term_id
),
array(
'taxonomy' => 'course_type',
'terms' => get_term_children( $course_type->term_id, 'course_type'),
'operator' => 'NOT IN'
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_courses() {\n\tglobal $wp_query;\n\t$wp_query->set('tax_query', get_immediate_children());\n\t$wp_query->get_posts();\n}",
"function listDescendantCourses() {\n $courses = courselist_roftools::get_courses_from_parent_rofpath($this->getRofPathId());\n return array_keys($courses);\n }",
"public function getCourses()\n {\n return $this->courses;\n }",
"public function getChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE parent_category_id = '. $this->category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n $children = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $children[] = new self((int) $result->getValue('category_id'), $this->clang_id);\n $result->next();\n }\n return $children;\n }",
"public function courses()\n {\n return $this->morphedByMany(Course::class, 'subjectables');\n }",
"function get_child_contexts($context) {\n\n global $CFG;\n $children = array();\n\n switch ($context->contextlevel) {\n\n case CONTEXT_BLOCK:\n // No children.\n return array();\n break;\n\n case CONTEXT_MODULE:\n // No children.\n return array();\n break;\n\n case CONTEXT_GROUP:\n // No children.\n return array();\n break;\n\n case CONTEXT_COURSE:\n // Find all block instances for the course.\n $page = new page_course;\n $page->id = $context->instanceid;\n $page->type = 'course-view';\n if ($blocks = blocks_get_by_page_pinned($page)) {\n foreach ($blocks['l'] as $leftblock) {\n if ($child = get_context_instance(CONTEXT_BLOCK, $leftblock->id)) {\n array_push($children, $child->id);\n }\n }\n foreach ($blocks['r'] as $rightblock) {\n if ($child = get_context_instance(CONTEXT_BLOCK, $rightblock->id)) {\n array_push($children, $child->id);\n }\n }\n }\n // Find all module instances for the course.\n if ($modules = get_records('course_modules', 'course', $context->instanceid)) {\n foreach ($modules as $module) {\n if ($child = get_context_instance(CONTEXT_MODULE, $module->id)) {\n array_push($children, $child->id);\n }\n }\n }\n // Find all group instances for the course.\n if ($groupids = groups_get_groups($context->instanceid)) {\n foreach ($groupids as $groupid) {\n if ($child = get_context_instance(CONTEXT_GROUP, $groupid)) {\n array_push($children, $child->id);\n }\n }\n }\n return $children;\n break;\n\n case CONTEXT_COURSECAT:\n // We need to get the contexts for:\n // 1) The subcategories of the given category\n // 2) The courses in the given category and all its subcategories\n // 3) All the child contexts for these courses\n\n $categories = get_all_subcategories($context->instanceid);\n\n // Add the contexts for all the subcategories.\n foreach ($categories as $catid) {\n if ($catci = get_context_instance(CONTEXT_COURSECAT, $catid)) {\n array_push($children, $catci->id);\n }\n }\n\n // Add the parent category as well so we can find the contexts\n // for its courses.\n array_unshift($categories, $context->instanceid);\n\n foreach ($categories as $catid) {\n // Find all courses for the category.\n if ($courses = get_records('course', 'category', $catid)) {\n foreach ($courses as $course) {\n if ($courseci = get_context_instance(CONTEXT_COURSE, $course->id)) {\n array_push($children, $courseci->id);\n $children = array_merge($children, get_child_contexts($courseci));\n }\n }\n }\n }\n return $children;\n break;\n\n case CONTEXT_USER:\n // No children.\n return array();\n break;\n\n case CONTEXT_PERSONAL:\n // No children.\n return array();\n break;\n\n case CONTEXT_SYSTEM:\n // Just get all the contexts except for CONTEXT_SYSTEM level.\n $sql = 'SELECT c.id '.\n 'FROM '.$CFG->prefix.'context AS c '.\n 'WHERE contextlevel != '.CONTEXT_SYSTEM;\n\n $contexts = get_records_sql($sql);\n foreach ($contexts as $cid) {\n array_push($children, $cid->id);\n }\n return $children;\n break;\n\n default:\n error('This is an unknown context (' . $context->contextlevel . ') in get_child_contexts!');\n return false;\n }\n}",
"public function getCourses()\n {\n return $this->hasMany(Course::className(), ['language' => 'ISO']);\n }",
"public function get_courses(){\n return $this->courses;\n }",
"protected function getChildK2Categories()\n {\n $db = $this->db;\n $query = $db->getQuery(true);\n $query->select($db->quoteName(array('id', 'parent')));\n $query->from($db->quoteName('#__k2_categories'));\n $query->where($db->quoteName('published') . ' = 1');\n $query->where($db->quoteName('parent') . ' != 0');\n $db->setQuery($query);\n return $db->loadObjectList('id');\n }",
"function i4_lms_get_courses() {\n global $wpdb, $wpcwdb;\n\n $SQL = \"SELECT course_id, course_title\n\t\t\tFROM $wpcwdb->courses\n\t\t\tORDER BY course_title ASC\n\t\t\t\";\n\n $courses = $wpdb->get_results($SQL);\n\n return $courses;\n }",
"public function courses()\t{\n\t\treturn $this->hasMany('Course');\n\t}",
"public static function courses(){\n return Catalog::where('active',1)\n ->where('for_sale', 1)\n ->where('litmos_deleted', 0)\n ->orderBy('name')\n ->lists( 'name', 'id');\n }",
"public function courses()\n {\n return $this->hasMany('\\T4KModels\\Course')->orderBy('title');\n }",
"public function courses()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = business_id, localKey = id)\n \treturn $this->hasMany(Course::class);\n }",
"public static function getCourses()\n {\n global $cont;\n $courses = $cont->prepare(\"SELECT courses.id AS courseId , courses.title AS title , courses.price AS price , courses.body AS body , courses.image AS `image` , categories.name AS catName FROM courses INNER JOIN categories ON courses.catagory_id = categories.id\");\n $courses->execute();\n return $courses;\n }",
"public function GetCourses()\n\t\t{\n $course_students = CourseStudent::GetAll(['student_id' => $this->GetAttribute(static::$primary_key)]);\n $courses = array();\n\n foreach ($course_students as $course_student) {\n $courses[] = Course::GetFromPrimaryKey($course_student->GetAttribute('course_id'));\n }\n\n return $courses;\n\t\t}",
"public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}",
"public function GetChildCategories()\n\t\t{\n\t\t\t$categoryId = $this->GetCatId();\n\t\t\t$childCatsCache = $GLOBALS['ISC_CLASS_DATA_STORE']->Read('ChildCategories');\n\n\t\t\t// The cache has a cached version of the children for this category so just return it\n\t\t\tif(isset($childCatsCache[$categoryId])) {\n\t\t\t\treturn explode(',', $childCatsCache[$categoryId]);\n\t\t\t}\n\n\t\t\tif(!is_array($childCatsCache)) {\n\t\t\t\t$childCatsCache = array();\n\t\t\t}\n\n\t\t\t$childCats = array();\n\t\t\t$query = \"\n\t\t\t\tSELECT categoryid\n\t\t\t\tFROM [|PREFIX|]categories\n\t\t\t\tWHERE CONCAT(',', catparentlist, ',') LIKE '%,\".(int)$categoryId.\",%' AND categoryid!='\".(int)$categoryId.\"'\n\t\t\t\";\n\t\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\twhile($child = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t\t$childCats[] = $child['categoryid'];\n\t\t\t}\n\t\t\t$childCatsCache[$categoryId] = implode(',', $childCats);\n\t\t\t$GLOBALS['ISC_CLASS_DATA_STORE']->Save('ChildCategories', $childCatsCache);\n\t\t\treturn $childCats;\n\t\t}",
"public function getCourses($online_only = false)\n {\n $query = '';\n if ($this->parent_target_group instanceof self) {\n // If object IS a child\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_2_categories AS c2c ON c2c.course_id = courses.course_id '\n .'WHERE c2t.target_group_id = '. $this->parent_target_group->target_group_id .' '\n .'AND c2c.category_id = '. $this->target_group_id .' ';\n } else {\n // If object is NOT a child\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id '\n .'WHERE c2t.target_group_id = '. $this->target_group_id .' ';\n }\n if ($online_only) {\n $query .= \"AND online_status = 'online' \"\n .'AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .') ';\n }\n $query .= 'GROUP BY course_id '\n .'ORDER BY date_start, name';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n $courses = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $courses[] = new Course((int) $result->getValue('course_id'));\n $result->next();\n }\n return $courses;\n }",
"public static function courses()\n {\n return Course::all()->toArray();\n }",
"public function getCourses()\n {\n return $this->hasMany(Section::className(), ['course_id' => 'course_id', 'sec_id' => 'sec_id', 'semester' => 'semester', 'year' => 'year'])->viaTable('teaches', ['ID' => 'ID']);\n }",
"function cicleinscription_get_courses_all(){\n\tglobal $DB;\n\t$sort = 'fullname ASC';\n\t$courses = $DB->get_records_sql(\"\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\tfullname,\n\t\t\t\tshortname \n\t\t\tFROM {course}\n\t\t\tWHERE\n\t\t\t\tcategory <> 0\n\t\t\tORDER BY {$sort}\");\n\n\treturn $courses;\n}",
"public function getAllCourses()\n {\n $courses = TableRegistry::getTableLocator()->get('Courses');\n $courses = $courses->find('all')->distinct('id')->toArray();\n return $courses;\n }",
"public function courses()\n {\n return $this->hasMany('App\\Course');\n }",
"public function getChildren()\n {\n $editors = BaseManager::build('FelixOnline\\Core\\Category', 'category', 'id')\n ->filter(\"parent = %i\", array($this->getId()))\n ->values();\n\n return $editors;\n }",
"function cl_woo_get_cat_filter_children( $parent_term_id = null ) {\n\n\t$output = array();\n\t$child_terms = null;\n\n\t//Get children of this term\n\t$child_terms = Prso_Woocom::get_product_terms(\n\t\tarray(\n\t\t\t'parent' => $parent_term_id,\n\t\t)\n\t);\n\n\tif ( isset( $child_terms->terms ) && ! empty( $child_terms->terms ) ) {\n\n\t\tforeach ( $child_terms->terms as $key => $grandchild_term ) {\n\n\t\t\t$child_terms->terms[ $key ]->children = cl_woo_get_cat_filter_children( $grandchild_term->term_id );\n\n\t\t}\n\n\t\t$output = $child_terms->terms;\n\n\t}\n\n\treturn $output;\n}",
"public function get_all_courses() {\n\t\t$sql = \"SELECT course_id FROM peducator_courses \n\t\tWHERE peducator_id='$this->peducator_id'\";\n\t\t$result = mysqli_query($this->connect_to_db, $sql);\n\n\t\t$arr = [];\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\tarray_push($arr, get_course($row['course_id']));\n\t\t}\n\n\t\treturn $arr;\n\n\t}",
"public function getNotAssignedCourses() {\n\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\n\t\t\t// Get Course ID and Name for display\n\t\t\t$query = \"SELECT id, Description FROM tblunits where Subject_ID = 'N/A'\";\n\t\t\t$sql->query($query, $this->debug);\n\n\t\t\tif ($sql->num_rows() > 0) {\n\t\t\t\t$i = 0;\n\t\t\t\twhile($sql->next_record()) {\n\t\t\t\t\t$this->unassigned_courses[$i]['id'] = $sql->Record['id'];\n\t\t\t\t\t$this->unassigned_courses[$i]['Description'] = $sql->Record['Description'];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function children()\n {\n return $this->hasMany(Category::class, 'parent_id', 'id');\n }",
"public function get_courses(){\n\t\t$query = $this->db->get('course');\n\t\treturn $query->result();\n\t}",
"public function children()\n {\n return $this->hasMany('App\\Models\\Category', 'parent_id', 'id');\n }",
"public function courses() //: hasMany\n {\n return $this->hasMany(Course::class, 'teacher_id', 'id');\n }",
"function i4_get_all_courses() {\n global $wpcwdb, $wpdb;\n\n $course_table_name = $wpdb->prefix . 'wpcw_courses';\n\n $wpdb->show_errors();\n\n $SQL = \"SELECT course_id, course_title FROM $course_table_name ORDER BY course_title\";\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }",
"public function fetchDeletedCourses()\n {\n return Course::onlyTrashed()->where('user_id', Auth::user()->id)->simplePaginate(10);\n }",
"public function courses()\n {\n return $this->hasMany('App\\Models\\Course');\n }",
"public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }",
"public function meCourses()\n {\n return Course::where('user_id', Auth::user()->id)->simplePaginate(10);\n }",
"public function children()\n {\n return $this->hasMany('App\\Model\\Products\\Category', 'parent_id');\n }",
"function getChildren($child_form_id, $cs, $string,$dec_ci){\n\t\t$arr = array();\n\t\t$sql_get_children = \"SELECT a.form_id, a.parent_form_id, a.form_order, a.form_name, a.navigation_name, a.mobile_page, a.description \n\t\t\t\t\t\t FROM cs_all_forms_new as a \n\t\t\t\t\t\t INNER JOIN cs_usertagged_forms_\".$dec_ci.\" as b\n\t\t\t\t\t\t ON a.form_id=b.form_id\n\t\t\t\t\t\t WHERE a.parent_form_id=\".$child_form_id.\"\n\t\t\t\t\t\t AND (\".$string.\")\";\n\t\t$exe_get_children = mysqli_query($cs, $sql_get_children);\n\n\t\tif($exe_get_children){\n\t\t\tif(mysqli_num_rows($exe_get_children)!=0){\n\t\t\t\twhile($fetch_get_children = mysqli_fetch_array($exe_get_children)){\n\t\t\t\t\textract($fetch_get_children);\n\t\t\t\t\tarray_push($arr,array($form_id, $parent_form_id, $form_order, $form_name, $navigation_name, $mobile_page, $description));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\treturn $arr;\n\t}",
"function getPageChildren($parentId)\n{\n return $GLOBALS['conn']->query(\"SELECT * FROM `subjects` WHERE parent='$parentId'\");\n}",
"private function getCoursesWithLogs()\n {\n return $this->entityManager->createQueryBuilder()\n ->select('course')\n ->from(Course::class, 'course')\n ->innerJoin(ActionLog::class, 'log', Expr\\Join::WITH, 'course.id = log.course')\n ->andWhere('course.sandbox = :false')\n ->andWhere('course.id in (:ids)')\n ->setParameter('false', false)\n ->setParameter('ids', $this->getAvailableCoursesIds())\n ->orderBy('course.info.title', 'ASC')\n ->getQuery()\n ->getResult();\n }",
"public function courses() {\n return $this->hasMany('App\\Course', 'schoolYearID', 'schoolYearID');\n }",
"public function getChild($cid, $self = false) {\n if(isset($this->child[$cid])){\n if($self){\n $cids = $this->child[$cid];\n $cids[] = $cid;\n return $cids;\n }\n return $this->child[$cid];\n }\n\n if($self){\n return array($cid);\n }else{\n return array();\n }\n }",
"public function courses() {\n\t\treturn $this->belongsToMany('Course')->withPivot('course_role')->orderBy('id');\n\t}",
"public function courses() {\n return $this->belongsToMany('C2Y\\Course', 'classes_courses', 'class_id', 'course_id');\n }",
"public static function find_courses($search) {\n global $DB;\n\n // Validate parameters passed from web service.\n $params = self::validate_parameters(self::find_courses_parameters(), array('search' => $search));\n\n // Capability check.\n if (!has_capability('moodle/course:viewhiddencourses', context_system::instance())) {\n return false;\n }\n\n // Build query.\n $searchsql = '';\n $searchparams = array();\n $searchlikes = array();\n $searchfields = array('c.shortname', 'c.fullname', 'c.idnumber');\n for ($i = 0; $i < count($searchfields); $i++) {\n $searchlikes[$i] = $DB->sql_like($searchfields[$i], \":s{$i}\", false, false);\n $searchparams[\"s{$i}\"] = '%' . $search . '%';\n }\n // We exclude the front page.\n $searchsql = '(' . implode(' OR ', $searchlikes) . ') AND c.id != 1';\n\n // Run query.\n $fields = 'c.id,c.idnumber,c.shortname,c.fullname';\n $sql = \"SELECT $fields FROM {course} c WHERE $searchsql ORDER BY c.shortname ASC\";\n $courses = $DB->get_records_sql($sql, $searchparams, 0);\n return $courses;\n }",
"public function category_wise_course_get() {\n $category_id = $_GET['category_id'];\n $courses = $this->api_model->category_wise_course_get($category_id);\n $this->set_response($courses, REST_Controller::HTTP_OK);\n }",
"public function children(): HasMany\n {\n return $this->hasMany(Category::class, 'parent_id');\n }",
"public function getCourses($conn){\n $courses = [];\n $courses = CourseModel::getCourses($conn);\n return $courses;\n \n }",
"public function get_categories() {\n global $DB;\n $categories = array();\n $results = $DB->get_records('course_categories', array('parent' => '0', 'visible' => '1', 'depth' => '1'));\n if (!empty($results)) {\n foreach ($results as $value) {\n $categories[$value->id] = $value->name;\n }\n }\n return $categories;\n }",
"public function get_all_courses_record() {\n $slct_query =\"SELECT * FROM courses WHERE course_deleted='0'\";\n $slct_exe =mysqli_query($GLOBALS['con'],$slct_query) or die(mysqli_error($GLOBALS['con']));\n return $slct_exe; //returning all the courses records\n }",
"public function getChildrenQuery()\n {\n return null;\n }",
"public function getChildren() {\n $childNodes = $this->getNode()->getChildren();\n $children = array();\n foreach ($childNodes as $childNode) {\n $child = $childNode->getPage($this->getLang());\n if ($child) {\n $children[] = $child;\n }\n }\n return $children;\n }",
"function child_category() {\r\n $input = $this->validate_child_category();\r\n $res = $this->CategoriesModel->get_child_category($input['sub_cat_id']);\r\n if ($res) {\r\n return_data(true, 'Child categories Found!', $res);\r\n }\r\n return_data(false, 'Child Categories not found!', array());\r\n }",
"function getCourseWikiList() {\n return $this->getWikiListByGroup(0);\n }",
"public function getCourses()\n {\n return array(\n 1 => \"Kids Stage I (Pre School)\",\n 2 => \"Kids Stage II (Grade 01)\",\n 3 => \"Kids Stage III (Grade 02 - 05)\",\n 4 => \"School IT Syllabus (Grade 06 - 09)\",\n 5 => \"O/L ICT (Grade 09 - 11)\",\n 6 => \"A/L IT\",\n 7 => \"A/L GIT\",\n 8 => \"MS Office\",\n 9 => \"Graphic Designer\",\n 10 => \"Hardware & Networking\",\n 11 => \"Software Engineering\",\n 12 => \"Web Designing\",\n 13 => \"Type Setting\"\n );\n }",
"public function courseList()\n {\n return $this->belongTo(CourseList::class);\n }",
"protected function getCourseSubCategories(Request $request){\n \t$id = InputSanitise::inputInt($request->get('id'));\n \tif(isset($id)){\n \t\treturn CourseSubCategory::getCourseSubCategoriesByCategoryId($id);\n \t}\n }",
"public function children() : HasMany\n {\n return $this->hasMany('App\\Category', 'parent_id');\n }",
"public function testGetAllChildren() {\n // Declare\n $name = 'Pricing Tools (Child)';\n\n // Create\n $ph_kb_category = $this->phactory->create('kb_category');\n $this->phactory->create( 'kb_category', array( 'parent_id' => $ph_kb_category->id, 'name' => $name ) );\n\n // Get\n $categories = $this->kb_category->get_all_children( $ph_kb_category->id );\n $category = current( $categories );\n\n // Assert\n $this->assertContainsOnlyInstancesOf( 'KnowledgeBaseCategory', $categories );\n $this->assertEquals( $name, $category->name );\n }",
"public function getChildren(): Collection\n {\n return $this->children;\n }",
"public function getChildren(): Collection\n {\n return $this->children;\n }",
"public function getCourseList()\n {\n $course_list = [];\n\n foreach($this->sections as $section)\n {\n $course_list[$section->getCourseId()] = $section->course_subject.' '.$section->course_number.' '.$section->course_name;\n }\n\n return $course_list;\n }",
"public static function get_courses($category) {\n global $DB, $CFG;\n\n\n $params = self::validate_parameters(self::get_courses_parameters(), array(\n 'categoryid' => $category,\n ));\n if (!$category) {\n return array(array('id' => 0, 'fullname' => get_string('all')));\n }\n $category = $DB->get_record('course_categories', array('id' => $category), '*', MUST_EXIST);\n $courses = get_courses($category->id);\n foreach ($courses as $c) {\n if (!$c->visible) {\n unset($courses[$c->id]);\n }\n }\n return $courses;\n }",
"#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }",
"public function returnArray() {\n return $this->courses;\n }",
"public function getChildren() {\n\t\treturn $this->_children;\n\t}",
"public function getChildrenQuery();",
"function get_all_courses()\n\t{\n\t\t// fetch all data\n\t\treturn $this->db->query('SELECT * FROM courses')->result_array();\n\t}",
"public function getChildren() {\n\t\treturn $this->children;\n\t}",
"public function getChildren() {\n\t\treturn $this->children;\n\t}",
"function children() {\n\t\t$this->load_children();\n\t\treturn $this->_children;\n\t}",
"public function getChildren()\n {\n return $this->_children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren() \n {\n return $this->children;\n }",
"public function children()\n {\n return $this->hasMany(App\\Models\\Catagory::class);\n }",
"public function getCategories($id = null, $children = false)\n {\n $call = \"/v{$this->version}/place_categories\";\n if ($id !== null) {\n $call .= '/' . $id;\n if ($children === true) {\n $call .= '/children';\n }\n } elseif ($children === true) {\n throw new Services_Qype_Exception('Cannot get children if no ID is supplied.');\n }\n\n $resp = $this->makeRequest($call);\n return $this->parseResponse($resp);\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function get_children();",
"public function getChildrenCategories()\n {\n $childrenCategories = $this->getCategory()->getChildrenCategories();\n\n Mage::dispatchEvent(\n 'category_filter_get_children_categories',\n array(\n 'filter' => $this,\n 'category' => $this->getLayer()->getCurrentCategory(),\n 'children_categories' => $childrenCategories\n )\n );\n\n return $childrenCategories;\n }",
"public function children() {\n\t\treturn $this->hasMany(Forum::getSectionClass(), \"parent_id\")->orderBy(\"weight\", \"desc\");\n\t}",
"public function children()\r\n\t{\r\n\t\treturn $this->children;\r\n\t}",
"public function get_children() {\n\t\treturn $this->children;\n\t}",
"public function courses( $id ){\r\n $select = \"SELECT `courses`.`id`, `courses`.`name` \r\n FROM `courses`\r\n LEFT JOIN `enrollment`\r\n ON `enrollment`.`course_id` = `courses`.`id`\r\n WHERE `enrollment`.`student_id`=:id\";\r\n $sth = $this->db->pdo->prepare($select );\r\n $sth->bindParam( ':id', $id );\r\n $sth->execute();\r\n $result = $sth->fetchAll( PDO::FETCH_ASSOC );\r\n return $result;\r\n }",
"public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}",
"public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}",
"public function getChildren() {\n\t\t$placeRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_PlaceRepository');\n\t\t$children = $placeRepository->findAllChildren($this);\n\t\treturn $children;\n\t}",
"public function coursesCategoryList()\n { \n return CourseCategories::all();\n }",
"public function getChildren()\n {\n if (!($this->parent_target_group instanceof self)) {\n return [];\n }\n\n // Only target groups without parent can have children\n $query = 'SELECT category_id FROM '. rex::getTablePrefix() .'d2u_courses_url_target_group_childs '\n .'WHERE target_group_id = '. $this->target_group_id .' ';\n if ('priority' === rex_config::get('d2u_courses', 'default_category_sort')) {\n $query .= 'ORDER BY priority';\n } else {\n $query .= 'ORDER BY name';\n }\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n $target_children = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $category = new Category((int) $result->getValue('category_id'));\n $target_child = new self(0);\n $target_child->target_group_id = $category->category_id;\n $target_child->parent_target_group = $this;\n $target_child->name = $category->name;\n $target_child->picture = $category->picture;\n $target_child->updatedate = $category->updatedate;\n $target_children[] = $target_child;\n $result->next();\n }\n return $target_children;\n }",
"public function get_course()\n {\n return $this->get_foreign_property(self::FOREIGN_PROPERTY_COURSE, Course::class_name());\n }",
"public static function get_all_courses() {\n\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $courses = glueserver_course_db::glueserver_get_all_courses();\n $returns = array();\n foreach ($courses as $course) {\n $course = new glueserver_course($course);\n $returns[] = $course->get_data();\n }\n return $returns;\n }",
"public function getChildren($field = null)\n\t{\n\t\t$criteria = craft()->elements->getCriteria($this->elementType);\n\t\t$criteria->childOf($this);\n\t\t$criteria->childField($field);\n\t\treturn $criteria;\n\t}",
"function & getChilds() {\r\n // Load the data\r\n if (empty ($this->_childs)) {\r\n $database = $this->_db;\r\n /* retrieve values */\r\n $query = 'SELECT * FROM #__custom_properties_values' . ' WHERE parent_id = ' . $this->_id . ' ORDER BY ordering ';\r\n\r\n $database->setQuery($query);\r\n $this->_childs = $database->loadObjectList();\r\n }\r\n return $this->_childs;\r\n }"
] | [
"0.62711805",
"0.61526525",
"0.60297596",
"0.6005408",
"0.5975901",
"0.5933081",
"0.59169036",
"0.5855563",
"0.5770813",
"0.57053745",
"0.5672227",
"0.56508994",
"0.56422013",
"0.5620668",
"0.5602331",
"0.5601563",
"0.5600888",
"0.55978495",
"0.5594242",
"0.558314",
"0.55650246",
"0.54909164",
"0.54561436",
"0.54201305",
"0.535142",
"0.5347741",
"0.5329436",
"0.53243464",
"0.53205705",
"0.53189355",
"0.53094506",
"0.5308587",
"0.5254053",
"0.52427304",
"0.5228423",
"0.52274",
"0.5187896",
"0.5163237",
"0.5151526",
"0.5147049",
"0.51338726",
"0.51284456",
"0.51237434",
"0.512312",
"0.51008576",
"0.50792867",
"0.5078115",
"0.50728345",
"0.50629634",
"0.50615436",
"0.5054758",
"0.50417817",
"0.5028666",
"0.5024922",
"0.50096697",
"0.50083286",
"0.5007663",
"0.50038594",
"0.4988955",
"0.4985492",
"0.4970375",
"0.4970375",
"0.49696887",
"0.49617895",
"0.49602365",
"0.49599344",
"0.4958769",
"0.49557245",
"0.4954185",
"0.4943705",
"0.4943705",
"0.49434546",
"0.49409986",
"0.4940415",
"0.49376008",
"0.49360693",
"0.49354863",
"0.49313882",
"0.49313882",
"0.49313882",
"0.49313882",
"0.49313882",
"0.49313882",
"0.49313882",
"0.49313882",
"0.49188194",
"0.4899223",
"0.4896748",
"0.48959303",
"0.48951992",
"0.4894958",
"0.48849294",
"0.48849294",
"0.48846355",
"0.48823673",
"0.4879934",
"0.48759493",
"0.4873824",
"0.48690656",
"0.48677215"
] | 0.52464694 | 33 |
Determine if the given object is a JSON string or not. | function cargo_is_json( $obj ) {
return is_string( $obj ) && is_array( json_decode( $obj, true ) ) && json_last_error() === JSON_ERROR_NONE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function isJson($str) {}",
"public static function stringIsJson($string){\n\t\treturn ((is_string($string) && (is_object(json_decode($string)) || is_array(json_decode($string)))))\n\t\t\t? true\n\t\t\t: false;\n\t}",
"public static function IsJsonString (& $jsonStr);",
"function scrappy_isJson($string) {\n return ((is_string($string) &&\n (is_object(json_decode($string)) ||\n is_array(json_decode($string))))) ? true : false;\n}",
"public function isJson($string){\n\t\treturn self::stringIsJson($string);\n\t}",
"static public function is_json($string)\n\t{\n\t\treturn is_string($string) && is_array(json_decode($string, true)) ? true : false;\n\t}",
"function isJSON($string)\n{\n return (is_null(json_decode($string))) ? false : true;\n}",
"public function isJson()\n {\n if (!isset($this->str[0])) {\n return false;\n }\n\n json_decode($this->str);\n\n if (json_last_error() === JSON_ERROR_NONE) {\n return true;\n } else {\n return false;\n }\n }",
"function is_json($str)\n {\n if (!is_string($str)) {\n return false;\n }\n\n json_decode($str);\n return json_last_error() == JSON_ERROR_NONE;\n }",
"public function isJSON($string){\n return is_string($string) && is_array(json_decode($string, true)) ? true : false;\n }",
"private function isJSONString($string)\n\t{\n\t\tjson_decode($string);\n\t\treturn (json_last_error() == JSON_ERROR_NONE);\n\t}",
"private function isJson($string) {\n\t\tjson_decode($string);\n\t\treturn (json_last_error() == \"JSON_ERROR_NONE\");\n\t}",
"static function isJSON($string){\n return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;\n }",
"public function isJson($string)\r\n {\r\n json_decode($string);\r\n return (json_last_error() == JSON_ERROR_NONE);\r\n }",
"private function isJson($string) {\n json_decode($string);\n return (json_last_error() == JSON_ERROR_NONE);\n }",
"private function isJson($string)\n {\n if (is_string($string))\n {\n return is_array(json_decode($string, true));\n }\n\n return false;\n }",
"public static function isJson($string) : bool\n {\n if (is_string($string)) {\n json_decode($string);\n return (json_last_error() == JSON_ERROR_NONE);\n }\n\n return false;\n }",
"function is_json( $string ){\n if( is_string( $string ) ){\n \n @json_decode( $string );\n return ( json_last_error() == JSON_ERROR_NONE );\n \n } else {\n \n return false;\n \n }\n}",
"function isJSON($string){\n return is_string($string) && is_array(json_decode($string, true)) ? true : false;\n}",
"public static function is_json($string)\n {\n if (! is_string($string)) {\n return false;\n }\n\n $firstChar = substr($string, 0, 1);\n if ($firstChar !== '[' && $firstChar !== '{' && $firstChar !== '\"') {\n return false;\n }\n \n try {\n json_decode($string);\n } catch (\\Exception $e) {\n return false;\n }\n \n // check if error occured (only if json_last_error() exists)\n return (! function_exists('json_last_error') || json_last_error() === JSON_ERROR_NONE);\n }",
"function isJson($string)\n {\n // make sure provided input is of type string\n if (!is_string($string)) {\n return false;\n }\n \n // trim white spaces\n $string = trim($string);\n \n // get first character\n $firstChar = substr($string, 0, 1);\n \n // get last character\n $lastChar = substr($string, -1);\n \n // check if there is a first and last character\n if (!$firstChar || !$lastChar) {\n return false;\n }\n \n // make sure first character is either { or [\n if ($firstChar !== '{' && $firstChar !== '[') {\n return false;\n }\n \n // make sure last character is either } or ]\n if ($lastChar !== '}' && $lastChar !== ']') {\n return false;\n }\n \n // let's leave the rest to PHP.\n // try to decode string\n json_decode($string);\n \n // check if error occurred\n $isValid = json_last_error() === JSON_ERROR_NONE;\n \n return $isValid;\n }",
"function isJson($str)\n\t{\n\n\t\tjson_decode($str);\n\t\treturn (json_last_error() == JSON_ERROR_NONE);\n\n\t}",
"protected function isJson($string)\n {\n json_decode($string);\n\n return json_last_error() == JSON_ERROR_NONE;\n }",
"function is_json(string $string): bool\n {\n json_decode($string);\n return json_last_error() === JSON_ERROR_NONE;\n }",
"public function is_json($str) {\n json_decode($str);\n return (json_last_error() == JSON_ERROR_NONE);\n unset($str);\n }",
"function is_json(string $string): bool\n\t{\n\t\tjson_decode($string);\n\n\t\treturn empty(json_last_error());\n\t}",
"public static function is( $string ){\n\t\t\t\t\n\t\t\t\tif( !is_string( $string ) ){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn ( is_object( json_decode( $string ) ) || is_array( json_decode( $string ) ) );\n\t\t\t}",
"public static function is_json(string $str)\n {\n json_decode($str);\n return json_last_error() === JSON_ERROR_NONE;\n }",
"public function isJSON(string $string): bool\n {\n return is_array(json_decode($string, true)) && (json_last_error() === JSON_ERROR_NONE);\n }",
"public static function isJson($text) { \n if($text && is_string($text) && 'null' != $text) {\n $text = trim($text);\n $start = substr($text, 0, 1); $end = substr($text, -1);\n if(('{' == $start && '}' == $end) \n || ('[' == $start && ']' == $end)) {}\n else {\n return false;\n }\n @json_decode($text); return (json_last_error() === JSON_ERROR_NONE);\n }\n return false;\n }",
"function is_json($string = null)\r\n\t{\r\n\t\tif(is_string($string))\r\n\t\t{\r\n\t\t\t$string\t\t\t\t\t\t\t\t\t= json_decode($string, true);\r\n\t\t\t\r\n\t\t\tif(json_last_error() == JSON_ERROR_NONE)\r\n\t\t\t{\r\n\t\t\t\treturn $string;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn array();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}",
"private function isJson($string) {\n\t\t$result = json_decode($string);\n\n\t\t// use switch and check with the possible json error\n\t\tswitch (json_last_error()) {\n\t\t\tcase JSON_ERROR_NONE:\n\t\t\t\t$error = ''; // JSON is valid // No error has occurred\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_DEPTH:\n\t\t\t\t$error = 'The maximum stack depth has been exceeded.';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_STATE_MISMATCH:\n\t\t\t\t$error = 'Invalid or malformed JSON.';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\t\t$error = 'Control character error, possibly incorrectly encoded.';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_SYNTAX:\n\t\t\t\t$error = 'Syntax error, malformed JSON.';\n\t\t\t\tbreak;\n\t\t\t// PHP >= 5.3.3\n\t\t\tcase JSON_ERROR_UTF8:\n\t\t\t\t$error = 'Malformed UTF-8 characters, possibly incorrectly encoded.';\n\t\t\t\tbreak;\n\t\t\t// PHP >= 5.5.0\n\t\t\tcase JSON_ERROR_RECURSION:\n\t\t\t\t$error = 'One or more recursive references in the value to be encoded.';\n\t\t\t\tbreak;\n\t\t\t// PHP >= 5.5.0\n\t\t\tcase JSON_ERROR_INF_OR_NAN:\n\t\t\t\t$error = 'One or more NAN or INF values in the value to be encoded.';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_UNSUPPORTED_TYPE:\n\t\t\t\t$error = 'A value of a type that cannot be encoded was given.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$error = 'Unknown JSON error occured.';\n\t\t\t\tbreak;\n\t\t}\n\t\n\t\tif ($error !== '') {\n\t\t\t// throw the Exception or exit // or whatever :)\n\t\t\texit($error);\n\t\t}\n\n\t\treturn $result;\n\t}",
"public static function jsonable($object): bool\n {\n if (!is_object($object)) {\n return false;\n }\n\n return method_exists($object, 'toJson');\n }",
"function is_json($value)\n {\n return is_string($value) && is_array(json_decode($value, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;\n }",
"public static function is_json( $value ) {\n\t\tif ( is_string( $value ) && in_array( substr( $value, 0, 1 ), array( '{', '[' ) ) && is_array( json_decode( $value, ARRAY_A ) ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public static function isJson(string $jsonString): bool\n\t{\n\t\t\\json_decode($jsonString);\n\t\treturn (\\json_last_error() === \\JSON_ERROR_NONE);\n\t}",
"function cjpopups_is_json($string) {\n\tjson_decode($string);\n\treturn (json_last_error() == JSON_ERROR_NONE);\n}",
"public function isJson(): bool\n {\n json_decode($this->apiString);\n return (json_last_error() == JSON_ERROR_NONE);\n }",
"function isJson()\n {\n $json = @call_user_func_array('json_decode', func_get_args());\n\n return json_last_error() ? false : $json;\n }",
"protected function isJson()\n {\n $contentType = $this->getContentType();\n\n return Str::contains(Str::lower($contentType), 'json');\n }",
"public function isJson()\n {\n $content_type = isset($_SERVER['CONTENT_TYPE']) ? trim($_SERVER['CONTENT_TYPE']) : '';\n return strcasecmp($content_type, 'application/json') != 0 ? false : true;\n }",
"public static function is_JSON( string $json ): bool { // phpcs:ignore\n\t\tjson_decode( $json );\n\n\t\treturn ( json_last_error() === JSON_ERROR_NONE );\n\t}",
"private function isValidJson($string) {\n json_decode($string);\n return (json_last_error() == JSON_ERROR_NONE);\n }",
"public static function isJson() {\n\t if(Str::endsWith(self::getContentType(),'json')) {\n\t return true;\n\t }\n\t return false;\n\t}",
"private function check_json($value) : bool\n {\n // should be an array or an object rather than a primitive\n if (!is_string($value))\n return false;\n\n if (strlen($value) === 0)\n return false;\n\n $temp = ltrim($value);\n if ($temp[0] != '{' && $temp[0] != '[')\n return false;\n\n // see if we can parse the value\n $result = @json_decode($value);\n if (json_last_error() === JSON_ERROR_NONE)\n return true;\n\n return false;\n }",
"public function isJSON()\n\t{\n\t\treturn $this->hasHeader('Content-Type')\n\t\t\t&& $this->header('Content-Type')->getValue() === 'application/json';\n\t}",
"public function isJSON()\n {\n return isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] == 'application/json';\n }",
"public function isJson()\n\t{\n\t\treturn Str::contains($this->getHeaderLine('Content-Type'), '/json');\n\t}",
"function is_json(string $string): bool\n {\n deprecationWarning('Deprecated. Use instead `json_validate()`');\n\n return json_validate($string);\n }",
"public function is_json_content_type()\n {\n }",
"public function isJson()\n {\n return parent::isJson();\n }",
"function is_JSON(...$args) \n{\n json_decode(...$args);\n return json_last_error() === JSON_ERROR_NONE;\n}",
"private function varIsJson($json): void {\r\n $json_obj = json_decode($json);\r\n $this->varIsObject($json_obj, 'json');\r\n }",
"public static function validateJsonInput(?string $string): bool\n {\n if (is_string($string)) {\n @json_decode($string);\n return (json_last_error() === JSON_ERROR_NONE);\n }\n return false;\n }",
"protected function shouldBeJson($content)\n {\n return $content instanceof Jsonable ||\n $content instanceof ArrayObject ||\n is_array($content);\n }",
"public function isJson(){\n\t\t\n\t\treturn $this['request']['json'];\n\t\t\n\t}",
"public function isJson()\n {\n return $this->request->isJson() || ($this->request->header('CONTENT_TYPE') === 'application/vnd.api+json');\n }",
"private function validateJson($json)\n {\n $isJson = json_decode($json);\n\n if ($isJson instanceof \\stdClass) {\n return true;\n }\n\n return false;\n }",
"protected function validJson(string $content): bool\n {\n if (is_numeric($content)) {\n return false;\n }\n\n json_decode($content);\n\n return json_last_error() === JSON_ERROR_NONE;\n }",
"protected function responseIsJson() : bool\n {\n $type = json_encode($this->responseHeaders->get('Content-Type'));\n\n return Str::contains($type, 'json');\n }",
"public function isFormatJson()\n\t\t\t{\n\t\t\t\treturn $this->getFormat() == self::FORMAT_JSON;\n\t\t\t}",
"public static function isObject(?string $input): bool\n {\n return self::detectType($input) == self::OBJECT;\n }",
"public function containsJson(): bool\n {\n return Str::contains($this->getContentType(), 'application/json');\n }",
"public static function isJson()\n {\n return new Matcher\\IsJson();\n }",
"protected function shouldBeJson($content)\n {\n return $content instanceof Arrayable ||\n $content instanceof Jsonable ||\n $content instanceof ArrayObject ||\n $content instanceof JsonSerializable ||\n is_array($content);\n }",
"public static function isSerialized($str) {}",
"private function validate_json($data=null)\n {\n if (is_string($data))\n {\n @json_decode($data);\n return (json_last_error() === JSON_ERROR_NONE);\n }\n return false;\n }",
"static function isStringObject($var){\n\t\tif(self::isInstanceOf($var, 'Webiny\\Component\\StdLib\\StdObject\\StringObject\\StringObject')){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function rest_is_object($maybe_object)\n {\n }",
"protected function _json_decode($str, $asArray = false)\n {\n $str = $this->_reduce_string($str);\n \n switch (strtolower($str)) {\n case 'true':\n // JSON_checker test suite claims\n // \"A JSON payload should be an object or array, not a string.\"\n // Thus, returning bool(true) is invalid parsing, unless\n // we're nested inside an array or object.\n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return true;\n } else {\n return null;\n }\n break;\n \n case 'false':\n // JSON_checker test suite claims\n // \"A JSON payload should be an object or array, not a string.\"\n // Thus, returning bool(false) is invalid parsing, unless\n // we're nested inside an array or object.\n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return false;\n } else {\n return null;\n }\n break;\n \n case 'null':\n return null;\n \n default:\n $m = array();\n \n if (is_numeric($str) || ctype_digit($str) || ctype_xdigit($str)) {\n // Return float or int, or null as appropriate\n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return ((float) $str == (integer) $str)\n ? (integer) $str\n : (float) $str;\n } else {\n return null;\n }\n break;\n \n } elseif (preg_match('/^(\"|\\').*(\\1)$/s', $str, $m)\n && $m[1] == $m[2]) {\n // STRINGS RETURNED IN UTF-8 FORMAT\n $delim = substr($str, 0, 1);\n $chrs = substr($str, 1, -1);\n $utf8 = '';\n $strlen_chrs = strlen($chrs);\n \n for ($c = 0; $c < $strlen_chrs; ++$c) {\n \n $substr_chrs_c_2 = substr($chrs, $c, 2);\n $ord_chrs_c = ord($chrs{$c});\n \n switch (true) {\n case $substr_chrs_c_2 == '\\b':\n $utf8 .= chr(0x08);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\t':\n $utf8 .= chr(0x09);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\n':\n $utf8 .= chr(0x0A);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\f':\n $utf8 .= chr(0x0C);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\r':\n $utf8 .= chr(0x0D);\n ++$c;\n break;\n \n case $substr_chrs_c_2 == '\\\\\"':\n case $substr_chrs_c_2 == '\\\\\\'':\n case $substr_chrs_c_2 == '\\\\\\\\':\n case $substr_chrs_c_2 == '\\\\/':\n if (($delim == '\"' && $substr_chrs_c_2 != '\\\\\\'') ||\n ($delim == \"'\" && $substr_chrs_c_2 != '\\\\\"')) {\n $utf8 .= $chrs{++$c};\n }\n break;\n \n case preg_match('/\\\\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):\n // single, escaped unicode character\n $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))\n . chr(hexdec(substr($chrs, ($c + 4), 2)));\n $utf8 .= $this->_utf162utf8($utf16);\n $c += 5;\n break;\n \n case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):\n $utf8 .= $chrs{$c};\n break;\n \n case ($ord_chrs_c & 0xE0) == 0xC0:\n // characters U-00000080 - U-000007FF, mask 110XXXXX\n //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 2);\n ++$c;\n break;\n \n case ($ord_chrs_c & 0xF0) == 0xE0:\n // characters U-00000800 - U-0000FFFF, mask 1110XXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 3);\n $c += 2;\n break;\n \n case ($ord_chrs_c & 0xF8) == 0xF0:\n // characters U-00010000 - U-001FFFFF, mask 11110XXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 4);\n $c += 3;\n break;\n \n case ($ord_chrs_c & 0xFC) == 0xF8:\n // characters U-00200000 - U-03FFFFFF, mask 111110XX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 5);\n $c += 4;\n break;\n \n case ($ord_chrs_c & 0xFE) == 0xFC:\n // characters U-04000000 - U-7FFFFFFF, mask 1111110X\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 6);\n $c += 5;\n break;\n \n }\n \n }\n \n if (in_array($this->_level, array(self::IN_ARR, self::IN_OBJ))) {\n return $utf8;\n } else {\n return null;\n }\n \n } elseif (preg_match('/^\\[.*\\]$/s', $str) || preg_match('/^\\{.*\\}$/s', $str)) {\n // array, or object notation\n \n if ($str{0} == '[') {\n $stk = array(self::IN_ARR);\n $this->_level = self::IN_ARR;\n $arr = array();\n } else {\n if ($asArray) {\n $stk = array(self::IN_OBJ);\n $obj = array();\n } else {\n $stk = array(self::IN_OBJ);\n $obj = new stdClass();\n }\n $this->_level = self::IN_OBJ;\n }\n \n array_push($stk, array('what' => self::SLICE,\n 'where' => 0,\n 'delim' => false));\n \n $chrs = substr($str, 1, -1);\n $chrs = $this->_reduce_string($chrs);\n \n if ($chrs == '') {\n if (reset($stk) == self::IN_ARR) {\n return $arr;\n \n } else {\n return $obj;\n \n }\n }\n \n $strlen_chrs = strlen($chrs);\n \n for ($c = 0; $c <= $strlen_chrs; ++$c) {\n \n $top = end($stk);\n $substr_chrs_c_2 = substr($chrs, $c, 2);\n \n if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == self::SLICE))) {\n // found a comma that is not inside a string, array, etc.,\n // OR we've reached the end of the character list\n $slice = substr($chrs, $top['where'], ($c - $top['where']));\n array_push($stk, array('what' => self::SLICE, 'where' => ($c + 1), 'delim' => false));\n //print(\"Found split at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n if (reset($stk) == self::IN_ARR) {\n $this->_level = self::IN_ARR;\n // we are in an array, so just push an element onto the stack\n array_push($arr, $this->_json_decode($slice));\n \n } elseif (reset($stk) == self::IN_OBJ) {\n $this->_level = self::IN_OBJ;\n // we are in an object, so figure\n // out the property name and set an\n // element in an associative array,\n // for now\n $parts = array();\n \n if (preg_match('/^\\s*([\"\\'].*[^\\\\\\][\"\\'])\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // \"name\":value pair\n $key = $this->_json_decode($parts[1]);\n $val = $this->_json_decode($parts[2]);\n \n if ($asArray) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n } elseif (preg_match('/^\\s*(\\w+)\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // name:value pair, where name is unquoted\n $key = $parts[1];\n $val = $this->_json_decode($parts[2]);\n \n if ($asArray) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n } elseif (preg_match('/^\\s*([\"\\'][\"\\'])\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // \"\":value pair\n //$key = $this->_json_decode($parts[1]);\n // use string that matches ext/json\n $key = '_empty_';\n $val = $this->_json_decode($parts[2]);\n \n if ($asArray) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n }\n \n }\n \n } elseif ((($chrs{$c} == '\"') || ($chrs{$c} == \"'\")) && ($top['what'] != self::IN_STR)) {\n // found a quote, and we are not inside a string\n array_push($stk, array('what' => self::IN_STR, 'where' => $c, 'delim' => $chrs{$c}));\n //print(\"Found start of string at {$c}\\n\");\n \n } elseif (($chrs{$c} == $top['delim']) &&\n ($top['what'] == self::IN_STR) &&\n ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\\\'))) % 2 != 1)) {\n // found a quote, we're in a string, and it's not escaped\n // we know that it's not escaped becase there is _not_ an\n // odd number of backslashes at the end of the string so far\n array_pop($stk);\n //print(\"Found end of string at {$c}: \".substr($chrs, $top['where'], (1 + 1 + $c - $top['where'])).\"\\n\");\n \n } elseif (($chrs{$c} == '[') &&\n in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) {\n // found a left-bracket, and we are in an array, object, or slice\n array_push($stk, array('what' => self::IN_ARR, 'where' => $c, 'delim' => false));\n //print(\"Found start of array at {$c}\\n\");\n \n } elseif (($chrs{$c} == ']') && ($top['what'] == self::IN_ARR)) {\n // found a right-bracket, and we're in an array\n $this->_level = null;\n array_pop($stk);\n //print(\"Found end of array at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n } elseif (($chrs{$c} == '{') &&\n in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) {\n // found a left-brace, and we are in an array, object, or slice\n array_push($stk, array('what' => self::IN_OBJ, 'where' => $c, 'delim' => false));\n //print(\"Found start of object at {$c}\\n\");\n \n } elseif (($chrs{$c} == '}') && ($top['what'] == self::IN_OBJ)) {\n // found a right-brace, and we're in an object\n $this->_level = null;\n array_pop($stk);\n //print(\"Found end of object at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n } elseif (($substr_chrs_c_2 == '/*') &&\n in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) {\n // found a comment start, and we are in an array, object, or slice\n array_push($stk, array('what' => self::IN_CMT, 'where' => $c, 'delim' => false));\n $c++;\n //print(\"Found start of comment at {$c}\\n\");\n \n } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == self::IN_CMT)) {\n // found a comment end, and we're in one now\n array_pop($stk);\n $c++;\n \n for ($i = $top['where']; $i <= $c; ++$i)\n $chrs = substr_replace($chrs, ' ', $i, 1);\n \n //print(\"Found end of comment at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n \n }\n \n }\n \n if (reset($stk) == self::IN_ARR) {\n return $arr;\n \n } elseif (reset($stk) == self::IN_OBJ) {\n return $obj;\n \n }\n \n }\n }\n }",
"private function isApplicationJson(): bool\n\t{\n\t\tif (is_null($this->isJson)) {\n\t\t\t$contentType = $this->getDI()->getShared('request')->getHeader('CONTENT_TYPE');\n\n\t\t\t$this->isJson = ($contentType && explode(';', $contentType)[0] === 'application/json');\n\t\t}\n\n\t\treturn $this->isJson;\n\t}",
"static function isJson()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isJson', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }",
"public static function is_stringable_object($input)\n {\n }",
"public static function isValidJSON($json) : bool\n {\n\n if (!is_string($json)) {\n return false;\n }\n\n json_decode($json);\n return json_last_error() === JSON_ERROR_NONE;\n }",
"private function hasJsonContentType($params)\n {\n $header = $this->headerManager->get('Content-Type');\n\n if(preg_match($this->jsonPattern, $header)) return true;\n\n return false;\n }",
"public function getIsString() {\n return $this->getType() == \"string\";\n }",
"private function wantsJson(Request $request): bool\n {\n $acceptable = $request->getAcceptableContentTypes();\n\n return isset($acceptable[0]) && $this->stringHelper->contains($acceptable[0], ['/json', '+json']);\n }",
"protected function isJsonEncodable($data)\n {\n if (!is_array($data)) {\n $data = [$data];\n }\n $json = json_encode($data, JSON_UNESCAPED_SLASHES);\n\n if ($json === false) {\n return false;\n }\n\n return true;\n }",
"public function isObject(): bool\n {\n return $this->phpType === self::OBJECT;\n }",
"private function isJsonRequest(Request $request): bool\n {\n return in_array($request->getContentTypeFormat(), [null, 'json', 'txt'], true);\n }",
"function wp_is_json_media_type($media_type)\n {\n }",
"private function is_json_valid() {\n\t\treturn $this->is_amp() ? $this->is_json_valid['amp'] : $this->is_json_valid['nonamp'];\n\t}",
"public function isObject()\n {\n return \\is_object($this->value);\n }",
"function wp_is_json_request()\n {\n }",
"public function getIsObject() {\n $primitives = array(\"boolean\", \"integer\", \"int\", \"string\", \"float\");\n return !is_numeric(array_search($this->getType(), $primitives));\n }",
"public static function stringable($object): bool\n {\n if (!is_object($object)) {\n return false;\n }\n\n return method_exists($object, '__toString');\n }",
"protected function isJsonCastable($key)\n {\n if ($this->hasCast($key)) {\n $type = $this->getCastType($key);\n\n return $type === 'array' || $type === 'json' || $type === 'object';\n }\n\n return false;\n }",
"protected function isJsonCastable($key)\n {\n return $this->hasCast($key, ['array', 'json', 'object']);\n }",
"function is_serialized_string($data) {\n\t\tif (!is_string($data)) {\n\t\t\treturn false;\n\t\t}\n\t\t$data = trim($data);\n\t\tif (strlen($data) < 4) {\n\t\t\treturn false;\n\t\t} elseif (':' !== $data[1]) {\n\t\t\treturn false;\n\t\t} elseif (';' !== substr($data, -1)) {\n\t\t\treturn false;\n\t\t} elseif ($data[0] !== 's') {\n\t\t\treturn false;\n\t\t} elseif ('\"' !== substr($data, -2, 1)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function isJsonCastable($key)\n {\n return $this->hasCast($key, ['array', 'json', 'object', 'collection']);\n }",
"public function isJsonAvailable()\n {\n if (!function_exists('json_decode') && !function_exists('json_encode')) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_json_notice'), true, 'validator');\n\n return false;\n }\n\n return true;\n }",
"public function satisfiesJSONExtension(): bool\n {\n if (function_exists('extension_loaded') && extension_loaded('json')) {\n return true;\n } else if (function_exists('json_encode')) {\n return true;\n }\n\n return false;\n }",
"function isStringify($var)\n {\n return ( (!is_array($var)) && (\n (!is_object($var) && @settype($var, 'string') !== false) ||\n (is_object($var) && method_exists($var, '__toString' ))\n ));\n }",
"function is_serialized_string($data)\n {\n }",
"protected function shouldParseJsonPayload($request)\n {\n return in_array($request->method(), ['POST', 'PUT', 'PATCH']) && $request->isJson();\n }",
"private function canBeString($value): bool\n {\n // https://stackoverflow.com/a/5496674\n return !is_array($value) && (\n (!is_object($value) && settype($value, 'string') !== false) ||\n (is_object($value) && method_exists($value, '__toString'))\n );\n }",
"function isObject ($value)\r\n{\r\n\treturn is_object ($value);\r\n}",
"private function is_json_error() {\n\n switch (json_last_error()) {\n case JSON_ERROR_NONE: return OK;\n case JSON_ERROR_DEPTH: return ERROR_JSON_PARSE;\n case JSON_ERROR_STATE_MISMATCH: return ERROR_JSON_PARSE;\n case JSON_ERROR_CTRL_CHAR: return ERROR_JSON_PARSE;\n case JSON_ERROR_SYNTAX: return ERROR_JSON_PARSE;\n case JSON_ERROR_UTF8: return ERROR_JSON_PARSE;\n default: return ERROR_JSON_PARSE;\n }\n\n }",
"public function isJsonResponse()\n {\n return $this->jsonResponse;\n }",
"public function isJsonResponse()\n {\n return $this->jsonResponse;\n }"
] | [
"0.8324791",
"0.82409954",
"0.818418",
"0.8180131",
"0.80365753",
"0.80116314",
"0.7934439",
"0.7911927",
"0.78953326",
"0.7875186",
"0.78594965",
"0.7819225",
"0.78180635",
"0.781272",
"0.7805148",
"0.77762353",
"0.7750688",
"0.773509",
"0.7715607",
"0.7681814",
"0.76390886",
"0.76210463",
"0.76192254",
"0.7612082",
"0.7602666",
"0.7595322",
"0.75833756",
"0.7537689",
"0.7521936",
"0.7478483",
"0.74355614",
"0.73485893",
"0.73419225",
"0.7321084",
"0.72448194",
"0.72369546",
"0.72217834",
"0.7187298",
"0.71816915",
"0.70950395",
"0.70766807",
"0.70442224",
"0.7030199",
"0.7017851",
"0.69805926",
"0.69799775",
"0.69395727",
"0.693608",
"0.69119793",
"0.68502444",
"0.676299",
"0.6637844",
"0.66014004",
"0.6579768",
"0.6560802",
"0.6557745",
"0.6533237",
"0.6465594",
"0.646356",
"0.6419769",
"0.6379291",
"0.6340114",
"0.63278",
"0.629201",
"0.6280084",
"0.6276365",
"0.6275304",
"0.6264377",
"0.62396955",
"0.6237658",
"0.61775666",
"0.6144812",
"0.60926396",
"0.6091873",
"0.607973",
"0.6041162",
"0.6008875",
"0.59979635",
"0.5969094",
"0.5938021",
"0.5911242",
"0.5860747",
"0.5857125",
"0.5820204",
"0.58178693",
"0.58168924",
"0.58108956",
"0.58019966",
"0.57983476",
"0.57938534",
"0.57590884",
"0.57570964",
"0.5738604",
"0.57295525",
"0.57265186",
"0.5717269",
"0.57166326",
"0.5701715",
"0.5698658",
"0.5698658"
] | 0.80206466 | 5 |
Probably a quite common scenario | public function testDatabaseToCache()
{
$cache = Services::cache();
$databaseHandler = new DatabaseHandler($this->config, 'tests');
$cacheHandler = new CacheArchiver($this->config, $cache);
$this->schemas->draft([$databaseHandler])->archive([$cacheHandler]);
$this->assertEmpty($this->schemas->getErrors());
$schemaFromService = $this->schemas->get();
$schemaFromCache = $cache->get('schema-testing');
$this->assertCount(is_countable($schemaFromCache->tables) ? count($schemaFromCache->tables) : 0, $schemaFromService->tables);
$this->assertObjectHasAttribute('factories', $schemaFromCache->tables);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _refine() {\n\n\t}",
"abstract protected function _preProcess();",
"private function _i() {\n }",
"public function inOriginal();",
"public function helper()\n\t{\n\t\n\t}",
"abstract protected function external();",
"abstract protected function _process();",
"abstract protected function _process();",
"public static function dummy() {}",
"abstract public function is_have();",
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"private function static_things()\n\t{\n\n\t\t# code...\n\t}",
"abstract protected function requiredOperations1(): void;",
"public function temporality();",
"public function needsReprocessing() {}",
"public function testProfilePrototypeCountQuarantines()\n {\n\n }",
"protected function test9() {\n\n }",
"abstract protected function doEvil();",
"public function testRegistrationValuesTooShort(): void { }",
"protected function __init__() { }",
"public function testPreprocessingBinarizeAdvanced()\n {\n }",
"final private function __construct() {}",
"final private function __construct() {}",
"private function method2()\n\t{\n\t}",
"protected function preProcess() {}",
"protected function _ensureObservation() {}",
"private function _optimize() {}",
"public function testRegistrationValuesTooLong(): void { }",
"private function method1()\n\t{\n\t}",
"private function __construct()\t{}",
"abstract protected function data();",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"abstract protected function safetyCheck() : self;",
"abstract public function otherfoo();",
"public function test_getDuplicateLegacyLowstockContactById() {\n\n }",
"function specialop() {\n\n\n\t}",
"private final function __construct() {}",
"public function testExceptionOnPrematureDataRetrieval() // What a name\n\t{\n\t\t// no call to FACTFinder_Http_ParallelDataProvider::loadAllData();\n\t\t$result = $this->tagCloudAdapter->getTagCloud();\n\t}",
"abstract protected function before();",
"public function getAlternate() {}",
"public function isUsed()\n {\n }",
"abstract protected function _prepare();",
"public function testGetDuplicateLowStockById()\n {\n }",
"private function __() {\n }",
"public function testNonGroupingIntegration() {\n $this->markTestSkipped('Not yet implemented.');\n }",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct(){\r\r\n\t}",
"protected abstract function test();",
"protected abstract function test();",
"protected function collectInformation() {}",
"abstract protected function setup();",
"abstract protected function _run();",
"abstract protected function _run();",
"abstract function get();",
"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() {}"
] | [
"0.5336312",
"0.5325988",
"0.5264919",
"0.52455705",
"0.5167349",
"0.5144876",
"0.5121248",
"0.5121248",
"0.5106834",
"0.50930464",
"0.50695276",
"0.50695276",
"0.5054875",
"0.5039326",
"0.50328285",
"0.5004211",
"0.50015074",
"0.4996553",
"0.49907273",
"0.49593315",
"0.49476194",
"0.4933259",
"0.49227598",
"0.49227598",
"0.49110162",
"0.48998007",
"0.48921025",
"0.48883584",
"0.48870325",
"0.4877202",
"0.48752964",
"0.48641446",
"0.4836949",
"0.4836949",
"0.4836949",
"0.4836949",
"0.4828177",
"0.4825939",
"0.48186898",
"0.48163337",
"0.48157123",
"0.48129284",
"0.48114643",
"0.48056012",
"0.4804289",
"0.47991538",
"0.47964925",
"0.4791992",
"0.4785253",
"0.47845167",
"0.47845167",
"0.47845167",
"0.4783093",
"0.47736964",
"0.47736964",
"0.47697097",
"0.4758545",
"0.47561154",
"0.47561154",
"0.47481436",
"0.47453088",
"0.4744111",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853",
"0.47422853"
] | 0.0 | -1 |
Draft & archive a copy of the schema so we can test reading it | public function testGetReturnsSchemaWithReader()
{
$result = $this->schemas->draft()->archive();
$this->assertTrue($result);
$this->schemas->reset();
$schema = $this->schemas->read()->get();
$this->assertInstanceOf('\Tatter\Schemas\Reader\BaseReader', $schema->tables); // @phpstan-ignore-line
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function importSchema(){\n\t\t\t$this->exportsSchema = false;\n\t\t}",
"function exportSchema(){\n\t\t\t$this->exportsSchema=true;\n\t\t\t$this->slugField='slug';\n\t\t\t$this->spaceCharacter='-';\n\t\t}",
"public function backup_database()\n\t{\n\t\t$db = Database::instance();\n\n\t\t$tables_to_dump = array('client', 'contact', 'currency', 'invoice', 'invoice_payment', 'module', 'operation_type', 'project', 'role', 'ticket', 'time', 'user');\n\n\t\t// Add the table structure\n\t\t$sql = View::factory('admin/settings/schema/tables')->render().\"\\n\";\n\t\t// Add the constraints\n\t\t$sql.= View::factory('admin/settings/schema/constraints')->render().\"\\n\";\n\n\t\t// Dump the data\n\t\tforeach ($tables_to_dump as $model)\n\t\t{\n\t\t\t$model_name = $model.'_Model';\n\t\t\t$old = $model;\n\t\t\t$model = new $model_name;\n\n\t\t\t$rows = $model->fetch_all();\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\t$row = $row->as_array();\n\t\t\t\t$sql.= 'INSERT INTO `'.inflector::plural($old).'` ('.implode(',', array_keys($row)).') VALUES ('.implode(',', array_values($row)).')'.\"\\n\";\n\t\t\t}\n\t\t}\n\n\t\theader('Content-Description: File Transfer');\n\t\theader('Content-Type: text/plain');\n\t\theader('Content-Disposition: attachment; filename=schema.sql');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Pragma: public');\n\t\theader('Content-Length: '.strlen($sql));\n\t\tob_clean();\n\t\tflush();\n\t\techo $sql;\n\t\texit;\n\t}",
"public function cacheSchema(): void\n {\n $this->files->put($this->getCachedSchemaPath(), serialize($this->selectSchema()));\n }",
"public function saveSchema()\n {\n $db = ezcDbInstance::get();\n $schema = ezcDbSchema::createFromDb( $db );\n $schema->writeToFile( \"array\", dirname( __FILE__ ) . \"/relation.dba\" );\n }",
"public function saveSchema()\n {\n $db = ezcDbInstance::get();\n $schema = ezcDbSchema::createFromDb( $db );\n $schema->writeToFile( 'array', dirname( __FILE__ ) . '/database_type.dba' );\n }",
"protected function postSchema() {\n return $this->schemaPoster->postSchema($this->configuration['schema']);\n }",
"protected function createSchemas()\n {\n $this->connection->query(\"ATTACH DATABASE ':memory:' AS aura_test_schema2\");\n }",
"public function testDatabaseToCache()\n {\n $cache = Services::cache();\n $databaseHandler = new DatabaseHandler($this->config, 'tests');\n $cacheHandler = new CacheArchiver($this->config, $cache);\n\n $this->schemas->draft([$databaseHandler])->archive([$cacheHandler]);\n $this->assertEmpty($this->schemas->getErrors());\n\n $schemaFromService = $this->schemas->get();\n $schemaFromCache = $cache->get('schema-testing');\n $this->assertCount(is_countable($schemaFromCache->tables) ? count($schemaFromCache->tables) : 0, $schemaFromService->tables);\n\n $this->assertObjectHasAttribute('factories', $schemaFromCache->tables);\n }",
"public function updateSchema()\n {\n WFCustomManager::getInstance()->updateSchema();\n }",
"public function schema();",
"private function createSchema()\n {\n $tool = new SchemaTool($this->container->get('models'));\n $classes = [\n $this->container->get('models')->getClassMetadata(Store::class),\n ];\n $tool->updateSchema($classes, true);\n }",
"public function getSchema(): Schema;",
"function apwa_iw_schema_alter( &$schema ) {\n $schema['webform_workflow_state']['export'] = array(\n // Unique key to identify an object\n 'key' => 'wsid',\n 'key name' => 'Webform workflow state id',\n 'admin_title' => 'label',\n 'identifier' => 'preset',\n // Function hook name in Features dump\n 'default hook' => 'default_apwa_iw_workflow_state_preset',\n 'api' => array(\n // Which module \"owns\" these objects?\n 'owner' => 'apwa_iw',\n // Base name for Features include file\n 'api' => 'features',\n // Exportables API version numbers: black magic; woowoo\n 'minimum_version' => 1,\n 'current_version' => 1,\n ),\n );\n}",
"public function getSchema() {}",
"abstract protected function _getSchemaFile();",
"public function reloadSchema()\n {\n $em = $this->getEntityManager();\n $tool = new SchemaTool($em);\n $tool->dropSchema($em->getMetadataFactory()->getAllMetadata());\n $tool->createSchema($em->getMetadataFactory()->getAllMetadata());\n $this->schemaReloaded = true;\n }",
"private function prepareSchema()\n {\n $connection = Yii::app()->db;\n if ($connection->schema->getTable($this->table)) {\n try {\n $this->dropTableIfExist($connection, $this->tableMemory);\n $connection->createCommand('CREATE TABLE ' . $connection->quoteTableName($this->tableMemory) . ' LIKE ' . $connection->quoteTableName($this->table) . ';')->execute();\n $connection->createCommand('ALTER TABLE ' . $connection->quoteTableName($this->tableMemory) . ' ENGINE=MEMORY;')->execute();\n return true;\n } catch (Exception $e) {\n $this->dropTableIfExist($connection, $this->tableMemory);\n Yii::log('Schema preparation error: ' . print_r($e->getMessage(), true), 'error', 'extensions.CodMtfs.Mtfs');\n }\n } else {\n Yii::log('Nothing to copy.', 'error', 'extensions.CodMtfs.Mtfs');\n }\n return false;\n }",
"public function getExpectedDatabaseSchema() {}",
"public function create(): ISchema;",
"public function testCreateBackup()\n {\n $this->fixture->query('INSERT INTO <http://example.com/> {\n <http://s> <http://p1> \"baz\" .\n }');\n\n $this->fixture->createBackup('/tmp/backup.txt');\n\n $expectedXML = <<<XML\n<?xml version=\"1.0\"?>\n<sparql xmlns=\"http://www.w3.org/2005/sparql-results#\">\n <head>\n <variable name=\"s\"/>\n <variable name=\"p\"/>\n <variable name=\"o\"/>\n <variable name=\"g\"/>\n </head>\n <results>\n <result>\n <binding name=\"s\">\n <uri>http://s</uri>\n </binding>\n <binding name=\"p\">\n <uri>http://p1</uri>\n </binding>\n <binding name=\"o\">\n <literal>baz</literal>\n </binding>\n <binding name=\"g\">\n <uri>http://example.com/</uri>\n </binding>\n </result>\n </results>\n</sparql>\n\nXML;\n $this->assertEquals(file_get_contents('/tmp/backup.txt'), $expectedXML);\n }",
"public function compileSchema();",
"public function createSchema() : string;",
"public function test_deploy_schema()\n {\n foreach ($this->getTables() as $table) {\n DB::getInstance()->exec(\"DROP TABLE {$table}\");\n }\n $this->assertEmpty($this->getTables());\n\n # Deploy all sql's in schemas folder\n $schemas = scandir(__DIR__ . '/schemas/');\n $schemas = array_diff( $schemas, ['.','..'] );\n foreach($schemas as $schema){\n if ($schema != 'database.sql') {\n $sql = file_get_contents(__DIR__ . '/schemas/' . $schema);\n DB::getInstance()->exec($sql);\n $table = explode('.',$schema)[0];\n $this->assertContains($table, $this->getTables());\n }\n }\n }",
"protected function seedTablesStructure()\n {\n $getStructureDump = new Process(\"mysqldump -u {$this->user} -p{$this->password} --no-data {$this->oldDbName} > {$this->oldDbName}.dump\");\n $getStructureDump->run();\n\n $fillStructureDump = new Process(\"mysql -u {$this->user} -p{$this->password} {$this->newDbName} < {$this->oldDbName}.dump\");\n $fillStructureDump->run();\n\n $removeDumpFile = new Process(\"rm -f {$this->oldDbName}.dump\");\n $removeDumpFile->run();\n }",
"public function canBuildFromSchemaFile() {\n\t}",
"protected function _buildSchema(Schema $schema)\n {\n return $schema;\n }",
"public static function update_schema(): void {\n\t\tglobal $wpdb;\n\n\t\t$table_name = static::table_name();\n\t\t$table_fields = static::FIELDS;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\t\t$table_fields\n\t\t\tPRIMARY KEY (id)\n\t\t) $charset_collate;\";\n\n\t\tif ( md5( $sql ) === get_option( static::TABLE . '_schemaver', '' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( static::TABLE . '_schemaver', md5( $sql ) );\n\t}",
"protected function _buildSchema(Schema $schema)\n {\n return $schema->addField('url', 'string')\n ->addField('webroot', ['type' => 'string'])\n ->addField('force', ['type' => 'boolean']);\n }",
"public function createSchema(): OpenApi\n {\n }",
"function exportsSchema(){\n\t\t\treturn $this->exportsSchema;\n\t\t}",
"public function getSchema();",
"public function getSchema();",
"public function getSchema();",
"public static function getSchema()\n {\n }",
"protected function buildSchema(Schema $schema): Schema\n {\n $schema\n ->addField(self::FIELD_NEW_PASSWORD, 'string')\n ->addField(self::FIELD_CONFIRM_PASSWORD, 'string')\n ->addField(self::FIELD_POSTCODE, 'string');\n\n return $schema;\n }",
"function __initTransSchema() {\n\t\t$fields = $this->settings[$this->model->alias]['fields'];\n\t\t$primary = $this->model->primaryKey;\n\t\t$results = array();\n\t\t$schema = $this->model->_schema;\n\t\t$results = am($results, $this->__setSchemaField($primary, $schema[$primary]));\n\t\tforeach ($schema as $fieldname => $descArray) {\n\t\t\tif (!empty($fields)) {\n\t\t\t\tif (array_key_exists($fieldname, $fields)) {\n\t\t\t\t\t$results = am($results, $this->__setSchemaField($fieldname, $descArray));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($fieldname !== $primary) {\n\t\t\t\t\t$results = am($results, $this->__setSchemaField($fieldname, $descArray));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->__transSchema = $results;\n\t}",
"public function read()\r\n {\r\n $dataDict = Doctrine_Manager::getInstance()->getCurrentConnection()->getDataDict();\r\n\r\n $schema = new Doctrine_Schema(); /* @todo FIXME i am incomplete*/\r\n $db = new Doctrine_Schema_Database();\r\n $schema->addDatabase($db);\r\n\r\n $dbName = 'XXtest'; // @todo FIXME where should we get\r\n\r\n $this->conn->set(\"name\",$dbName);\r\n $tableNames = $dataDict->listTables();\r\n foreach ($tableNames as $tableName) {\r\n $table = new Doctrine_Schema_Table();\r\n $table->set(\"name\",$tableName);\r\n $tableColumns = $dataDict->listTableColumns($tableName);\r\n foreach ($tableColumns as $tableColumn) {\r\n $table->addColumn($tableColumn);\r\n }\r\n $this->conn->addTable($table);\r\n if ($fks = $dataDict->listTableConstraints($tableName)) {\r\n foreach ($fks as $fk) {\r\n $relation = new Doctrine_Schema_Relation();\r\n $relation->setRelationBetween($fk['referencingColumn'],$fk['referencedTable'],$fk['referencedColumn']);\r\n $table->setRelation($relation);\r\n }\r\n }\r\n }\r\n\r\n return $schema;\r\n }",
"private function getCreateSchemaWrapper()\n {\n return file_get_contents(__DIR__ . '/../Stubs/schema-create.stub');\n }",
"public function ensureSchemaBinExist()\r\n\t{\r\n\t\tif (!file_exists($this->schemaFiles)) {\r\n\t\t\tmkdir($this->schemaFiles);\r\n\t\t\tchmod($this->schemaFiles, 0777);\r\n\t\t}\r\n\t}",
"public function getSchema(): SchemaInterface;",
"abstract protected function getSchema(): string;",
"protected function setSchema($schema) {}",
"public function getSchema(): string;",
"public function getSchema(): string;",
"function ctools_export_get_schemas($for_export = FALSE) {\r\n $export_tables = &drupal_static(__FUNCTION__);\r\n if (is_null($export_tables)) {\r\n $export_tables = array();\r\n $schemas = drupal_get_schema();\r\n foreach ($schemas as $table => $schema) {\r\n if (!isset($schema['export'])) {\r\n unset($schemas[$table]);\r\n continue;\r\n }\r\n $export_tables[$table] = ctools_export_get_schema($table);\r\n }\r\n }\r\n return $for_export ? array_filter($export_tables, '_ctools_export_filter_export_tables') : $export_tables;\r\n}",
"protected function updateSchema() {\n $params = array();\n if(self::$schemaLanguage != null) {\n $params['language'] = self::$schemaLanguage;\n }\n $result = WebApi::getJSONData('ITFItems_440', 'GetSchema', 1, $params);\n\n self::$attributeSchema = array();\n foreach($result->attributes->attribute as $attributeData) {\n self::$attributeSchema[$attributeData->name] = $attributeData;\n }\n\n self::$itemSchema = array();\n foreach($result->items->item as $itemData) {\n self::$itemSchema[$itemData->defindex] = $itemData;\n }\n\n self::$qualities = array();\n foreach($result->qualities as $quality => $id) {\n self::$qualities[$id] = $quality;\n }\n }",
"function ctools_export_get_schema($table) {\r\n static $drupal_static_fast;\r\n if (!isset($drupal_static_fast)) {\r\n $drupal_static_fast['cache'] = &drupal_static(__FUNCTION__);\r\n }\r\n $cache = &$drupal_static_fast['cache'];\r\n\r\n if (empty($cache[$table])) {\r\n $schema = drupal_get_schema($table);\r\n\r\n // If our schema isn't loaded, it's possible we're in a state where it\r\n // simply hasn't been cached. If we've been asked, let's force the\r\n // issue.\r\n if (!$schema || empty($schema['export'])) {\r\n // force a schema reset:\r\n $schema = drupal_get_schema($table, TRUE);\r\n }\r\n\r\n if (!isset($schema['export'])) {\r\n return array();\r\n }\r\n\r\n if (empty($schema['module'])) {\r\n return array();\r\n }\r\n\r\n // Add some defaults\r\n $schema['export'] += array(\r\n 'key' => 'name',\r\n 'key name' => 'Name',\r\n 'object' => 'stdClass',\r\n 'status' => 'default_' . $table,\r\n 'default hook' => 'default_' . $table,\r\n 'can disable' => TRUE,\r\n 'identifier' => $table,\r\n 'primary key' => !empty($schema['primary key']) ? $schema['primary key'][0] : '',\r\n 'bulk export' => TRUE,\r\n 'list callback' => \"$schema[module]_{$table}_list\",\r\n 'to hook code callback' => \"$schema[module]_{$table}_to_hook_code\",\r\n 'cache defaults' => FALSE,\r\n 'default cache bin' => 'cache',\r\n 'export type string' => 'type',\r\n 'boolean' => TRUE,\r\n );\r\n\r\n // If the export definition doesn't have the \"primary key\" then the CRUD\r\n // save callback won't work.\r\n if (empty($schema['export']['primary key']) && user_access('administer site configuration')) {\r\n drupal_set_message(t('The export definition of @table is missing the \"primary key\" property.', array('@table' => $table)), 'error');\r\n }\r\n\r\n // Notes:\r\n // The following callbacks may be defined to override default behavior\r\n // when using CRUD functions:\r\n //\r\n // create callback\r\n // load callback\r\n // load multiple callback\r\n // load all callback\r\n // save callback\r\n // delete callback\r\n // export callback\r\n // import callback\r\n //\r\n // See the appropriate ctools_export_crud function for details on what\r\n // arguments these callbacks should accept. Please do not call these\r\n // directly, always use the ctools_export_crud_* wrappers to ensure\r\n // that default implementations are honored.\r\n $cache[$table] = $schema;\r\n }\r\n\r\n return $cache[$table];\r\n}",
"public function testSchemaUninstallation() {\n $this->assertTrue($this->schema->tableExists($this->table));\n\n /** @var \\Drupal\\Core\\Extension\\ModuleInstallerInterface $module_installer */\n $module_installer = $this->moduleInstaller;\n $module_installer->install(['yamlform_clear'], FALSE);\n $this->assertFalse($this->schema->tableExists($this->table));\n\n $yamlform_submission = YamlFormSubmission::create([\n 'yamlform_id' => 'contact',\n ]);\n $yamlform_submission->save();\n }",
"protected function dump(){\n\t\tif($this->_dumped===true){\n\t\t\treturn false;\n\t\t}\n\t\tif($this->_source==''){\n\t\t\t$this->_findModelName();\n\t\t\tif($this->_source==''){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$table = $this->_source;\n\t\t$schema = $this->_schema;\n\t\tif(!ActiveRecordMetaData::existsMetaData($table, $schema)) {\n\t\t\t$this->_dumped = true;\n\t\t\tif($this->isView==true){\n\t\t\t\t$exists = $this->_db->viewExists($table, $schema);\n\t\t\t} else {\n\t\t\t\t$exists = $this->_db->tableExists($table, $schema);\n\t\t\t}\n\t\t\tif($exists==true){\n\t\t\t\t$this->_dumpInfo($table, $schema);\n\t\t\t} else {\n\t\t\t\tif($schema!=''){\n\t\t\t\t\tthrow new ActiveRecordException('No existe la entidad \"'.$schema.'\".\"'.$table.'\" en el gestor relacional: '.get_class($this));\n\t\t\t\t} else {\n\t\t\t\t\tthrow new ActiveRecordException('No existe la entidad \"'.$table.'\" en el gestor relacional: '.get_class($this));\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif($this->isDumped()==false){\n\t\t\t\t$this->_dumped = true;\n\t\t\t\t$this->_dumpInfo($table, $schema);\n\t\t\t}\n\t\t}\n\t\t$this->_dumpLock = true;\n\t\tforeach(ActiveRecordMetaData::getAttributes($table, $schema) as $field){\n\t\t\tif(!isset($this->$field)){\n\t\t\t\t$this->$field = '';\n\t\t\t}\n\t\t}\n\t\t$this->_dumpLock = false;\n\t\treturn true;\n\t}",
"public function get_import_public_schema() {\n\t\t$schema = array(\n\t\t\t'$schema' => 'http://json-schema.org/draft-04/schema#',\n\t\t\t'title' => 'report_import',\n\t\t\t'type' => 'object',\n\t\t\t'properties' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'Regeneration status.', 'woocommerce' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t\t'message' => array(\n\t\t\t\t\t'description' => __( 'Regenerate data message.', 'woocommerce' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'context' => array( 'view', 'edit' ),\n\t\t\t\t\t'readonly' => true,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn $this->add_additional_fields_schema( $schema );\n\t}",
"function schema_alter_build(&$schema, $entity_type) {}",
"public function down(Schema $schema): void\n {\n $this->addSql('DROP TABLE bord');\n $this->addSql('DROP INDEX IDX_E090DA21A76ED395');\n $this->addSql('CREATE TEMPORARY TABLE __temp__contribute AS SELECT id, user_id, textarea, created_at, updated_at FROM contribute');\n $this->addSql('DROP TABLE contribute');\n $this->addSql('CREATE TABLE contribute (id INTEGER PRIMARY KEY AUTOINCREMENT DEFAULT NULL, user_id INTEGER DEFAULT NULL, textarea VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)\n , updated_at DATETIME DEFAULT NULL --(DC2Type:datetime_immutable)\n )');\n $this->addSql('INSERT INTO contribute (id, user_id, textarea, created_at, updated_at) SELECT id, user_id, textarea, created_at, updated_at FROM __temp__contribute');\n $this->addSql('DROP TABLE __temp__contribute');\n $this->addSql('CREATE INDEX IDX_E090DA21A76ED395 ON contribute (user_id)');\n $this->addSql('DROP INDEX UNIQ_8D93D64935C246D5');\n $this->addSql('CREATE TEMPORARY TABLE __temp__user AS SELECT id, username, age, password, email, area, image, sex, look, is_active FROM user');\n $this->addSql('DROP TABLE user');\n $this->addSql('CREATE TABLE user (id INTEGER PRIMARY KEY AUTOINCREMENT DEFAULT NULL, username VARCHAR(255) DEFAULT NULL, password VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, is_active BOOLEAN DEFAULT NULL, age INTEGER DEFAULT NULL, area VARCHAR(255) DEFAULT NULL COLLATE BINARY, sex VARCHAR(255) DEFAULT NULL COLLATE BINARY, look VARCHAR(255) DEFAULT NULL COLLATE BINARY)');\n $this->addSql('INSERT INTO user (id, username, age, password, email, area, image, sex, look, is_active) SELECT id, username, age, password, email, area, image, sex, look, is_active FROM __temp__user');\n $this->addSql('DROP TABLE __temp__user');\n $this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D64935C246D5 ON user (password)');\n }",
"private function getChangeSchemaWrapper()\n {\n return file_get_contents(__DIR__ . '/../Stubs/schema-change.stub');\n }",
"public function createSchema($schemaName = 'public');",
"function raptor_scheduling_schema()\n{\n $schema = array();\n\n $oSH = new \\raptor_sched\\DBScheduleSchema();\n $oSH->addToSchema($schema);\n \n return $schema;\n}",
"protected function silentCacheFrameworkTableSchemaMigration() {}",
"protected function savedraft()\n {\n global $INFO, $ID, $INPUT, $conf;\n\n if (class_exists('\\\\dokuwiki\\\\Draft', false)) {\n /* Release Hogfather (and above) */\n\n $draft = new \\dokuwiki\\Draft($ID, $INFO['client']);\n if (!$draft->saveDraft()) {\n $errors = $draft->getErrors();\n foreach ($errors as $error) {\n msg(hsc($error), -1);\n }\n }\n\n } else {\n /* Release Greebo and below */\n\n if (!$conf['usedraft']) return;\n if (!$INPUT->post->has('wikitext')) return;\n\n // ensure environment (safeguard when used via AJAX)\n assert(isset($INFO['client']), 'INFO.client should have been set');\n assert(isset($ID), 'ID should have been set');\n\n $draft = array(\n 'id' => $ID,\n 'prefix' => substr($INPUT->post->str('prefix'), 0, -1),\n 'text' => $INPUT->post->str('wikitext'),\n 'suffix' => $INPUT->post->str('suffix'),\n 'date' => $INPUT->post->int('date'),\n 'client' => $INFO['client'],\n );\n $cname = getCacheName($draft['client'] . $ID, '.draft');\n if (io_saveFile($cname, serialize($draft))) {\n $INFO['draft'] = $cname;\n }\n }\n }",
"public function get_schema()\n {\n }",
"public static function get_schema()\n {\n }",
"public function alterDefaultSchema(&$default_schema);",
"function _ctools_export_unpack_object($schema, $data, $object = 'stdClass') {\r\n if (is_string($object)) {\r\n if (class_exists($object)) {\r\n $object = new $object;\r\n }\r\n else {\r\n $object = new stdClass;\r\n }\r\n }\r\n\r\n // Go through our schema and build correlations.\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($data->$field)) {\r\n $object->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);\r\n\t\t\t//$object->$field = $data->$field;\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if (isset($schema['join'])) {\r\n foreach ($schema['join'] as $join_key => $join) {\r\n $join_schema = ctools_export_get_schema($join['table']);\r\n if (!empty($join['load'])) {\r\n foreach ($join['load'] as $field) {\r\n $info = $join_schema['fields'][$field];\r\n $object->$field = empty($info['serialize']) ? $data->$field : unserialize($data->$field);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $object;\r\n}",
"public function getDBAMLSchemaObj(\\Utopia\\Components\\DataModel\\DataSchema $schema) {\n $Schema = new Schema();\n $tables = array();\n $entities = $schema->getEntityNames();\n\n //FIELDS\n foreach($entities as $entity) {\n if (in_array($entity, array('types', 'options'))) {\n continue;\n }\n\n $rec = $schema->getSchema($entity);\n $tables[$entity] = $Schema->createTable($schema->getTableName($entity));\n\n //FIXME: not working: add table options\n foreach ($schema->getSchemaOptions() as $key => $val) {\n $tables[$entity]->addOption($key, $val);\n }\n\n $primary = array();\n $index = array();\n $uniqueindex = array();\n\n foreach ($rec['fields'] as $name => $spec) {\n preg_match_all('/(\\w*)(\\((\\d*)\\))?/', $spec['type'], $arr, PREG_PATTERN_ORDER);\n $type = $arr[1][0];\n\n //column\n $opts = isset($spec['opts'])? $spec['opts']: array();\n //length\n if (isset($arr[3][0]) && !empty($arr[3][0])) {\n $opts['length'] = $arr[3][0];\n }\n //null\n if (isset($spec['req']) && $spec['req']==true) {\n $opts['notnull'] = true;\n } else {\n $opts['notnull'] = false;\n }\n //unsigned\n if (isset($spec['unsigned'])) {\n $opts['unsigned'] = $spec['unsigned'];\n }\n //fixed\n if (isset($spec['fixed'])) {\n $opts['fixed'] = $spec['fixed'];\n }\n //def\n if (isset($spec['def'])) {\n $opts['default'] = $spec['def'];\n }\n //autoincrement (not working)\n if (isset($spec['autoincrement']) && $spec['autoincrement']==true) {\n $opts['autoincrement'] = true;\n $tables[$entity]->setIdGeneratorType(\\Doctrine\\DBAL\\Schema\\Table::ID_IDENTITY);\n }\n\n $tables[$entity]->addColumn($name, $type, $opts);\n\n //primary\n if (isset($spec['primary']) && $spec['primary']==true) {\n $primary[] = $name;\n }\n\n //uniqueindex\n if (isset($spec['uniqueindex']) && $spec['uniqueindex']==true) {\n $uniqueindex[] = $name;\n }\n\n //index\n if (isset($spec['index']) && $spec['index']==true) {\n $index[] = $name;\n }\n }\n\n if (!empty($primary)) {\n $tables[$entity]->setPrimaryKey($primary);\n }\n if (!empty($uniqueindex)) {\n $tables[$entity]->addUniqueIndex($uniqueindex);\n }\n if (!empty($index)) {\n $tables[$entity]->addIndex($index);\n }\n }\n\n //RELATIONSHIPS\n foreach($entities as $entity) {\n if (in_array($entity, array('types', 'options'))) {\n continue;\n }\n\n $rec = $schema->getSchema($entity);\n foreach ($rec['relationships'] as $field => $spec) {\n $tables[$entity]->addForeignKeyConstraint($tables[$spec['foreigntable']], array($field), array($spec['foreignfield']), array(\"onUpdate\" => \"CASCADE\"));\n }\n }\n return $Schema;\n }",
"function create_schema($schema) {\n\t\t$sql = \"CREATE SCHEMA \" . $schema . \";\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4,0);\n\t}",
"public function createSchema($schema_name) {}",
"function getToSchema() {\n\t\treturn $this->_toSchema;\n\t}",
"function pre_schema_upgrade()\n {\n }",
"public function addToSchema(&$schema)\n {\n $schema['raptor_protocol_lib_uploads'] = array(\n 'description' => 'Protocol library upload tracking',\n 'fields' => array(\n 'protocol_shortname' => array(\n 'type' => 'varchar',\n 'length' => 20,\n 'not null' => TRUE,\n 'default' => '',\n 'description' => 'Protocol short name which must be unique',\n ),\n 'version' => array(\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n 'default' => 1,\n 'description' => 'The version number of this protocol to match the parent record',\n ),\n 'filename' => array(\n 'type' => 'varchar',\n 'length' => 128,\n 'not null' => TRUE,\n 'default' => '',\n 'description' => 'Filename in RAPTOR of the scanned protocol',\n ),\n 'original_filename' => array(\n 'type' => 'varchar',\n 'length' => 128,\n 'not null' => FALSE,\n 'description' => 'Original filename of uploaded protocol',\n ),\n 'filetype' => array(\n 'type' => 'varchar',\n 'length' => 8,\n 'not null' => TRUE,\n 'description' => 'The uppercase file extension of the file',\n ),\n 'file_blob' => array(\n 'type' => 'blob',\n 'mysql_type' => 'mediumblob',\n 'not null' => TRUE,\n 'description' => 'The uploaded image as a blob',\n ),\n 'filesize' => array(\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n 'description' => 'Size in bytes',\n ),\n 'uploaded_by_uid' => array(\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => FALSE,\n 'description' => 'Who uploaded the file',\n ),\n 'comment_tx' => array(\n 'type' => 'varchar',\n 'length' => 1024,\n 'not null' => FALSE,\n 'default' => '',\n 'description' => 'Comment from uploader',\n ),\n 'uploaded_dt' => array(\n 'type' => 'datetime',\n 'mysql_type' => 'datetime', \n 'not null' => TRUE,\n 'description' => 'When this record was last updated',\n ),\n ),\n 'primary key' => array('protocol_shortname','version'),\n );\n }",
"public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \\'postgresql\\'.');\n\n $this->addSql('CREATE SEQUENCE draft_id_seq INCREMENT BY 1 MINVALUE 1 START 1');\n $this->addSql('CREATE TABLE draft (id INT NOT NULL, owner_id INT NOT NULL, data JSON NOT NULL, last_edit TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, PRIMARY KEY(id))');\n $this->addSql('CREATE INDEX idx_467c96947e3c61f9 ON draft (owner_id)');\n $this->addSql('ALTER TABLE draft ADD CONSTRAINT fk_467c96947e3c61f9 FOREIGN KEY (owner_id) REFERENCES service (id) NOT DEFERRABLE INITIALLY IMMEDIATE');\n }",
"public static function buildSchemaFromTable($table_name) {\n\t\ttry {\n\t\t\t// get all table information\n\t\t\t$sql = \"SELECT * FROM `INFORMATION_SCHEMA`.`COLUMNS` \";\n\t\t\t$sql .= \"WHERE `TABLE_SCHEMA`='\".SchemaBuilder::$db_name.\"'AND `TABLE_NAME`='\".$table_name.\"' \";\n\t\t\t$result = SchemaBuilder::$_db->query($sql);\n\n\t\t\t//changed so we dont have to recommit every schema on one change\n\t\t\t// $top_msg = \"<?php \\n/*\\n*****AUTOGENERATED FILE*****\\n CREATED ON:\".date(\"D M j Y G:i:s\").\"\\n*/\\n\";\n\t\t\t$top_msg = \"<?php \\n/*\\n*****AUTOGENERATED FILE*****\\n*/\\n\";\n\t\t\t$bottom_msg = \"\\n?>\";\n\t\t\t$out = \"\";\n\t\t\t$key = \"\";\n\t\t\t$delete_method = \"DELETE\";\n\t\t\t$prefix = \"\";\n\t\t\t// for each column\n\t\t\twhile ($result->hasNext()) {\n\t\t\t\t$row = $result->next();\n\t\t\t\t$out .= '$schema[\\''.$row['COLUMN_NAME'].'\\'] = array(\\'attributes\\'=> array(\\'type\\'=>\\''.$row['DATA_TYPE'].'\\', \\'is_null\\'=>\\''.$row['IS_NULLABLE'].'\\', ';\n\t\t\t\t$out .= '\\'max_length\\'=>\\''.$row['CHARACTER_MAXIMUM_LENGTH'].'\\', ';\n\t\t\t\t$out .= '\\'column_key\\' =>\\''.$row['COLUMN_KEY'].'\\'';\n\t\t\t\t$out .= \"));\\n\";\n\t\t\t\tif($prefix == \"\"){\n\t\t\t\t\t$prefix = current(explode(\"_\",$row['COLUMN_NAME']));\n\t\t\t\t}\n\t\t\t\tif ($row['COLUMN_KEY'] == 'PRI') {\n\t\t\t\t\t$key = $row['COLUMN_NAME'];\n\t\t\t\t}\n\t\t\t\tif( $row['COLUMN_NAME'] == $prefix.\"_disabled\" ){\n\t\t\t\t\t$delete_method = $row['COLUMN_NAME'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// add primary key\n\t\t\t$out .= '$schema[\\'pri\\'] = \\''.$key.'\\';';\n\t\t\t$out .= \"\\n\";\n\t\t\t$out .= '$schema[\\'delete_method\\'] = \\''.$delete_method.'\\';';\n\t\t\t$out .= \"\\n\";\n\t\t\t// add database name\n\t\t\t$out .= '$schema[\\'db_name\\'] = \\''.SchemaBuilder::$db_name.'\\'; ';\n\t\t\tfile_put_contents(SCHEMAPATH.SchemaBuilder::$namespace.\".\".$table_name.\".schema.php\", $top_msg.$out.$bottom_msg);\n\n\t\t} catch(Exception $e) {\n\t\t\treturn SchemaBuilder::send_error($e.\" Error building schema\", __FUNCTION__);\n\t\t}\n\n\t}",
"public function sensitiveSchema() {\n if (!isset($this->sensitiveSchema)) {\n $this->sensitiveSchema = $this->schema([\n 'accessTokenID',\n 'name',\n 'accessToken:s' => 'A signed version of the token.',\n 'dateInserted'\n ])->add($this->fullSchema());\n }\n return $this->sensitiveSchema;\n }",
"function createTestSchema()\n\t{\n\t\ttry {\n\t\t\t$this->conn->query(\"CREATE database IF NOT EXISTS `qtest`\");\n\t\t\t$this->conn->query(\"USE `qtest`\");\n\t\t\t\n\t\t\t$this->conn->query(\"DROP TABLE IF EXISTS test\");\n\t\t\t$this->conn->query(\"CREATE TABLE test (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `key` VARCHAR(50), `title` VARCHAR(255), `status` ENUM('NEW', 'ACTIVE', 'PASSIVE') NOT NULL DEFAULT 'NEW', PRIMARY KEY(id))\");\n\t\t\t$this->conn->query(\"INSERT INTO test VALUES (NULL, 'one', 'first row', 'ACTIVE'), (NULL, 'two', 'next row', 'ACTIVE'), (NULL, 'three', 'another row', 'PASSIVE')\");\n\t\t\t\n\t\t\t$this->conn->query(\"DROP TABLE IF EXISTS child\");\n\t\t\t$this->conn->query(\"CREATE TABLE child (`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `idTest` INTEGER UNSIGNED NOT NULL, `subtitle` VARCHAR(255), `status` ENUM('NEW', 'ACTIVE', 'PASSIVE') NOT NULL DEFAULT 'NEW', PRIMARY KEY(id))\");\n\t\t\t$this->conn->query(\"INSERT INTO child VALUES (NULL, 1, 'child 1', 'ACTIVE'), (NULL, 1, 'child 2', 'ACTIVE'), (NULL, 2, 'child X', 'ACTIVE')\");\n\t\t} catch (Exception $e) {\n\t\t\t$this->markTestSkipped('Failed to create a test table. ' . $e->getMessage());\n\t\t}\n\t}",
"private function assignSchema(): void\n {\n $action = strtolower($this->route->getAction());\n $crudActions = ['index','add','view','edit'];\n\n if (!$this->schema || $this->operation->hasSuccessResponseCode() || !in_array($action, $crudActions)) {\n return;\n }\n\n $response = (new Response())->setCode('200');\n\n foreach ($this->config->getResponseContentTypes() as $mimeType) {\n $schema = $this->getMimeTypeSchema($mimeType, $action);\n $response->pushContent(\n (new Content())\n ->setSchema($schema)\n ->setMimeType($mimeType)\n );\n }\n\n $this->operation->pushResponse($response);\n }",
"public abstract function getSchemaListToGenerate();",
"public function getSchema()\n {\n return $this->source;\n }",
"public function tearDown()\n {\n $this->_installSchema(self::$newVersion);\n parent::tearDown();\n }",
"function dw_schemas_activate() {\n\t/**\n\t * default basic structured data options\n\t */\n\t$schemas_options_array = [\n\t\t'allow_default_structured_data' => 'disallow',\n\t\t'default_posts_structured_data_schema' => '',\n\t\t'default_pages_structured_data_schema' => '',\n\t\t'structured_data' => [\n\t\t\t'allow_common_values' => \"disallow\",\n\t\t\t'author_type' => 'person',\n\t\t\t'author_name' => '',\n\t\t\t'author_image' => '',\n\t\t\t'author_contact_phones' => '',\n\t\t\t'author_contact_phone_types' => '',\n\t\t\t'author_contact_emails' => '',\n\t\t\t'author_contact_email_types' => '',\n\t\t\t'publisher_type' => 'organization',\n\t\t\t'publisher_name' => '',\n\t\t\t'publisher_image' => '',\n\t\t\t'publisher_contact_phones' => '',\n\t\t\t'publisher_contact_phone_types' => '',\n\t\t\t'publisher_contact_emails' => '',\n\t\t\t'publisher_contact_email_types' => '',\n\t\t\t'creator_type' => 'person',\n\t\t\t'creator_name' => '',\n\t\t\t'creator_image' => '',\n\t\t\t'creator_contact_phones' => '',\n\t\t\t'creator_contact_phone_types' => '',\n\t\t\t'creator_contact_emails' => '',\n\t\t\t'creator_contact_email_types' => ''\n\t\t]\n\t];\n\tupdate_option('schemas_options', $schemas_options_array);\n\t/**\n\t * default local business structured data options\n\t */\n\t$schemas_local_business_options_array = [\n\t\t'allow_default_local_business_structured_data' => 'disallow',\n\t\t'structured_data' => [\n\t\t\t[\n\t\t\t\t'office_name' => '',\n\t\t\t\t'office_address' => '',\n\t\t\t\t'office_logo' => '',\n\t\t\t\t'office_contact_phone' => '',\n\t\t\t\t'office_contact_email' => '',\n\t\t\t\t'office_url' => '',\n\t\t\t\t'office_business_days_full' => '',\n\t\t\t\t'office_business_days_short' => '',\n\t\t\t\t'office_business_hours' => '',\n\t\t\t\t'office_payment_accepted' => '',\n\t\t\t\t'office_price_range' => ''\n\t\t\t]\n\t\t]\n\t];\n\tupdate_option('schemas_local_business_options', $schemas_local_business_options_array);\n}",
"protected function dropSchemas()\n {\n }",
"public function down(Schema $schema): void\n {\n $this->addSql('CREATE SCHEMA public');\n $this->addSql('ALTER TABLE usr DROP CONSTRAINT FK_1762498CF5B7AF75');\n $this->addSql('ALTER TABLE file DROP CONSTRAINT FK_8C9F3610F675F31B');\n $this->addSql('ALTER TABLE pdf DROP CONSTRAINT FK_EF0DB8CBF396750');\n $this->addSql('ALTER TABLE video DROP CONSTRAINT FK_7CC7DA2CBF396750');\n $this->addSql('ALTER TABLE video DROP CONSTRAINT FK_7CC7DA2CCA85D888');\n $this->addSql('ALTER TABLE usr_usr DROP CONSTRAINT FK_56D56358EF6408D9');\n $this->addSql('ALTER TABLE usr_usr DROP CONSTRAINT FK_56D56358F6815856');\n $this->addSql('ALTER TABLE video DROP CONSTRAINT FK_7CC7DA2CC69D3FB');\n $this->addSql('DROP SEQUENCE address_id_seq CASCADE');\n $this->addSql('DROP SEQUENCE article_id_seq CASCADE');\n $this->addSql('DROP SEQUENCE author_id_seq CASCADE');\n $this->addSql('DROP SEQUENCE file_id_seq CASCADE');\n $this->addSql('DROP SEQUENCE security_user_id_seq CASCADE');\n $this->addSql('DROP SEQUENCE usr_id_seq CASCADE');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE article');\n $this->addSql('DROP TABLE author');\n $this->addSql('DROP TABLE file');\n $this->addSql('DROP TABLE pdf');\n $this->addSql('DROP TABLE security_user');\n $this->addSql('DROP TABLE usr');\n $this->addSql('DROP TABLE usr_usr');\n $this->addSql('DROP TABLE video');\n }",
"public function createDatabase()\n {\n /** @var \\Shopware\\Components\\Model\\ModelManager $em */\n $em = $this->get('models');\n $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool($em);\n\n $classes = [\n $em->getClassMetadata('Shopware\\CustomModels\\CustomSort\\ArticleSort'),\n ];\n\n try {\n $tool->createSchema($classes);\n } catch (\\Doctrine\\ORM\\Tools\\ToolsException $e) {\n //\n }\n }",
"function wyz_bus_save_draft() {\n\n}",
"public function restore()\n {\n $this->restoreEntrustUserTrait();\n $this->restoreSoftDeletes();\n }",
"public function down(Schema $schema): void\n {\n $this->addSql('DROP INDEX IDX_FE38F844549213EC');\n $this->addSql('CREATE TEMPORARY TABLE __temp__appointment AS SELECT id, property_id, mail_customer, date_of, message FROM appointment');\n $this->addSql('DROP TABLE appointment');\n $this->addSql('CREATE TABLE appointment (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, property_id INTEGER NOT NULL, mail_customer VARCHAR(100) NOT NULL, date_of DATETIME NOT NULL, message CLOB NOT NULL)');\n $this->addSql('INSERT INTO appointment (id, property_id, mail_customer, date_of, message) SELECT id, property_id, mail_customer, date_of, message FROM __temp__appointment');\n $this->addSql('DROP TABLE __temp__appointment');\n $this->addSql('CREATE INDEX IDX_FE38F844549213EC ON appointment (property_id)');\n $this->addSql('DROP INDEX IDX_16DB4F89549213EC');\n $this->addSql('CREATE TEMPORARY TABLE __temp__picture AS SELECT id, property_id, name FROM picture');\n $this->addSql('DROP TABLE picture');\n $this->addSql('CREATE TABLE picture (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, property_id INTEGER NOT NULL, name VARCHAR(120) NOT NULL)');\n $this->addSql('INSERT INTO picture (id, property_id, name) SELECT id, property_id, name FROM __temp__picture');\n $this->addSql('DROP TABLE __temp__picture');\n $this->addSql('CREATE INDEX IDX_16DB4F89549213EC ON picture (property_id)');\n $this->addSql('DROP INDEX IDX_8BF21CDE8C03F15C');\n $this->addSql('CREATE TEMPORARY TABLE __temp__property AS SELECT id, employee_id, title, surface, content, price, floor, rooms, address, zipcode, city, type, transaction_type, ground_size, date_of_construction, sell, slug FROM property');\n $this->addSql('DROP TABLE property');\n $this->addSql('CREATE TABLE property (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, employee_id INTEGER NOT NULL, title VARCHAR(60) NOT NULL, surface INTEGER NOT NULL, content VARCHAR(255) NOT NULL, price INTEGER NOT NULL, floor INTEGER DEFAULT NULL, rooms INTEGER NOT NULL, address VARCHAR(120) NOT NULL, zipcode VARCHAR(10) NOT NULL, city VARCHAR(120) NOT NULL, type VARCHAR(30) NOT NULL, transaction_type VARCHAR(30) NOT NULL, ground_size INTEGER NOT NULL, date_of_construction INTEGER DEFAULT NULL, sell BOOLEAN NOT NULL, slug VARCHAR(100) NOT NULL)');\n $this->addSql('INSERT INTO property (id, employee_id, title, surface, content, price, floor, rooms, address, zipcode, city, type, transaction_type, ground_size, date_of_construction, sell, slug) SELECT id, employee_id, title, surface, content, price, floor, rooms, address, zipcode, city, type, transaction_type, ground_size, date_of_construction, sell, slug FROM __temp__property');\n $this->addSql('DROP TABLE __temp__property');\n $this->addSql('CREATE INDEX IDX_8BF21CDE8C03F15C ON property (employee_id)');\n }",
"public function do_structure_test($format, $xml) {\n\n $this->set_xml_content_a($xml);\n\n // 1) Build a database from definition A\n $this->build_db($format);\n\n // 2) Extract database schema to definition B\n $conn = $this->get_connection($format);\n $this->xml_content_b = $format::extract_schema($conn->get_dbhost(), $conn->get_dbport(), $conn->get_dbname(), $conn->get_dbuser(), $conn->get_dbpass());\n \n $this->write_xml_definition_to_disk();\n\n // 3) Compare and expect zero differences between A and B\n $this->apply_options($format);\n $format::build_upgrade($this->xml_file_a, $this->xml_file_b);\n \n $upgrade_stage1_schema1_sql = $this->get_script_compress(__DIR__ . '/testdata/upgrade_stage1_schema1.sql');\n $upgrade_stage2_data1_sql = $this->get_script_compress(__DIR__ . '/testdata/upgrade_stage2_data1.sql');\n $upgrade_stage3_schema1_sql = $this->get_script_compress(__DIR__ . '/testdata/upgrade_stage3_schema1.sql');\n $upgrade_stage4_data1_sql = $this->get_script_compress(__DIR__ . '/testdata/upgrade_stage4_data1.sql');\n\n // check for no differences as expressed in DDL / DML\n $this->assertEquals(\n 0,\n preg_match('/ALTER TABLE/i', $upgrade_stage1_schema1_sql),\n \"ALTER TABLE token found in upgrade_stage1_schema1_sql\"\n );\n\n $this->assertEquals(\n 0,\n preg_match('/INSERT INTO/i', $upgrade_stage2_data1_sql),\n \"INSERT INTO token found in upgrade_stage2_data1_sql\"\n );\n\n $this->assertEquals(\n 0,\n preg_match('/ALTER TABLE/i', $upgrade_stage3_schema1_sql),\n \"ALTER TABLE token found in upgrade_stage3_schema1_sql\"\n );\n \n $this->assertEquals(\n 0,\n preg_match('/DELETE FROM/i', $upgrade_stage4_data1_sql),\n \"DELETE FROM token found in upgrade_stage4_data1_sql\"\n );\n \n \n // 4) Check for and validate tables in resultant XML definiton\n $this->compare_xml_definition();\n }",
"protected function setUp()\n {\n $this->stitcher = new SchemaStitcher();\n\n if (! is_dir(__DIR__.'/schema')) {\n mkdir(__DIR__.'/schema');\n }\n\n file_put_contents(__DIR__.'/foo.graphql', '\n #import ./schema/bar.graphql\n type Foo {\n foo: String!\n }');\n\n file_put_contents(__DIR__.'/schema/bar.graphql', '\n #import ./baz.graphql\n type Bar {\n bar: String!\n }');\n\n file_put_contents(__DIR__.'/schema/baz.graphql', '\n type Baz {\n baz: String!\n }');\n }",
"public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE addon_account (name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, shared INT NOT NULL, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE addon_account_data (id INT AUTO_INCREMENT NOT NULL, account_name VARCHAR(100) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, money INT NOT NULL, owner VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, UNIQUE INDEX index_addon_account_data_account_name_owner (account_name, owner), INDEX index_addon_account_data_account_name (account_name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE addon_inventory (name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, shared INT NOT NULL, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE addon_inventory_items (id INT AUTO_INCREMENT NOT NULL, inventory_name VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, count INT NOT NULL, owner VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, INDEX index_addon_inventory_inventory_name (inventory_name), INDEX index_addon_inventory_items_inventory_name_name (inventory_name, name), INDEX index_addon_inventory_items_inventory_name_name_owner (inventory_name, name, owner), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE aircraft_categories (name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE aircraftdealer_aircrafts (id INT AUTO_INCREMENT NOT NULL, vehicle VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE aircrafts (model VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, category VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(model)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE billing (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, sender VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, target_type VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, target VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, amount INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE boat_categories (name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE boatdealer_boats (id INT AUTO_INCREMENT NOT NULL, vehicle VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE boats (model VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, category VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(model)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE car_parking (id INT AUTO_INCREMENT NOT NULL, owner VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, plate VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, data LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, time BIGINT NOT NULL, parking VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE cardealer_vehicles (id INT AUTO_INCREMENT NOT NULL, vehicle VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE characters (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, firstname VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, lastname VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, dateofbirth VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, sex VARCHAR(1) CHARACTER SET latin1 DEFAULT \\'M\\' NOT NULL COLLATE `latin1_swedish_ci`, height VARCHAR(128) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, INDEX identifier (identifier), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE datastore (name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, shared INT NOT NULL, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE datastore_data (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, owner VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, data LONGTEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, UNIQUE INDEX index_datastore_data_name_owner (name, owner), INDEX index_datastore_data_name (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE fine_types (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, amount INT DEFAULT NULL, category INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE fine_types_biker (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, amount INT DEFAULT NULL, category INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE fine_types_gang (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, amount INT DEFAULT NULL, category INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE fine_types_gouv (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, amount INT DEFAULT NULL, category INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE fine_types_mafia (id INT AUTO_INCREMENT NOT NULL, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, amount INT DEFAULT NULL, category INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE items (name VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, `limit` INT DEFAULT -1 NOT NULL, rare INT DEFAULT 0 NOT NULL, can_remove INT DEFAULT 1 NOT NULL, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE jail (identifier VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, isjailed TINYINT(1) DEFAULT NULL, J_Time DATETIME NOT NULL, J_Cell VARCHAR(20) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, Jailer VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, Jailer_ID VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(identifier)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE job_grades (id INT AUTO_INCREMENT NOT NULL, job_name VARCHAR(50) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, grade INT NOT NULL, name VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, salary INT NOT NULL, skin_male LONGTEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, skin_female LONGTEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE jobs (name VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(50) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, whitelisted TINYINT(1) DEFAULT \\'0\\' NOT NULL, SecondaryJob TINYINT(1) DEFAULT \\'0\\' NOT NULL, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE licenses (type VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(type)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE org (name VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE org_gradeorg (id INT AUTO_INCREMENT NOT NULL, org_name VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, gradeorg INT NOT NULL, name VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, salary INT NOT NULL, skin_male LONGTEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, skin_female LONGTEXT CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE organisation_moneywash (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, organisation VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, amount INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE owned_aircrafts (plate VARCHAR(12) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, owner VARCHAR(30) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, state TINYINT(1) DEFAULT \\'0\\' NOT NULL COMMENT \\'State of the aircraft\\', vehicle LONGTEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE owned_boats (plate VARCHAR(12) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, owner VARCHAR(30) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, state TINYINT(1) DEFAULT \\'0\\' NOT NULL COMMENT \\'State of the boat\\', vehicle LONGTEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE owned_properties (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price DOUBLE PRECISION NOT NULL, rented INT NOT NULL, owner VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE owned_vehicles (plate VARCHAR(12) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, owner VARCHAR(22) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, state TINYINT(1) DEFAULT \\'0\\' NOT NULL COMMENT \\'Etat de la voiture\\', vehicle LONGTEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, type VARCHAR(20) CHARACTER SET latin1 DEFAULT \\'car\\' NOT NULL COLLATE `latin1_swedish_ci`, job VARCHAR(20) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, `stored` TINYINT(1) DEFAULT \\'0\\' NOT NULL, garage VARCHAR(200) CHARACTER SET latin1 DEFAULT \\'A\\' COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE phone_app_chat (id INT AUTO_INCREMENT NOT NULL, channel VARCHAR(20) CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, message VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE phone_calls (id INT AUTO_INCREMENT NOT NULL, owner VARCHAR(10) CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci` COMMENT \\'Num tel proprio\\', num VARCHAR(10) CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci` COMMENT \\'Num reférence du contact\\', incoming INT NOT NULL COMMENT \\'Défini si on est à l\\'\\'origine de l\\'\\'appels\\', time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, accepts INT NOT NULL COMMENT \\'Appels accepter ou pas\\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE phone_messages (id INT AUTO_INCREMENT NOT NULL, transmitter VARCHAR(10) CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, receiver VARCHAR(10) CHARACTER SET utf8 NOT NULL COLLATE `utf8_general_ci`, message VARCHAR(255) CHARACTER SET utf8 DEFAULT \\'0\\' NOT NULL COLLATE `utf8_general_ci`, time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, isRead INT DEFAULT 0 NOT NULL, owner INT DEFAULT 0 NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE phone_users_contacts (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(60) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_general_ci`, number VARCHAR(10) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_general_ci`, display VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT \\'-1\\' NOT NULL COLLATE `utf8mb4_general_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE playerstattoos (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_general_ci`, tattoos VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_general_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE properties (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, entering VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, `exit` VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, inside VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, outside VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, ipls VARCHAR(255) CHARACTER SET latin1 DEFAULT \\'[]\\' COLLATE `latin1_swedish_ci`, gateway VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, is_single INT DEFAULT NULL, is_room INT DEFAULT NULL, is_gateway INT DEFAULT NULL, room_menu VARCHAR(255) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE rented_aircrafts (plate VARCHAR(12) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, vehicle VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, player_name VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, base_price INT NOT NULL, rent_price INT NOT NULL, owner VARCHAR(30) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE rented_boats (plate VARCHAR(12) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, vehicle VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, player_name VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, base_price INT NOT NULL, rent_price INT NOT NULL, owner VARCHAR(30) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE rented_vehicles (plate VARCHAR(12) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, vehicle VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, player_name VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, base_price INT NOT NULL, rent_price INT NOT NULL, owner VARCHAR(22) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE shops (id INT AUTO_INCREMENT NOT NULL, store VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, item VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE shops2 (id INT AUTO_INCREMENT NOT NULL, store VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, item VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE society_moneywash (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, society VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, amount INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE truck_inventory (id INT AUTO_INCREMENT NOT NULL, item VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, count INT NOT NULL, plate VARCHAR(8) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, itemt VARCHAR(50) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, owned VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, UNIQUE INDEX item (item, plate), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE twitter_accounts (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(50) CHARACTER SET utf8 DEFAULT \\'0\\' NOT NULL COLLATE `utf8_general_ci`, password VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT \\'0\\' NOT NULL COLLATE `utf8mb4_bin`, avatar_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, UNIQUE INDEX username (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE twitter_likes (id INT AUTO_INCREMENT NOT NULL, authorId INT DEFAULT NULL, tweetId INT DEFAULT NULL, INDEX FK_twitter_likes_twitter_tweets (tweetId), INDEX FK_twitter_likes_twitter_accounts (authorId), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE twitter_tweets (id INT AUTO_INCREMENT NOT NULL, authorId INT NOT NULL, realUser VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, message VARCHAR(256) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, time DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, likes INT DEFAULT 0 NOT NULL, INDEX FK_twitter_tweets_twitter_accounts (authorId), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_accessories (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_bin`, mask VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_bin`, label VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT \\'Masque\\' COLLATE `utf8mb4_bin`, type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, `index` INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_accounts (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(22) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, money DOUBLE PRECISION DEFAULT \\'0\\' NOT NULL, INDEX identifier (identifier), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_contacts (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(22) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(100) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, number INT NOT NULL, INDEX index_user_contacts_identifier_name_number (identifier, name, number), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_inventory (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(22) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, item VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, count INT NOT NULL, INDEX identifier (identifier), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_licenses (id INT AUTO_INCREMENT NOT NULL, type VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, owner VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, INDEX owner (owner), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_parkings (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, garage VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, zone INT NOT NULL, vehicle LONGTEXT CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, INDEX identifier (identifier), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE user_tenue (id INT AUTO_INCREMENT NOT NULL, identifier VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, tenue LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_bin`, label VARCHAR(20) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = MyISAM COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE users (identifier VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, license VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, money INT DEFAULT NULL, name VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT \\'\\' COLLATE `utf8mb4_bin`, skin LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, job VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT \\'unemployed\\' COLLATE `utf8mb4_bin`, job_grade INT DEFAULT 0, job2 VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT \\'unemployed2\\' COLLATE `utf8mb4_bin`, job2_grade INT DEFAULT 0, loadout LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, position VARCHAR(200) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, bank INT DEFAULT NULL, permission_level INT DEFAULT NULL, `group` VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, is_dead TINYINT(1) DEFAULT \\'0\\', firstname VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT \\'\\' COLLATE `utf8mb4_bin`, lastname VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT \\'\\' COLLATE `utf8mb4_bin`, dateofbirth VARCHAR(25) CHARACTER SET utf8mb4 DEFAULT \\'\\' COLLATE `utf8mb4_bin`, sex VARCHAR(10) CHARACTER SET utf8mb4 DEFAULT \\'\\' COLLATE `utf8mb4_bin`, height VARCHAR(5) CHARACTER SET utf8mb4 DEFAULT \\'\\' COLLATE `utf8mb4_bin`, last_property VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, status LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, jail INT DEFAULT 0 NOT NULL, phone_number VARCHAR(10) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_bin`, hair LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_bin`, UNIQUE INDEX identifier (identifier)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE vehicle_categories (name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, label VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE vehicle_sold (plate VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, client VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, model VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, soldby VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, date VARCHAR(50) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(plate)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE vehicles (model VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, name VARCHAR(60) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, category VARCHAR(60) CHARACTER SET latin1 DEFAULT NULL COLLATE `latin1_swedish_ci`, PRIMARY KEY(model)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE weashops (id INT AUTO_INCREMENT NOT NULL, zone VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, item VARCHAR(255) CHARACTER SET latin1 NOT NULL COLLATE `latin1_swedish_ci`, price INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE whitelist (identifier VARCHAR(40) CHARACTER SET utf8 NOT NULL COLLATE `utf8_bin`, PRIMARY KEY(identifier)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE twitter_likes ADD CONSTRAINT FK_twitter_likes_twitter_accounts FOREIGN KEY (authorId) REFERENCES twitter_accounts (id)');\n $this->addSql('ALTER TABLE twitter_likes ADD CONSTRAINT FK_twitter_likes_twitter_tweets FOREIGN KEY (tweetId) REFERENCES twitter_tweets (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE twitter_tweets ADD CONSTRAINT FK_twitter_tweets_twitter_accounts FOREIGN KEY (authorId) REFERENCES twitter_accounts (id)');\n $this->addSql('DROP TABLE user');\n }",
"protected function createDatabaseStructure()\n {\n /** @var SqlSchemaMigrationService $schemaMigrationService */\n $schemaMigrationService = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Install\\\\Service\\\\SqlSchemaMigrationService');\n /** @var ObjectManager $objectManager */\n $objectManager = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n /** @var SqlExpectedSchemaService $expectedSchemaService */\n $expectedSchemaService = $objectManager->get('TYPO3\\\\CMS\\\\Install\\\\Service\\\\SqlExpectedSchemaService');\n\n // Raw concatenated ext_tables.sql and friends string\n $expectedSchemaString = $expectedSchemaService->getTablesDefinitionString(true);\n $statements = $schemaMigrationService->getStatementArray($expectedSchemaString, true);\n list($_, $insertCount) = $schemaMigrationService->getCreateTables($statements, true);\n\n $fieldDefinitionsFile = $schemaMigrationService->getFieldDefinitions_fileContent($expectedSchemaString);\n $fieldDefinitionsDatabase = $schemaMigrationService->getFieldDefinitions_database();\n $difference = $schemaMigrationService->getDatabaseExtra($fieldDefinitionsFile, $fieldDefinitionsDatabase);\n $updateStatements = $schemaMigrationService->getUpdateSuggestions($difference);\n\n $result = [];\n $updateResult = $schemaMigrationService->performUpdateQueries($updateStatements['add'], $updateStatements['add']);\n if (is_array($updateResult)) {\n $failedStatements = array_intersect_key($updateStatements['add'], $updateResult);\n foreach ($failedStatements as $key => $query) {\n $result[$key] = 'Query \"' . $query . '\" returned \"' . $updateResult[$key] . '\"';\n }\n }\n $updateResult = $schemaMigrationService->performUpdateQueries($updateStatements['change'], $updateStatements['change']);\n if (is_array($updateResult)) {\n $failedStatements = array_intersect_key($updateStatements['change'], $updateResult);\n foreach ($failedStatements as $key => $query) {\n $result[$key] = 'Query \"' . $query . '\" returned \"' . $updateResult[$key] . '\"';\n }\n }\n $updateResult = $schemaMigrationService->performUpdateQueries($updateStatements['create_table'], $updateStatements['create_table']);\n if (is_array($updateResult)) {\n $failedStatements = array_intersect_key($updateStatements['create_table'], $updateResult);\n foreach ($failedStatements as $key => $query) {\n $result[$key] = 'Query \"' . $query . '\" returned \"' . $updateResult[$key] . '\"';\n }\n }\n\n if (!empty($result)) {\n throw new \\RuntimeException(implode(\"\\n\", $result), 1505058450);\n }\n\n foreach ($insertCount as $table => $count) {\n $insertStatements = $schemaMigrationService->getTableInsertStatements($statements, $table);\n foreach ($insertStatements as $insertQuery) {\n $insertQuery = rtrim($insertQuery, ';');\n /** @var DatabaseConnection $database */\n $database = $GLOBALS['TYPO3_DB'];\n $database->admin_query($insertQuery);\n }\n }\n }",
"function prepareBodyBackup() {\n try {\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n\n DB::execute(\"CREATE TABLE \" . TABLE_PREFIX . \"content_backup (\n id int(11) unsigned NOT NULL auto_increment,\n parent_type varchar(50) default NULL,\n parent_id int(10) unsigned default NULL,\n body longtext,\n PRIMARY KEY (id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }",
"public function schema()\n {\n return [\n 'post' => [\n 'name' => 'string', \n 'surname' => 'string', \n 'description' => 'string', \n 'gender' => 'string[male|female]', \n 'phone' => 'string', \n 'email' => 'string[email]', \n 'pobox' => 'string', \n 'group_id' => 'number',\n 'address' => [\n 'billing' => [\n 'name' => 'string',\n 'surname' => 'string',\n 'phone' => 'string',\n 'address_1' => 'string',\n 'address_2' => 'string',\n 'country' => 'string',\n 'city' => 'string',\n 'pobox' => 'string',\n 'company' => 'string',\n ], \n 'shipping' => [\n 'name' => 'string',\n 'surname' => 'string',\n 'phone' => 'string',\n 'address_1' => 'string',\n 'address_2' => 'string',\n 'country' => 'string',\n 'city' => 'string',\n 'pobox' => 'string',\n 'company' => 'string',\n ]\n ]\n ], \n 'put' => [\n 'name' => 'string', \n 'surname' => 'string', \n 'description' => 'string', \n 'gender' => 'string[male|female]', \n 'phone' => 'string', \n 'email' => 'string[email]', \n 'pobox' => 'string', \n 'group_id' => 'number'\n ]\n ];\n }",
"public function testUnableToLoadInitialSchema()\n\t {\n\t\tdefine(\"EXCEPTION_UNABLE_TO_LOAD_SCHEMA\", 1);\n\n\t\tif (file_exists($this->_testsetfolder . \"/3.xsd\") === true)\n\t\t {\n\t\t\tunlink($this->_testsetfolder . \"/3.xsd\");\n\t\t }\n\n\t\tcopy($this->_testsetfolder . \"/2.xsd\", $this->_testsetfolder . \"/3.xsd\");\n\t\t$externals = new SchemaExternals();\n\t\tunlink($this->_testsetfolder . \"/3.xsd\");\n\t\t$externals->getID($this->_testsetfolder . \"/3.xsd\");\n\t }",
"public function dumpBuild($option)\r\n\t{\r\n\t\t$response = \"\";\r\n\t\t$this->removeExistingSchema();\r\n\t\t$this->ensureSchemaBinExist();\r\n\t\t$res = $this->schema->schemaDump($option);\r\n\t\tif ($res == 0) {\r\n\t\t\tif ($option == \"prune\") {\r\n\t\t\t\t$this->prune();\r\n\t\t\t}\r\n\t\t\t$response .= nl2br(\"Database schema dumped successfully.\\n\");\r\n\t\t} else {\r\n\t\t\t$response .= nl2br(\"Failed: database schema failed to dump.\\n\");\r\n\t\t}\r\n\r\n\t\treturn $response;\r\n\t}",
"public static function output_schema() {\n\n\t\t\t$pre_data_schema = self::pre_data_schema();\n\n\t\t\tforeach ( $pre_data_schema as $json ) {\n\n\t\t\t\techo '<script type=\"application/ld+json\">' . wp_json_encode( $json, JSON_PRETTY_PRINT ) . '</script>';\n\t\t\t}\n\t\t}",
"function wp_cf7b_install() { \r\n global $wpdb; \r\n \r\n $cf7BackupTable = \"CREATE TABLE IF NOT EXISTS `\".$wpdb->prefix.\"contact_form7_backup` (\r\n `id` int(15) unsigned NOT NULL AUTO_INCREMENT, \r\n `form_title` VARCHAR(100) NOT NULL, \r\n `form_id` VARCHAR(50) NOT NULL, \r\n `date` DATETIME,\r\n PRIMARY KEY (`id`)\r\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\"; \r\n\t\r\n //Response payment details returned from api\r\n $cf7BackupFieldsConnection = \"CREATE TABLE IF NOT EXISTS `\".$wpdb->prefix.\"contact_form7_backup_fields` (\r\n `id` int(15) unsigned NOT NULL AUTO_INCREMENT,\r\n `title` VARCHAR(100) NOT NULL, \r\n `cf7_field_name` VARCHAR(100) NOT NULL, \r\n `cf7_backup_column` VARCHAR(100) NOT NULL, \r\n PRIMARY KEY (`id`)\r\n )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1\";\r\n \r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n dbDelta($cf7BackupTable);\r\n dbDelta($cf7BackupFieldsConnection);\r\n}",
"public function build()\n {\n return $this->schema->toArray();\n }",
"public function createContentAndCopyDraftPage() {}",
"public function archive()\n {\n return $this->client->requestWithResource($this, 'PUT', '/archived', [\n 'headers' => ['X-Contentful-Version' => $this->getSystemProperties()->getVersion()],\n ]);\n }",
"public function down(Schema $schema) : void\n {\n $this->addSql('CREATE SCHEMA public');\n }",
"function ctools_export_unpack_object($table, $data) {\r\n $schema = ctools_export_get_schema($table);\r\n return _ctools_export_unpack_object($schema, $data, $schema['export']['object']);\r\n}",
"public function setSchema($schema){\n\t\tCoreType::assertString($schema);\n\t\tif($schema!=$this->_schema){\n\t\t\t$this->_dumped = false;\n\t\t}\n\t\t$this->_schema = $schema;\n\t}",
"public function generateSchema(): array\n {\n if (! $this->context->get('is_entry')) {\n return [];\n }\n\n // Site owner: Organization/Person.\n $siteOwner = $this->generateOwnerSchema();\n\n // WebSite.\n $website = $this->generateWebSiteSchema();\n $website->addData('publisher', ['@id' => $siteOwner->getData('@id')]);\n\n // WebPage.\n $webpage = $this->generateWebPageSchema();\n $webpage->addData('isPartOf', ['@id' => $website->getData('@id')]);\n $webpage->addData('about', ['@id' => $siteOwner->getData('@id')]);\n\n // Article (Posts collection only).\n $article = null;\n\n if ($this->context->get('collection')->handle() === 'posts') {\n $article = $this->generateArticleSchema();\n $article->addData('mainEntityOfPage', ['@id' => $webpage->getData('@id')]);\n $article->addData('publisher', ['@id' => $siteOwner->getData('@id')]);\n }\n\n // Featured image.\n $primaryImage = $this->generateFeaturedImageSchema();\n\n // Schema Graph\n $schema = new Schema();\n $schema->addGraph($siteOwner);\n $schema->addGraph($website);\n $schema->addGraph($webpage);\n $schema->addGraph($article);\n\n if ($primaryImage) {\n $webpage->addData('primaryImageOfPage', ['@id' => $primaryImage->getData('@id')]);\n $article->addData('image', ['@id' => $primaryImage->getData('@id')]);\n\n $schema->addGraph($primaryImage);\n }\n\n return array_filter([\n $schema->generate(),\n $this->getAdditionalSchema()\n ]);\n }"
] | [
"0.64980197",
"0.6304061",
"0.5998986",
"0.5993768",
"0.5992397",
"0.59454143",
"0.5918905",
"0.58127356",
"0.5762355",
"0.5558237",
"0.55109763",
"0.5503556",
"0.5491102",
"0.5472427",
"0.54613036",
"0.5451827",
"0.5375669",
"0.5366491",
"0.5337373",
"0.5333932",
"0.53098863",
"0.5281076",
"0.52739996",
"0.5244396",
"0.5239163",
"0.52241826",
"0.5217508",
"0.5217082",
"0.5211109",
"0.5198465",
"0.5148146",
"0.51337916",
"0.51337916",
"0.51337916",
"0.5119144",
"0.51042056",
"0.509764",
"0.5089037",
"0.5086188",
"0.50625837",
"0.505067",
"0.50208473",
"0.5016699",
"0.5008228",
"0.5008228",
"0.4998954",
"0.49979657",
"0.49912316",
"0.49834192",
"0.49823195",
"0.49756587",
"0.4971515",
"0.49676803",
"0.4952527",
"0.49204764",
"0.49180573",
"0.49101058",
"0.49089697",
"0.49088883",
"0.49012277",
"0.48838714",
"0.4868774",
"0.48561049",
"0.4850989",
"0.48504445",
"0.48499903",
"0.48476383",
"0.48370355",
"0.48370284",
"0.48358956",
"0.48231888",
"0.48216435",
"0.48201832",
"0.4818602",
"0.48184073",
"0.4817739",
"0.48161688",
"0.4809487",
"0.4802508",
"0.48018855",
"0.47984472",
"0.47973943",
"0.47940457",
"0.47831598",
"0.47767413",
"0.47742102",
"0.47704452",
"0.47653994",
"0.4765192",
"0.4762866",
"0.47528452",
"0.4741846",
"0.47397318",
"0.47374293",
"0.47320318",
"0.4728236",
"0.47263455",
"0.4720642",
"0.47046483",
"0.46942028"
] | 0.57859164 | 8 |
delete userfolder and all related data DISABLED | function delete()
{
// DISABLED
return false;
// always call parent delete function first!!
if (!parent::delete())
{
return false;
}
// put here userfolder specific stuff
// always call parent delete function at the end!!
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deleteFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'.$user_dir; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}",
"function delete_all_user_settings()\n {\n }",
"function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }",
"function deleteFolder();",
"public function removeTempFolderNDataAction()\n {\n $user_id = Auth_UserAdapter::getIdentity()->getId();\n Helper_common::deleteDir(SERVER_PUBLIC_PATH.'/images/albums/temp_storage_for_socialize_wall_photos_post/user_'.$user_id.'/');\n }",
"public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }",
"public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $model->content = true;\n $model->feedback = true;\n $model->wall = true;\n $model->make();\n }\n\n // delete avatars\n File::remove('/upload/user/avatar/big/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/small/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/original/' . $uid . '.jpg');\n // delete user profile and auth data\n $user->profile()->delete();\n // delete user provider data\n $user->provider()->delete();\n // delete user object\n $user->delete();\n }\n }",
"function delLogin(){\n unlink($this->fHtaccess);\n }",
"function delLogin(){\n unlink($this->fHtaccess);\n }",
"public function delete_user_account() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n // Delete the user's data saved by apps\n $this->load->file(APPPATH . '/apps/main.php');\n\n // List all apps\n foreach (glob(APPPATH . 'apps/collection/*', GLOB_ONLYDIR) as $dir) {\n\n $app_dir = trim(basename($dir) . PHP_EOL);\n\n // Create an array\n $array = array(\n 'MidrubApps',\n 'Collection',\n ucfirst($app_dir),\n 'Main'\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Delete user's data\n (new $cl())->delete_account($this->user_id);\n\n }\n \n // Delete connected social accounts\n $this->networks->delete_network('all', $this->user_id);\n \n // Delete campaigns\n $this->campaigns->delete_campaigns($this->user_id);\n \n // Delete templates\n $this->campaigns->delete_templates($this->user_id);\n \n // Delete lists\n $this->campaigns->delete_lists($this->user_id);\n \n // Delete schedules\n $this->campaigns->delete_schedules($this->user_id);\n \n // Load Fourth Helper\n $this->load->helper('fourth_helper');\n \n // Load Tickets Model\n $this->load->model('tickets');\n \n // Delete tickets\n $this->tickets->delete_tickets($this->user_id);\n \n // Load Botis Model\n $this->load->model('botis');\n \n // Delete all user's bots\n $this->botis->delete_user_bots($this->user_id);\n \n // Load Activity Model\n $this->load->model('activity');\n \n // Delete all user's activity\n $this->activity->delete_user_activity($this->user_id);\n \n // Load Media Model\n $this->load->model('media');\n \n // Get all user medias\n $getmedias = $this->media->get_user_medias($this->user_id, 0, 1000000);\n \n // Verify if user has media and delete them\n if ( $getmedias ) {\n \n // Load Media Helper\n $this->load->helper('media_helper');\n \n foreach( $getmedias as $media ) {\n delete_media($media->media_id, false);\n }\n \n }\n \n // Load Team Model\n $this->load->model('team');\n \n // Delete the user's team\n $this->team->delete_members( $this->user_id );\n \n // Load Activities Model\n $this->load->model('activities');\n \n // Delete the user's activities\n $this->activities->delete_activity( $this->user_id, 0 ); \n \n // Delete user account\n if ( $this->user->delete_user($this->user_id) ) {\n \n // Deletes user's session\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('member');\n $this->session->unset_userdata('autodelete');\n \n echo json_encode(array(\n 'success' => TRUE,\n 'message' => $this->lang->line('mm64')\n )); \n \n } else {\n \n echo json_encode(array(\n 'success' => FALSE,\n 'message' => $this->lang->line('mm65')\n )); \n \n }\n \n }",
"function delLogin(){\r\n\t\tunlink($this->fHtaccess);\r\n\t}",
"Public Function PermanentDelete()\n\t{\n\t\t$this->_db->delete('bevomedia_user', 'ID = ' . $this->id);\n\t\t$this->_db->delete('bevomedia_user_info', 'ID = ' . $this->id);\n\t}",
"function delete_user_dir($userId) {\n\t$userDir=get_user_dir($userId);\t\n\tif($userDir) {\t\t\n\t\t//File destination\n\t\t$userPath=FS_PATH.$userDir;\"some/dir/*.txt\";\n\t\tarray_map('unlink', glob(FS_PATH.$userDir.\"/*.*\"));\n\t\tif(rmdir($userPath)) { \n\t\t\treturn true;\n\t\t} else return false;\t\t\n\t} else {\n\t\terror_log(\"delete_user_dir: user_dir could not be found.\",0);\n\t\treturn false;\n\t}\n}",
"public function delete_all_files($user){\n $data['acc_yr'] = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n $acc_yr = str_replace('/','-' ,$this->acc_year[0]['academic_year']);\n \n $files = glob('./sProMAS_documents/'. $acc_yr.'/registration_files/'.$user.'/*'); // get all file names\n foreach($files as $file){ // iterate files\n if(is_file($file)){\n if(unlink($file)){\n $file_del=TRUE;\n } // delete file\n }\n }\n $data['user']=$user;\n if($file_del==TRUE){\n $data['message'] = 'File deleted successfully';\n } else {\n $data['message'] = 'File not deleted, Try again';\n } \n //$data['views']= array('manage_users/add_group_view');\n //page_load($data);\n \n }",
"function deleteDocument($userSpace){\n unlink(\"$userSpace/friends.txt\");\n if ( $handle = opendir( \"$userSpace/files\" ) ) {\n while ( false !== ( $item = readdir( $handle ) ) ) {\n if ( $item != \".\" && $item != \"..\" ) {\n if( unlink( \"$userSpace/files/$item\" ) ) echo \"delete the file successfully:$userSpace/$item \\n\"; \n }\n }\n closedir( $handle );\n rmdir(\"$userSpace/files\");\n if( rmdir( $userSpace ) ) echo \"delete Directory successfully: $userSpace \\n\";\n }\n }",
"public function deleteFolderPerm(){\r\n\t\t//Get the folder key\r\n\t\t$folder_key = $this->uri->segment(3);\r\n\r\n\t\t//Check if the folder exists\r\n\t\tif(!$this->DataModel->folderExists(array('public_key' => $folder_key), $this->authentication->uid) == TRUE){\r\n\t\t\t//Folder doesn't exist. Redirect to dashboard\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\t\t//Get more information about the folder\r\n\t\t$folderDetails = $this->DataModel->getFolderInfo(array('public_key' => $folder_key), $this->authentication->uid);\r\n\r\n\t\t//Ok, let's start to delete the folder...\r\n\t\t//First we need to check if there is any content in it\r\n\r\n\t\t//Get all folders in that folder\r\n\t\t$folderContent = $this->DataModel->getContent($folderDetails['id'], $this->authentication->uid);\r\n\r\n\t\t//Check if the folder is empty\r\n\t\tif(empty($folderContent['files']) && empty($folderContent['folders'])){\r\n\t\t\t//Simply delete the folder and redirect to the parent of that folder\r\n\t\t\t$this->DataModel->deleteFolder($folder_key);\r\n\r\n\t\t\t$this->successMessage[] = 'The selected folder was deleted successfuly';\r\n\t\t\t$this->save_messages();\r\n\r\n\t\t\t//Get the parent of that folder\r\n\t\t\tredirect('trashcan');\r\n\r\n\t\t\t$parentDetails = $this->DataModel->getFolderInfo(array('id' => $folderDetails['parent']), $this->authentication->uid);\r\n\t\t\tredirect('folders/'.$parentDetails['public_key']);\r\n\t\t}\r\n\r\n\t\t//Ok there's still content in that folder. Loop through all subfolders and get the files\r\n\t\t$this->allFiles = array();\r\n\t\t$this->allFolders = [$folderDetails['id']];\r\n\t\t$this->allFiles = $folderContent['files'];\r\n\r\n\t\t$this->findAllFiles($folderContent['folders']);\r\n\r\n\r\n\t\t//Ok, now load every storage engine that we need\r\n\t\t$storage_engines = array();\r\n\t\tforeach($this->allFiles as $file){\r\n\r\n\t\t\t//Load the storage engine\r\n\t\t\tif(!isset($storage_engines[$file['storage_engine']])){\r\n\t\t\t\t$storage_engines[$file['storage_engine']] = array();\r\n\r\n\t\t\t\t$storageDetails = $this->DataModel->storageEngine($file['storage_engine']);\r\n\r\n\t\t\t\t//Try to load the storage engine\r\n\t\t\t\ttry {\r\n\t\t\t\t\trequire_once(APPPATH.'libraries/storage/'.$storageDetails['library_name'].'/init.php');\r\n\t\t\t\t\t$storage_engines[$file['storage_engine']] = new $storageDetails['library_name']();\r\n\t\t\t\t\t$storage_engines[$file['storage_engine']]->connect();\r\n\t\t\t\t} catch (Exception $e) {\r\n\t\t\t\t\t$this->errorMessage($this->lang->line('error_storage_generic'));\r\n\t\t\t\t\tredirect('trashcan');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Delete the file from the storage engine\r\n\t\t\ttry {\r\n\t\t\t\t$storage_engines[$file['storage_engine']]->delete($file['storage_name']);\r\n\t\t\t\t$storage_engines[$file['storage_engine']]->delete('thumb_'.$file['storage_name']);\r\n\t\t\t}catch (Exception $e){}\r\n\t\t\t//Delete the files from the database\r\n\t\t\t$this->DataModel->delete($file['storage_name']);\r\n\t\t}\r\n\r\n\r\n\t\t//Delete all folders from the database\r\n\t\tforeach($this->allFolders as $f){\r\n\t\t\t$this->DataModel->deleteFolderSearch(array('id' => $f));\r\n\t\t}\r\n\r\n\t\t$this->successMessage($this->lang->line('success_folder_deleted_perm'));\r\n\r\n\t\t//Get the parent of that folder\r\n\t\tredirect('trashcan');\r\n\r\n\t}",
"protected function removeBackupFolder() {}",
"public static function cleanAllAppUser()\n {\n Bll_Cache::delete(self::getCacheKey('getAllAppUser'));\n }",
"function deleteAndBuildDebugUserDataFile() {\n\t\tclearAllUsers();\n\t\t$db = connectToDatabase();\n\t\twriteUser(\t\t\t\t\t-1, \"admin\",\t\"admin\",\ttrue);\n\t\twriteUser(insertarUsuario($db), \"miguel\",\t\"1234aa\",\tfalse);\n\t\twriteUser(\t\t\t\t\t-1, \"admin2\",\t\"admin\",\ttrue);\n\t\twriteUser(insertarUsuario($db), \"cesar\",\t\"aa1234\",\tfalse);\n\t\twriteUser(insertarUsuario($db), \"luis\",\t\t\"12aa34\",\tfalse);\n\t\tcloseConnection($db);\n\t}",
"function d4os_io_db_070_os_user_delete($uuid) {\n // TODO : delete all assets (impossible ?)\n // TODO : delete groups\n\n // delete offline messages\n drupal_set_message(t('Deleting offline messages.'));\n d4os_io_db_070_offline_message_user_delete($uuid);\n/*\n // delete search\n drupal_set_message(t('Deleting search info.'));\n d4os_io_db_070_os_search_user_delete($uuid);\n*/\n // delete profile\n drupal_set_message(t('Deleting profile info.'));\n d4os_io_db_070_os_profile_user_delete($uuid);\n\n // delete attachments and inventory\n drupal_set_message(t('Deleting inventory.'));\n d4os_io_db_070_os_inventory_user_delete($uuid);\n\n // delete sessions\n drupal_set_message(t('Deleting sessions.'));\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {Presence} WHERE UserID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n/*\n // delete friends\n drupal_set_message(t('Deleting friends.'));\n d4os_io_db_070_set_active('os_users');\n db_query(\"DELETE FROM {userfriends} WHERE ownerID='%s' OR friendID = '%s'\", array($uuid, $uuid));\n d4os_io_db_070_set_active('default');\n*/\n // delete user entry in the grid\n drupal_set_message(t('Deleting user.'));\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {UserAccounts} WHERE PrincipalID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {auth} WHERE UUID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {GridUser} WHERE UserID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n\n // delete the user drupal link \n db_query(\"DELETE FROM {d4os_ui_users} WHERE UUID='%s'\", $uuid);\n}",
"public function destroyFolder()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'];\n if (!file_exists($file)) die('File not found '.$file);\n if (!is_dir($file)) die('Not a folder '.$file);\n $h=opendir($file);\n while($f=readdir($h)) {\n if ($f!='.' && $f!='..') die('Folder is not empty');\n }\n closedir($h);\n rmdir($file);\n }",
"private function clearFolder()\n {\n foreach (File::allFiles(Auth()->user()->getPublicPath()) as $file) {\n File::delete($file);\n }\n return null;\n }",
"public function uninstall() {\n\t\t$this->load->model( 'user/user_group' );\n\t\t// access - modify pavomenu edit\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'access', 'extension/module/pavomenu/menu' );\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'modify', 'extension/module/pavomenu/menu' );\n\t\t// END REMOVE USER PERMISSION\n\t}",
"public function cleanFolders() {\n if ($this->config->item('clean_folders') == true) {\n $dirs = array_diff(scandir($this->pathCreator), array('.', '..', '.DS_Store'));\n\n if (!empty($dirs)) {\n foreach ($dirs as $folder) {\n print(\"\\nFolder : \" . $folder);\n print(\"\\nMax Date : \" . date('Y-m-d H:i:s', strtotime('-' . $this->config->item('clean_folders_time'))));\n print(\"\\nCreated On : \" . date('Y-m-d H:i:s', filemtime($this->pathCreator . '/' . $folder)));\n\n if (strtotime('-' . $this->config->item('clean_folders_time')) > filemtime($this->pathCreator . '/' . $folder)) {\n print(\"\\n...Deleted !\");\n system('rm -rf ' . escapeshellarg($this->pathCreator . '/' . $folder), $retval);\n } else {\n print(\"\\n...Living...\");\n }\n }\n }\n print(\"\\n\\nProcess complete !\");\n } else {\n print(\"\\n\\nError : Active 'clean_folders' in /application/config.php\");\n }\n }",
"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}",
"function cot_pfs_deletefolder($userid, $folderid)\n{\n\tglobal $db, $db_pfs_folders, $db_pfs, $cfg;\n\n\t$sql = $db->query(\"SELECT pff_path FROM $db_pfs_folders WHERE pff_userid=\".(int)$userid.\" AND pff_id=\".(int)$folderid.\" LIMIT 1\");\n\tif($row = $sql->fetch())\n\t{\n\t\t$fpath = $row['pff_path'];\n\n\t\t// Remove files\n\t\t$sql = $db->query(\"SELECT pfs_id FROM $db_pfs WHERE pfs_folderid IN (SELECT pff_id FROM $db_pfs_folders WHERE pff_path LIKE '\".$fpath.\"%')\");\n\t\twhile($row = $sql->fetch())\n\t\t{\n\t\t\tcot_pfs_deletefile($row['pfs_id']);\n\t\t}\n\t\t$sql->closeCursor();\n\n\t\t// Remove folders\n\t\t$sql = $db->query(\"SELECT pff_id, pff_path FROM $db_pfs_folders WHERE pff_path LIKE '\".$fpath.\"%' ORDER BY CHAR_LENGTH(pff_path) DESC\");\n\t\t$count = $sql->rowCount();\n\t\twhile($row = $sql->fetch())\n\t\t{\n\t\t\tif($cfg['pfs']['pfsuserfolder'])\n\t\t\t{\n\t\t\t\t@rmdir($pfs_dir_user.$row['pff_path']);\n\t\t\t\t@rmdir($thumbs_dir_user.$row['pff_path']);\n\t\t\t}\n\t\t\t$db->delete($db_pfs_folders, \"pff_id='\".(int)$row['pff_id'].\"'\");\n\t\t}\n\t\t$sql->closeCursor();\n\t\tif($count > 0)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t}\n}",
"public function deleteAll()\n {\n \\Core\\File\\System::rrmdir($this->_getPath(), false, true);\n }",
"protected function removeGenomeUploads() {\n // Retrieves genome uploads main folder (before users' folders)\n $rootDir = new Folder($this->GenomeUpload->getUploadPath(''), false);\n\n // Checks if folder exists\n if(!$rootDir->Path) {\n $this->error('no-uploads-root', 'Uploads root folder has not been found');\n }\n\n // Loops users' folders\n foreach($rootDir->find() as $userId) {\n // Instances folder\n $userDir = new Folder($rootDir->pwd() . DS . $userId, false);\n // Checks if folder exists\n if($userDir->path) {\n // Searches user\n $user = $this->findUser($userId);\n // Case folder is not bound to any user\n if(!$user) {\n // Removes folder\n $userDir->remove();\n }\n // Case folder ha an user bound to istelf\n else {\n // Makes a list of files which should be stored into current user's directory\n $uploads = array();\n foreach($user['configs'] as $config) {\n $uploads = array_merge($uploads, $config['uploads']);\n }\n\n // Lists files into directory\n $files = $userDir->find();\n // Loops every file\n foreach($files as $file) {\n // Checks if name is present into uploads array\n if (!isset($uploads[$file]) || !$uploads[$file]) {\n $file = new File($userDir->pwd() . DS . $file, false);\n $file->delete();\n }\n }\n }\n }\n }\n }",
"function cot_pfs_deleteall($userid)\n{\n\tglobal $db, $db_pfs_folders, $db_pfs, $cfg;\n\n\tif (!$userid || !is_int($userid))\n\t{\n\t\treturn 0;\n\t}\n\t$pfs_dir_user = cot_pfs_path($userid);\n\t$thumbs_dir_user = cot_pfs_thumbpath($userid);\n\t$sql = $db->query(\"SELECT pfs_file, pfs_folderid FROM $db_pfs WHERE pfs_userid=$userid\");\n\n\twhile($row = $sql->fetch())\n\t{\n\t\t$pfs_file = $row['pfs_file'];\n\t\t$f = $row['pfs_folderid'];\n\t\t$ff = $pfs_dir_user.$pfs_file;\n\n\t\tif (file_exists($ff))\n\t\t{\n\t\t\t@unlink($ff);\n\t\t\tif(file_exists($thumbs_dir_user.$pfs_file))\n\t\t\t{\n\t\t\t\t@unlink($thumbs_dir_user.$pfs_file);\n\t\t\t}\n\t\t}\n\t}\n\t$sql->closeCursor();\n\t$num += $db->delete($db_pfs_folders, \"pff_userid='\".(int)$userid.\"'\");\n\t$num += $db->delete($db_pfs, \"pfs_userid='\".(int)$userid.\"'\");\n\n\tif ($cfg['pfs']['pfsuserfolder'] && $userid>0)\n\t{\n\t\t@rmdir($pfs_dir_user);\n\t\t@rmdir($thumbs_dir_user);\n\t}\n\n\treturn($num);\n}",
"function rmUser($user){\n\tglobal $dbLink;\n\t\n\t$sqlgetInfo = \"SELECT main_group FROM users WHERE uid='$user'\";\n\t\n\tif($getInfo = $dbLink->query($sqlgetInfo)){\n\t\twhile($getResult = $getInfo->fetch_assoc()){\n\t\tif($getResult['main_group'] != 'student'){\n\t\t\n\t\t\t$sqlSelectClass = \"SELECT c_id FROM classes WHERE t_uid='$user'\";\n\t\t\tif($SelectClass = $dbLink->query($sqlSelectClass)){\n\t\t\t\twhile($ArrayClass = $SelectClass->fetch_assoc()){\n\t\t\t\t\tforeach($ArrayClass as $class){\n\t\t\t\t\t\t$sqlDeleteReg = \"DELETE FROM registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteReg)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete the class\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sqlSelectFiles = \"SELECT fid FROM file_registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($getFid = $dbLink->query($sqlSelectFiles)){\n\t\t\t\t\t\t\twhile($ArrFid = $getFid->fetch_assoc()){\n\t\t\t\t\t\t\t\tforeach($ArrFid as $fid){\n\t\t\t\t\t\t\t\t\t$sqlDeleteFiles = \"DELETE FROM edu_files WHERE fid='$fid'\";\n\t\t\t\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteFiles)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete files\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\t\t\t}//delete files where the fid is stated\n\t\t\t\t\t\t\t\t}//end of foreach($ArrFid\n\t\t\t\t\t\t\t}//end of while loop to get FID's\n\t\t\t\t\t\t}//end of if statement to select file ID's\n\t\t\t\t\t\t$sqlDeleteFReg = \"DELETE FROM file_registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteFReg)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete from File Registrar\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t}//end of foreach($Array\n\t\t\t\t}//end of while\n\t\t\t}//end of if to remove class data\n\t\t\t$sqlDeleteClass = \"DELETE FROM classes WHERE t_uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlDeleteClass)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete from the classes table\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t}//end of if to remove class from the classes table\t\n\t\t\t\n\t\t\t$sqlrmStudent = \"DELETE FROM users WHERE uid='$user'\";\n\t\t\t$sqlrmTorrent = \"DELETE FROM `xbt_users` WHERE uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlrmStudent)){\n\t\t\t\t\t\t\t\n\t\t\t}//end of remove student if statement\n\n\t\t\tif(!$dbLink->query($sqlrmTorrent)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has not been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}//end of remove student if statement\n\t\t\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif($getResult['main_group'] == 'student'){\n\t\t\t$sqlrmStudent = \"DELETE FROM users WHERE uid='$user'\";\n\t\t\t$sqlrmTorrent = \"DELETE FROM `xbt_users` WHERE uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlrmStudent)){\n\t\t\t\t\t\t\t\n\t\t\t}//end of remove student if statement\n\t\t\t\n\t\t\tif(!$dbLink->query($sqlrmTorrent)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has not been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}//end of remove student if statement\n\t\t\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t\t\n\t\t}//end of while getInfo Array\n\t}//end of if(sqlgetInfo\n}",
"private function delete_all_user_metas() {\n\t\tglobal $wpdb;\n\n\t\t// User option keys are prefixed in single site and multisite when not in network mode.\n\t\t$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();\n\t\t$user_query = new \\WP_User_Query(\n\t\t\tarray(\n\t\t\t\t'fields' => 'id',\n\t\t\t\t'meta_key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t)\n\t\t);\n\n\t\t$users = $user_query->get_results();\n\n\t\tforeach ( $users as $user_id ) {\n\t\t\t// Deletes all user stored options.\n\t\t\t$user_options = new User_Options( $this->context, $user_id );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ACCESS_TOKEN );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ACCESS_TOKEN_EXPIRES_IN );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ACCESS_TOKEN_CREATED );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_REFRESH_TOKEN );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_REDIRECT_URL );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_AUTH_SCOPES );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ERROR_CODE );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_PROXY_ACCESS_CODE );\n\t\t\t$user_options->delete( Verification::OPTION );\n\t\t\t$user_options->delete( Verification_Tag::OPTION );\n\t\t\t$user_options->delete( Profile::OPTION );\n\n\t\t\t// Clean up old user api key data, moved to options.\n\t\t\t// @todo remove after RC.\n\t\t\t$user_options->delete( 'googlesitekit_api_key' );\n\t\t\t$user_options->delete( 'sitekit_authentication' );\n\t\t\t$user_options->delete( 'googlesitekit_stored_nonce_user_id' );\n\t\t}\n\t}",
"function remdir()\r\n {\r\n if(is_writable($_REQUEST['file']))\r\n {\r\n $dir=$_GET['file'];\r\n $this->deleteDirectory($dir); \r\n }\r\n else{echo \"Permission Denied !\";}\r\n }",
"protected function removeGenomeUpdates() {\n // Retrieves genome uploads main folder (before users' folders)\n $rootDir = new Folder(WWW_ROOT . DS . 'files' . DS . 'genome_updates', false);\n\n // Checks if folder exists\n if(!$rootDir->Path) {\n $this->error('no-updates-root', 'Updates root folder has not been found');\n }\n\n // Loops users' folders\n foreach($rootDir->find() as $userId) {\n // Instances folder\n $userDir = new Folder($rootDir->pwd() . DS . $userId, false);\n // Checks if folder exists\n if($userDir->path) {\n // Searches user\n $user = $this->findUser($userId);\n // Case folder is not bound to any user\n if(!$user) {\n // Removes folder\n $userDir->remove();\n }\n // Case folder ha an user bound to istelf\n else {\n // Makes a list of files which should be stored into current user's directory\n $updates = array();\n foreach($user['configs'] as $config) {\n $updates = array_merge($updates, $config['updates']);\n }\n\n // Lists files into directory\n $folders = $userDir->find();\n // Loops every folder (should be named as update id)\n foreach($folders as $folder) {\n // Checks if name is present into uploads array\n if (!isset($updates[$folder]) || !$updates[$folder]) {\n $folder = new Folder($userDir->pwd() . DS . $folder, false);\n if($folder->path) {\n $folder->delete();\n }\n }\n }\n }\n }\n }\n }",
"function del_compte()\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire;\r\n\r\n\t\tif($user[1] >= \"1\")\r\n\t\t{\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_GALERY_TABLE.\" WHERE user_id='\".$user[0].\"' \");\r\n\r\n\t\t\tif ($rep = @opendir($repertoire.$user[0]))\r\n\t\t\t{\r\n\t\t\t\twhile ($file = readdir($rep)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \"..\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($file != \".\") \r\n\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t@unlink($repertoire.$user[0].\"/\".$file);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@rmdir($repertoire.$user[0]);\r\n\t\t\techo\"<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._COMTPEDELETE.\"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}",
"public function on_delete() {\n $this->remove_dir();\n }",
"public function removeAdminCache()\n {\n $this->deleteDirectory($this->pubStatic.'adminhtml');\n $this->deleteDirectory($this->varCache);\n $this->deleteDirectory($this->varPageCache);\n $this->deleteDirectory($this->varViewPreprocessed);\n }",
"protected function scrubUsers() {\n $content_folder = $this->defaultContentConfig['path'];\n // Currently scrub only anonymous and super admin accounts since these are\n // added by a new Drupal install always, which conflicts with Default\n // Content when attempting to import (throws error as content already\n // exists).\n $scrub_users_uids = [0, 1];\n $scrub_task = $this->taskFilesystemStack();\n foreach ($scrub_users_uids as $uid) {\n $uuid = $this->getUserUuid($uid);\n $scrub_task->remove(\"$content_folder/content/user/$uuid.json\");\n }\n $scrub_task->run();\n }",
"function delete($record_id){\r\n\t\t$rs=parent::get_record($record_id);\r\n\t\tif (is_dir(USER_IMAGES_FOLDER_ADDRESS.$rs->fields[\"image_folder\"].\"/\"))\r\n\t\t{\r\n\t\t\trm_dir_and_all_files(USER_IMAGES_FOLDER_ADDRESS.$rs->fields[\"image_folder\"].\"/\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//--------------delete the user record\r\n\t\tparent::delete($record_id);\r\n\t}",
"function small_groups_clean_database( ) {\n\t\t\n\t\tdelete_option( 'small_groups_plugin_version' );\n\t\tdelete_option( 'small_groups_install_date' );\n\n\t\t// plugin specific database entries\n\t\tdelete_option( 'SMALL_GROUPS_posts_to_posts_plugin' );\n\t\t\n\t\tdelete_option( 'SMALL_GROUPS_deactivate_posts_to_posts' );\n\t\t\n\t\t// user specific database entries\n\t\tdelete_user_meta( get_current_user_id( ), 'SMALL_GROUPS_prompt_timeout', $meta_value );\n\t\tdelete_user_meta( get_current_user_id( ), 'SMALL_GROUPS_start_date', $meta_value );\n\t\tdelete_user_meta( get_current_user_id( ), 'SMALL_GROUPS_hide_notice', $meta_value );\n\n}",
"function delete() {\n db_begin_work();\n $delete = parent::delete();\n if($delete && !is_error($delete)) {\n unlink($this->getAvatarPath());\n \tunlink($this->getAvatarPath(true));\n\n ProjectUsers::deleteByUser($this);\n Assignments::deleteByUser($this);\n Subscriptions::deleteByUser($this);\n StarredObjects::deleteByUser($this);\n PinnedProjects::deleteByUser($this);\n UserConfigOptions::deleteByUser($this);\n Reminders::deleteByUser($this);\n\n search_index_remove($this->getId(), 'User');\n\n $cleanup = array();\n event_trigger('on_user_cleanup', array(&$cleanup));\n\n if(is_foreachable($cleanup)) {\n foreach($cleanup as $table_name => $fields) {\n foreach($fields as $field) {\n $condition = '';\n if(is_array($field)) {\n $id_field = array_var($field, 'id');\n $name_field = array_var($field, 'name');\n $email_field = array_var($field, 'email');\n $condition = array_var($field, 'condition');\n } else {\n $id_field = $field . '_id';\n $name_field = $field . '_name';\n $email_field = $field . '_email';\n } // if\n\n if($condition) {\n db_execute('UPDATE ' . TABLE_PREFIX . \"$table_name SET $id_field = 0, $name_field = ?, $email_field = ? WHERE $id_field = ? AND $condition\", $this->getName(), $this->getEmail(), $this->getId());\n } else {\n db_execute('UPDATE ' . TABLE_PREFIX . \"$table_name SET $id_field = 0, $name_field = ?, $email_field = ? WHERE $id_field = ?\", $this->getName(), $this->getEmail(), $this->getId());\n } // if\n } // foreach\n } // foreach\n } // if\n\n db_commit();\n return true;\n } else {\n db_rollback();\n return $delete;\n } // if\n }",
"private function deleteFlag()\n {\n // remove the flag\n \\Storage::delete($this->getFlagPath());\n }",
"public function tearDown() {\n User::find($this->user_id)->delete();\n }",
"function AdminUsers_uninstall()\n\t{\n\t}",
"function remove_tmpuser($lrdata) {\n tep_db_query(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key = '\".$lrdata['session'].\"'\");\n }",
"public function deleted(User $user)\n {\n // delete all files\n }",
"function deleteArticleTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}",
"public function clearAll() {\n $list = scandir(self::ROOT_PATH . \"/public/{$this->storagePath}\");\n foreach ($list as $file) {\n if ($file == '.' || $file == '..') {\n continue;\n }\n $filePath = self::ROOT_PATH . \"/public/{$this->storagePath}/$file\";\n unlink($filePath);\n }\n $this->_tableGw->delete();\n }",
"public function del(){\n $status = new StatusTYPE();\n\t\t$path = str_replace($this->id.'.'.$this->ext, '', $this->getFull_Filename());\n \tif ( cmsToolKit::rmDirDashR( $path ) )\n $status = parent::del();\n else\n $status->setFalse('could not delete folder'); \n \n return $status;\n }",
"function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS watchfolders');\r\n parent::uninstall();\r\n }",
"function tearDown() {\n \n /**\n * Now, delete the users.\n */\n \n }",
"public function deleteUser()\n {\n $this->delete();\n }",
"public function delete_old_files($user_id){\n\t\t$user=$this->get_by_id('id', $user_id);\n\t\t$avatar_path=$user->avatar;\n\t\t$thumb_path=$user->thumb;\n\t\tif($avatar_path != NULL)\n\t\t\tunlink($avatar_path);\n\t\tif($thumb_path != NULL)\n\t\t\tunlink($thumb_path);// ( BUGFIX zapravio ne pravi koppiju u drugom folderu)\n\t}",
"function remove_client_dir(){\n\t\t$cmd=\"rm -rf $this->client_dir\";\n\t\t`$cmd`;\n\t}",
"function delete_tmp_folder_content()\n{\n\t$baseDir = '../backups/tmp/';\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') && ($file != '.htaccess') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink('../backups/tmp/' . $file);\n\t\t}\n\t}\n}",
"public function deleteFolder(){\r\n\t\t$folder_key = $this->uri->segment(3);\r\n\r\n\t\t//Check if the folder exists\r\n\t\tif(!$this->DataModel->folderExists(array('public_key' => $folder_key), $this->authentication->uid) == TRUE){\r\n\t\t\t//Folder doesn't exist. Redirect to dashboard\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\t\t//Mark the folder as deleted\r\n\t\t$this->DataModel->updateFolder(array('public_key' => $folder_key), array('trash' => 1));\r\n\r\n\t\t//Redirect to the folders parent\r\n\t\t$folder = $this->DataModel->getFolderInfo(array('public_key' => $folder_key));\r\n\r\n\t\t$this->successMessage($this->lang->line('success_folder_deleted'));\r\n\r\n\t\tif($folder['parent'] == 0){\r\n\t\t\tredirect('/dashboard');\r\n\t\t}else{\r\n\t\t\t$parent = $this->DataModel->getFolderInfo(array('id' => $folder['parent']));\r\n\t\t\tredirect('folders/'.$parent['public_key']);\r\n\t\t}\r\n\r\n\t}",
"private function _do_delete() {\n\t\tif (g($_POST, 'delete')) {\n\t\t\tif (g($this->conf, 'disable.delete')) die('Forbidden');\n\t\t\t\n $path = g($this->conf, 'path');\n if (g($_POST, 'path'))\n $path = \\Crypt::decrypt(g($_POST, 'path'));\n \n $this->_validPath($path);\n \n\t\t\t$parent = dirname($path);\n\t\t\t\n\t\t\tif ($path == g($this->conf, 'type')) {\n\t\t\t\t$this->_msg('Cannot delete root folder', 'error');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ($this->_delete($this->_path($path))) {\n\t\t\t\t$this->_msg('Success delete ['.$path.']');\n\t\t\t\theader('location:'.$this->_url(['path' => $parent]));\n\t\t\t\tdie();\n\t\t\t} else {\n\t\t\t\t$this->_msg('Failed delete ['.$path.'] : please call your administator', 'error');\n\t\t\t}\n\t\t}\n\t}",
"function usrdel($no,$pwd){\n global $path,$pwdc,$onlyimgdel;\n $host = gethostbyaddr($_SERVER[\"REMOTE_ADDR\"]);\n $delno = array(\"dummy\");\n $delflag = false;\n reset($_POST);\n while ($item = each($_POST)){\n if($item[1]=='delete'){\n array_push($delno,$item[0]);\n $delflag=true;\n }\n }\n\n if($pwd==\"\"&&$pwdc!=\"\"){\n $pwd=$pwdc;\n }\n\n $fp=fopen(LOGFILE,\"r+\");\n set_file_buffer($fp, 0);\n flock($fp, 2);\n rewind($fp);\n $buf=fread($fp,1000000);\n fclose($fp);\n\n if($buf==''){\n error(\"error user del\");\n }\n\n $line = explode(\"\\n\",$buf);\n $countline=count($line);\n\n for($i = 0; $i < $countline; $i++){\n if($line[$i]!=\"\"){\n $line[$i].=\"\\n\";\n };\n }\n\n $flag = false;\n $countline=count($line)-1;\n for($i = 0; $i<$countline; $i++){\n list($dno,,,,,,,$dhost,$pass,$dext,,,$dtim,) = explode(\",\", $line[$i]);\n if(array_search($dno,$delno) && (substr(md5($pwd),2,8) == $pass || $dhost == $host||ADMIN_PASS==$pwd)){\n $flag = true;\n $line[$i] = \"\";\t\t\t//パスワードがマッチした行は空に\n $delfile = $path.$dtim.$dext;\t//削除ファイル\n if(!$onlyimgdel){\n treedel($dno);\n }\n if(is_file($delfile)){\n unlink($delfile);//削除\n }\n if(is_file(THUMB_DIR.$dtim.'s.jpg')){\n unlink(THUMB_DIR.$dtim.'s.jpg');//削除\n }\n }\n }\n if(!$flag){\n error(\"該当記事が見つからないかパスワードが間違っています\");\n }\n}",
"public function user_delete($data = array())\n\t{\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_delete', $data);\n\t}",
"public function removeProfileVisuals($username){\n File::deleteDirectory(public_path().'/uploads/covers/'.$username);\n File::deleteDirectory(public_path().'/uploads/profile/'.$username);\n }",
"public function delete_with_dir() {\n if(!empty($this->username && $this->id)) {\n if($this->delete()) {\n $target = SITE_PATH . DS . 'admin' . DS . $this->image_path . DS . $this->username;\n if(is_dir($target)){\n $this->delete_files_in_dir($target);\n return rmdir($target) ? true : false;\n echo \"yes\";\n }\n }else{\n return true;\n }\n }else{\n return false;\n }\n }",
"public function deleteUnusedFiles(){\n \n }",
"function delete_all_principal() {\n\t$id_user = get_current_user_id();\n\tglobal $wpdb;\n\t$db = $wpdb->update( \n\t\t 'parcours_user', \n\t\t array( \n\t\t 'principal' => 0\n\t\t ),\n\t\t array( 'id_user' => $id_user ), \n\t\t array( \n\t\t '%d'\n\t\t ), \n\t\t array( \n\t\t '%d'\n\t\t )\n\t\t);\n}",
"public function supprime_user() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t$userdata = $this->creer_definition_user_delete_ws ();\n\t\t$this->onDebug ( $userdata, 1 );\n\t\treturn $this->getObjetZabbixWsclient ()\n\t\t\t->userDelete ( $userdata );\n\t}",
"function system_delete_user($uid)\n{\n}",
"function clean_installation()\n{\n $files = glob(VAR_FOLDER . DS . '*');\n foreach ($files as $file) {\n if (is_file($file) && $file !== DEFAULT_ACCOUNTFILE && $FILE !== DEFAULT_METAFILE) {\n unlink($file);\n }\n }\n}",
"function deleteUserImageFiles($username) {\n $target_dir = \"uploads/\" . $username . \"/\";\n\n $files = glob(\"$target_dir/*.*\");\n foreach ($files as $file) {\n unlink($file);\n }\n if (is_dir($target_dir)) {\n rmdir($target_dir);\n }\n}",
"public function uninstall() {\n global $users;\n\n // Remove User Data\n foreach($users->db AS $username => $data) {\n unset($users->db[$username][\"media_order\"]);\n unset($users->db[$username][\"media_items_per_page\"]);\n unset($users->db[$username][\"media_layout\"]);\n unset($users->db[$username][\"media_favorites\"]);\n }\n $users->save();\n\n // Uninstall Plugin\n return parent::uninstall();\n }",
"private function deleteSettings()\n\t{\n\t}",
"function delete_folder($id_folder = NULL)\n\t{\n\t\t$id_user = $this->session->userdata('id_user');\n\n\t\t// get inbox\n\t\t$this->db->select('inbox.ID', 'id_inbox');\n\t\t$this->db->from('inbox');\n\t\t$this->db->join('user_inbox', 'user_inbox.id_inbox=inbox.ID');\n\t\t$this->db->join('user_folders', 'user_folders.id_folder=inbox.id_folder');\n\t\t$this->db->where('user_folders.id_folder', $id_folder);\n\t\t$inbox = $this->db->get();\n\n\t\t// delete inbox and user_inbox\n\t\tforeach ($inbox->result() as $tmp)\n\t\t{\n\t\t\t$this->db->where('ID', $tmp->id_inbox);\n\t\t\t$this->db->delete('inbox');\n\n\t\t\t$this->db->where('id_inbox', $tmp->id_inbox);\n\t\t\t$this->db->delete('user_inbox');\n\t\t}\n\n\t\t// deprecated\n\t\t// inbox\n\t\t/* $inbox = \"DELETE i, ui\n\t\t\t\tFROM user_folders AS uf\n\t\t\t\tLEFT JOIN inbox AS i ON i.id_folder = uf.id_folder\n\t\t\t\tLEFT JOIN user_inbox AS ui ON ui.id_inbox = i.ID\n\t\t\t\tWHERE uf.id_folder = '\".$id_folder.\"'\";\n\t\t$this->db->query($inbox);*/\n\n\t\t// get sentitems\n\t\t$this->db->select('sentitems.ID as id_sentitems');\n\t\t$this->db->from('sentitems');\n\t\t$this->db->join('user_sentitems', 'user_sentitems.id_sentitems=sentitems.ID');\n\t\t$this->db->join('user_folders', 'user_folders.id_folder=sentitems.id_folder');\n\t\t$this->db->where('user_folders.id_folder', $id_folder);\n\t\t$sentitems = $this->db->get();\n\n\t\t// delete sentitems and user_sentitems\n\t\tforeach ($sentitems->result() as $tmp)\n\t\t{\n\t\t\t$this->db->where('ID', $tmp->id_sentitems);\n\t\t\t$this->db->delete('sentitems');\n\n\t\t\t$this->db->where('id_sentitems', $tmp->id_sentitems);\n\t\t\t$this->db->delete('user_sentitems');\n\t\t}\n\n\t\t// deprecated\n\t\t// Sentitems\n\t\t/*$sentitems = \"DELETE s, us\n\t\t\t\tFROM user_folders AS uf\n\t\t\t\tLEFT JOIN sentitems AS s ON s.id_folder = uf.id_folder\n\t\t\t\tLEFT JOIN user_sentitems AS us ON us.id_sentitems = s.ID\n\t\t\t\tWHERE uf.id_folder = '\".$id_folder.\"'\";\n\t\t$this->db->query($sentitems);*/\n\n\t\t$this->db->delete('user_folders', array('id_folder' => $id_folder, 'id_user' => $id_user));\n\t}",
"function delete_user_setting($names)\n {\n }",
"function uninstall()\n {\n \t// For now nothing in unistall, because we don't want user lose the data. \n }",
"function userports_clear_db() {\n}",
"function doRemoveCacheFolder ()\n\t{\n\t\t$wsdlcachefolder = str_replace( '/2.5', '', $this->info['plugin_dir'] ) . '/cache/';\n\t\tif ( ($dirhandle = @opendir( $wsdlcachefolder )) ) {\n\t\t\twhile ( false !== ($filename = readdir( $dirhandle )) ) {\n\t\t\t\t$filename = $wsdlcachefolder . $filename;\n\t\t\t\t@unlink( $filename );\n\t\t\t}\n\t\t\tclosedir( $dirhandle );\n\t\t\trmdir( $wsdlcachefolder );\n\t\t}\n\t}",
"function mysql_deluser($username)\n{\n $user_id = mysql_auth_user_id($username);\n\n dbDelete('entity_permissions', \"`user_id` = ?\", array($user_id));\n dbDelete('users_prefs', \"`user_id` = ?\", array($user_id));\n dbDelete('users_ckeys', \"`username` = ?\", array($username));\n\n return dbDelete('users', \"`username` = ?\", array($username));\n}",
"function delete_folder($main_folder)\r\n{\r\n \r\n\t$dir = $main_folder;\r\n \tchmod($dir, 0755);\r\n \t$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\r\n \t$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\r\n \tforeach ( $ri as $file ) \r\n \t{\r\n \t $file->isDir() ? rmdir($file) : unlink($file);\r\n \t}\r\n \trmdir($dir);\r\n\r\n}",
"function deleteUser($id)\n {\n \n $userLogged = Auth::check(['administrateur']);\n\n $errors = [];\n \n // deletion of all user comments from the database \n $commentManager = new CommentManager();\n $listCommentsDelete = $commentManager->listCommentsForUser($id);\n\n if ($listCommentsDelete !== []) {\n foreach($listCommentsDelete as $comment){\n try{\n $commentManager->deleteComment($comment->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n }\n }\n }\n\n // deletion of all user-related media (logos, deactivate image, ...) to delete them from the server (media folder) and from the database \n $mediaManager = new MediaManager();\n $listMedias = $mediaManager->getListMediasForUser($id); // we retrieve the list of user logos \n\n if (!empty($listMedias)) {\n foreach($listMedias as $media){\n try{\n unlink($media->getPath()); //delete media on the server in the media folder \n $mediaManager->deleteMedia($media->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // deletion of the database of all the user's socialNetworks \n $socialNetworkManager = new SocialNetworkManager();\n $listSocialNetworksForUserDelete = $socialNetworkManager->getListSocialNetworksForUser($id);\n \n if (!empty($listSocialNetworksForUserDelete)) {\n foreach($listSocialNetworksForUserDelete as $socialnetwork){\n try\n { \n $socialNetworkManager->deleteSocialNetwork($socialnetwork->getId()); //deletion from the database \n }\n catch (Exception $e)\n {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n //deletion of all post related to use \n $postManager = new PostManager();\n $listPostsForUser = $postManager->getListPostsForUser($id);\n \n if (!empty($listPostsForUser)) {\n foreach($listPostsForUser as $post){ // deletion of all posts (and their associated media) from the user \n \n // we delete the media linked to the post (if there is any) \n $listMediasDelete = $mediaManager->getListMediasForPost($post->getId());// on recupere la liste des media pour ce $post\n\n if ($listMediasDelete !== []) {\n foreach($listMediasDelete as $media){\n try{\n unlink($media->getPath()); //delete media on the server in the media folder \n $mediaManager->deleteMedia($media->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // we delete the comments linked to the post (if there are any) \n $listCommentsDelete = $commentManager->getListCommentsForPost($post->getId());// we get the list of comments for this $ post \n \n if ($listCommentsDelete !== []) {\n foreach($listCommentsDelete as $comment){\n try{\n $commentManager->deleteComment($comment->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // we delete the post \n try{\n $post = $postManager->deletePost($post->getId());\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // user removal \n $userManager = new UserManager();\n\n try{\n $user = $userManager->deleteUser($id);\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n\n }\n\n setFlashErrors($errors); // to manage flash message errors (see globalFunctions.php file) \n\n require'../app/Views/backViews/user/backDeleteUserView.php';\n }",
"function fm_delete_folder($dir, $groupid) {\r\n\tglobal $CFG, $USER;\r\n\t\r\n\t// if the dir being deleted is a root dir (eg. has some dir's under it)\r\n\tif ($child = get_record('fmanager_folders', 'pathid', $dir->id)) {\r\n\t\tfm_delete_folder($child, $groupid);\r\n\t} \r\n\t// Deletes all files/url links under folder\r\n\tif ($allrecs = get_records('fmanager_link', 'folder', $dir->id)) {\r\n\t\tforeach ($allrecs as $ar) {\r\n\t\t\t// a file\r\n\t\t\tif ($ar->type == TYPE_FILE || $ar->type == TYPE_ZIP) {\r\n\t\t\t\tfm_remove_file($ar, $groupid);\r\n\t\t\t} \r\n\t\t\t// removes shared aspect\r\n\t\t\tdelete_records('fmanager_shared', 'sharedlink', $ar->id);\t\t\t\t\t\r\n\t\t\t// Delete link\r\n\t\t\tdelete_records('fmanager_link', 'id', $ar->id);\r\n\t\t}\r\n\t}\r\n\r\n\t// delete shared to folder\r\n\tdelete_records('fmanager_shared', 'sharedlink', $dir->id);\t\r\n\r\n\tif ($groupid == 0) {\r\n\t\tif (!@rmdir($CFG->dataroot.\"/file_manager/users/\".$USER->id.$dir->path.$dir->name.\"/\")) {\r\n\t\t\terror(get_string('errnodeletefolder', 'block_file_manager'));\r\n\t\t}\r\n\t} else {\r\n\t\tif (!@rmdir($CFG->dataroot.\"/file_manager/groups/\".$groupid.$dir->path.$dir->name.\"/\")) {\r\n\t\t\terror(get_string('errnodeletefolder', 'block_file_manager'));\r\n\t\t}\r\n\t}\r\n\tdelete_records('fmanager_folders', 'id', $dir->id);\r\n\t\r\n}",
"function deleteSubAdmin($user_id)\n\t{\n\t\t$this->db->delete('tbl_user', array('user_id' => $user_id));\t\t\n\t\treturn 1;\t\t\n\t}",
"function uninstall()\n\t{\n\t\t$GLOBALS['NO_DB_SCOPE_CHECK']=true;\n\t\t$GLOBALS['SITE_DB']->drop_if_exists('f_welcome_emails');\n\t\t$GLOBALS['NO_DB_SCOPE_CHECK']=false;\n\t}",
"protected function clearCachedUserData()\n {\n $user = Auth::user();\n\n if ($user) {\n $user->deleteUserData();\n }\n }",
"public function cleanTmpFolder() {\n\t\tarray_map('unlink', glob($this->settings->tmp_path . '/*'));\n\t}",
"public function testDeletePermissions_deletesPermissionCorrectly() {\r\n\t\t$this->jc->putResource('/', $this->test_folder);\r\n\t\t$joeuser = $this->jc->getUsers('joeuser');\r\n\t\t$perms[] = new Permission('32', $joeuser[0], $this->test_folder->getUriString());\r\n\t\t$this->jc->updatePermissions($this->test_folder->getUriString(), $perms);\r\n\t\t$test_folder_perms = $this->jc->getPermissions($this->test_folder->getUriString());\r\n\t\t$this->assertEquals(sizeof($test_folder_perms), 1);\r\n\t\t$this->jc->deletePermission($test_folder_perms[0]);\r\n\t\t$perms_after_delete = $this->jc->getPermissions($this->test_folder->getUriString());\r\n\t\t$this->assertEquals(sizeof($perms_after_delete), 0);\r\n\t\t$this->jc->deleteResource($this->test_folder->getUriString());\r\n\t}",
"protected function tearDown(): void {\n $this->deleteUserTest();\n }",
"public function deleteFileInfo(User $user)\n {\n }",
"public function deleteAll()\n {\n if (! $this->m_active) {\n return false;\n }\n\n apc_clear_cache('user');\n return true;\n }",
"public function adminDeleteAllByUser($userId)\n\t{\n\t\t// get the user\n\t\t$user = $this->getUser($userId);\n\t\t// get the authkeys for that user\n\t\t$authKeys = $user->authKey()->get();\n\t\t// delete links between the user and any authkeys\n\t\t$user->authKey()->detach();\n\t\t// We need to delete any authkeys that have been detached\n\t\t// and that don't belong to another user\n\t\t$authKeys->each(function($authKey) {\n\t\t\t// If there is no user for the authkey\n\t\t\tif( $authKey->user()->get()->isEmpty() ) {\n\t\t\t\t// soft delete authkey\n\t\t\t\t$authKey->forceDelete();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// return a code 204 header and no content\n\t\treturn $this->setHttpStatusCode('204')->respondWithEmpty();\n\t}",
"public function tearDown()\n\t{\n\t\t$user = User::withTrashed()->where('_id', $this->testUser->_id)->first()->forceDelete();\n\t\t$this->testUser = array();\n\t}",
"function purgeUsers() {\r\n\t\t$query = ' delete from #__rubriestav_user where idjusers not in (select id from #__users) ';\r\n\t\t$this->_db->setQuery ( $query );\r\n\t\tif (! $this->_db->query ()) {\r\n\t\t\t$this->setError ( $this->_db->getErrorMsg () );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function eraseUserAll($user_id){\n // Below deletes user when they have posts and comments \n $this->db->query('DELETE users, photos, comments \n FROM users \n INNER JOIN photos \n ON photos.user_id = users.user_id\n INNER JOIN comments \n ON comments.user_id = users.user_id \n WHERE users.user_id = :user_id');\n \n $this->db->bind(':user_id', $user_id); \n\n if($this->db->execute()){\n return true;\n } else {\n return false;\n } \n }",
"protected function removeAllUsers() {\n global $DB;\n\n if ($this->mayI(EDIT)) {\n $DB->query(\"TrunCATE TABLE `\".self::$DBTable.\"`;\");\n }\n }",
"public function deactivate() {\t\t\n $dir_path = get_home_path() . '/' . $this->attempts_dir;\n\n $dir = opendir($dir_path);\n\n while (false !== ($file = readdir($dir))) {\n if (($file != '.') && ($file != '..')) {\n unlink($dir_path . '/' . $file);\n }\n }\n rmdir($dir_path);\n closedir($dir);\n\n\n foreach ($this->protected_files as $sfile) {\n $arr = file(get_home_path() . '/' . $sfile);\n unset($arr[1]);\n $arr = array_values($arr);\n file_put_contents(get_home_path() . '/' . $sfile, implode($arr));\n }\n\n wp_clear_scheduled_hook('hackattempts_cleanup');\n wp_clear_scheduled_hook('hackattempts_email');\n\t}",
"static public function ctrBorrarUsuario(){\n\t\tif (isset($_POST['idUsuario'])) {\n\t\t\tif ($_POST['fotoUsuario'] != \"\") {\n\t\t\t\tunlink($_POST[\"fotoUsuario\"]);\n\t\t\t\trmdir('Views/img/usuarios/'.$_POST['usuario']);\n\t\t\t}\n\t\t$answer=adminph\\User::find($_POST['idUsuario']);\n\t\t$answer->delete();\n\t\t}\n\t}",
"function delUser() // Renomeada para n�o ser usada. Antiga delUser() \n{\n\tglobal $xoopsDB, $myts, $xoopsConfig, $xoopsModule;\n\n\t$query = \"SELECT * FROM \". $xoopsDB->prefix('xmail_newsletter') .\" WHERE user_email='\" . $myts->makeTboxData4Save($_POST['user_mail']) . \"' \";\n\t$result = $xoopsDB->query($query);\n\t$myarray = $xoopsDB->fetchArray($result);\n\n\t$mymail = $myts->makeTboxData4Save($_POST['user_mail']);\n\tif ($myarray) {\n\t\tif ($myarray['confirmed'] == '0')\n\t\t\treturn -1;\n\n\t\t$query = \"DELETE from \" . $xoopsDB->prefix('xmail_newsletter') . \" WHERE user_email='$mymail'\";\n\t\t$result = $xoopsDB->queryF($query);\n\t\t\n\t\t// eliminar o perfil\n\t\t$sql=' delete from '.$xoopsDB->prefix('xmail_perfil_news').' where user_id='.$myarray['user_id'];\n\t\t$result2=$xoopsDB->queryf($sql);\n\t\tif(!$result2){\n\t\t\txoops_error('Erro ao eliminar perfil'.$xoopsDB->error());\n\t\t}\n\t\t\t\n\t\t\n\t\treturn 1;\n\t} else {\n\t\treturn -2;\n\t}\n}",
"protected function cleanupFilesystem() {\n $this->deleteFile($this->_directories[\"communication.log\"]);\n $this->deleteFile($this->_directories[\"communicationDetails\"]);\n $this->deleteFile($this->_directories[\"communityRegistry\"]);\n $this->deleteDirector($this->_directories[\"communityDefinitionsDir\"]);\n $this->deleteDirector($this->_directories[\"nodeListDir\"]);\n }",
"function admidio_db_dates_uninstall() {\r\n/*\t\r\n\t$admidio_db_dates = new admidio_db_dates;\r\n\t$users = get_users_of_blog();\r\n\tforeach ( $users as $user )\r\n\t\t$admidio_db_dates->avatar_delete( $user->user_id );\r\n\tdelete_option( 'admidio_db_dates_caps');*/\r\n}",
"public static function purgeUsers()\n {\n \\Log::info('Purging users');\n User::purgeUsers();\n }",
"public function userDeleted();",
"function uninstall() {\n global $DB, $USER, $Controller;\n //if(!$USER->may(INSTALL)) return false;\n if (is_object($Controller->ldapImport))\n {\n $Controller->ldapImport->delete();\n }\n $DB->dropTable(self::$DBTable);\n }",
"public function delall()\n {\n }",
"public function instance_deleted() {\n $this->purge_all_definitions();\n @rmdir($this->filestorepath);\n }"
] | [
"0.72324634",
"0.6870372",
"0.68367755",
"0.68110836",
"0.67341226",
"0.6719706",
"0.67173404",
"0.6685661",
"0.6685661",
"0.65394586",
"0.6536882",
"0.6536043",
"0.64834577",
"0.64283425",
"0.6392182",
"0.6314095",
"0.63099146",
"0.6300209",
"0.6283243",
"0.62703806",
"0.6258419",
"0.6254628",
"0.62390876",
"0.6223885",
"0.6193835",
"0.61897093",
"0.61859214",
"0.6177427",
"0.61740065",
"0.6159804",
"0.61510664",
"0.61465055",
"0.61364585",
"0.6098974",
"0.60681313",
"0.6034774",
"0.60330594",
"0.6032323",
"0.60267854",
"0.6024987",
"0.60212314",
"0.60190535",
"0.6009776",
"0.60091645",
"0.6008307",
"0.5999519",
"0.5996546",
"0.59645087",
"0.5952949",
"0.59445566",
"0.59398174",
"0.59363127",
"0.5907725",
"0.5894893",
"0.5873626",
"0.5872508",
"0.5870697",
"0.58618647",
"0.58458006",
"0.584023",
"0.5832738",
"0.58297783",
"0.5827446",
"0.58255947",
"0.5817739",
"0.5815607",
"0.58138365",
"0.58131623",
"0.58072495",
"0.5797521",
"0.57905173",
"0.57802635",
"0.5778206",
"0.5771345",
"0.5768387",
"0.5755539",
"0.57513297",
"0.5748757",
"0.57486147",
"0.5747901",
"0.5742201",
"0.57354873",
"0.57336605",
"0.57283056",
"0.57253945",
"0.57201827",
"0.5715772",
"0.5713276",
"0.57116294",
"0.5710848",
"0.5706197",
"0.569361",
"0.5691968",
"0.56846726",
"0.56816345",
"0.5681373",
"0.567937",
"0.56783414",
"0.567734",
"0.5676714"
] | 0.6578102 | 9 |
Get the location of the export directory for the user accounts Get the location of the export directory for the user accounts | function getExportDirectory()
{
$export_dir = ilUtil::getDataDir()."/usrf_data/export";
return $export_dir;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$export_dir = ilUtil::getDataDir().\"/svy_data\".\"/svy_\".$this->getId().\"/export\";\n\n\t\treturn $export_dir;\n\t}",
"function getExportPath() {\n\t\t$exportPath = Config::getVar('files', 'files_dir') . '/' . $this->getPluginSettingsPrefix();\n\t\tif (!file_exists($exportPath)) {\n\t\t\t$fileManager = new FileManager();\n\t\t\t$fileManager->mkdir($exportPath);\n\t\t}\n\t\tif (!is_writable($exportPath)) {\n\t\t\t$errors = array(\n\t\t\t\tarray('plugins.importexport.common.export.error.outputFileNotWritable', $exportPath)\n\t\t\t);\n\t\t\treturn $errors;\n\t\t}\n\t\treturn realpath($exportPath) . '/';\n\t}",
"function getExportDirectory() {\n\n $upload_dir = wp_upload_dir();\n\n $path = $upload_dir['basedir'] . '/form_entry_exports';\n\n // Create the backups directory if it doesn't exist\n if ( is_writable( dirname( $path ) ) && ! is_dir( $path ) )\n mkdir( $path, 0755 );\n\n // Secure the directory with a .htaccess file\n $htaccess = $path . '/.htaccess';\n\n $contents[]\t= '# ' . sprintf( 'This %s file ensures that other people cannot download your export files' , '.htaccess' );\n $contents[] = '';\n $contents[] = '<IfModule mod_rewrite.c>';\n $contents[] = 'RewriteEngine On';\n $contents[] = 'RewriteCond %{QUERY_STRING} !key=334}gtrte';\n $contents[] = 'RewriteRule (.*) - [F]';\n $contents[] = '</IfModule>';\n $contents[] = '';\n\n if ( ! file_exists( $htaccess ) && is_writable( $path ) && require_once( ABSPATH . '/wp-admin/includes/misc.php' ) )\n insert_with_markers( $htaccess, 'BackUpWordPress', $contents );\n\n return $path;\n }",
"function createExportDirectory()\n\t{\n\t\tif (!@is_dir($this->getExportDirectory()))\n\t\t{\n\t\t\t$usrf_data_dir = ilUtil::getDataDir().\"/usrf_data\";\n\t\t\tilUtil::makeDir($usrf_data_dir);\n\t\t\tif(!is_writable($usrf_data_dir))\n\t\t\t{\n\t\t\t\t$this->ilias->raiseError(\"Userfolder data directory (\".$usrf_data_dir\n\t\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t\t$export_dir = $usrf_data_dir.\"/export\";\n\t\t\tilUtil::makeDir($export_dir);\n\t\t\tif(!@is_dir($export_dir))\n\t\t\t{\n\t\t\t\t$this->ilias->raiseError(\"Creation of Userfolder Export Directory failed.\",$this->ilias->error_obj->MESSAGE);\n\t\t\t}\n\t\t}\n\t}",
"public function getLocalPath()\r\n\t{\r\n\t\t$accountNumber = $this->getAccountNumber();\r\n\r\n\t\t$file_dir = AntConfig::getInstance()->data_path.\"/$accountNumber/userfiles\";\r\n\t\t$file_dir2 = AntConfig::getInstance()->data_path.\"/$accountNumber/userfiles\";\r\n\t\t\r\n\t\tif ($this->owner_id!=null)\r\n\t\t{\r\n\t\t\t$file_dir .= \"/\".$this->owner_id;\r\n\t\t\t$file_dir2 .= \"/\".$this->owner_id;\r\n\t\t}\r\n\r\n\t\tif (!file_exists($file_dir.\"/\".$this->name_lcl))\r\n\t\t{\r\n\t\t\tif (file_exists($file_dir2.\"/\".$this->name_lcl))\r\n\t\t\t\t$file_dir = $file_dir2;\r\n\t\t}\r\n\r\n\t\t$file_dir .= \"/\".$this->name_lcl;\r\n\r\n\t\treturn $file_dir;\r\n\t}",
"protected function generateUploadDir()\n\t{\n\t\treturn self::EXPORT_PATH;\n\t}",
"protected function getDefaultImportExportFolder() {}",
"protected function getDefaultImportExportFolder() {}",
"protected function action_getUserMainDir() {}",
"public function getTemporaryFilesPathForExport() {}",
"public function export()\n\t\t {\n\t\t\t return Excel::download(new UsersExport, 'users.xlsx');\n\t\t }",
"protected function getStoragePath()\n {\n return Command::getDataDir() . self::STORAGE_DIR . DIRECTORY_SEPARATOR . self::CSV_DATASTORE;\n }",
"function getDownloadDirectory()\n{\n $settings = getSettings();\n\n return $settings['downloadDirectory'] . '/';\n}",
"function createExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t\n\t\t// create learning module directory (data_dir/lm_data/lm_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t$export_dir = $svy_dir.\"/export\";\n\t\tilUtil::makeDir($export_dir);\n\t\tif(!@is_dir($export_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Export Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}",
"public function generateDataCsvDirectoryPath()\n {\n return $this->generateDataYmlDirectoryPath().$this->config->getEntityName().'/';\n }",
"public static function get_specific_export_user() {\n // at first, we have a look if a specific user for course exports has been defined\n $specific_export_username = get_config('local_remote_backup_provider', 'specific_export_username');\n if (!empty($specific_export_username)){\n global $DB;\n // now we look up the user in the DB:\n $specific_export_user = $DB->get_record('user', array('username' => $specific_export_username ));\n if (!empty($specific_export_user)){\n return $specific_export_user;\n }\n }\n // if no specific export user can be found, we return false\n return false;\n }",
"public function path(): string\n {\n // path to your own account\n if ($this->model->isLoggedIn() === true) {\n return 'account';\n }\n\n return 'users/' . $this->model->id();\n }",
"public function getBackupDirectory()\n {\n\n return Bourbon::getInstance()->getDataDirectory() . 'backups' . DIRECTORY_SEPARATOR;\n\n }",
"function getAccountDirectory() {\n \n if (!($windir = getWindowsDirectory()))\n return false;\n\n $ini_file = $windir . '/' . FILE_NAME_Inc;\n if (!($ini = parse_ini_file($ini_file, true)))\n return false;\n\n return $ini[SECTION_System][VALUE_AccountDirectory];\n}",
"public function export_csv()\n {\n return Excel::download(new UsersExport, 'user.xlsx');\n }",
"function init__user_export()\n{\n define('USER_EXPORT_ENABLED', false);\n define('USER_EXPORT_MINUTES', 60 * 24);\n\n define('USER_EXPORT_DELIM', ',');\n\n define('USER_EXPORT_PATH', 'data_custom/modules/user_export/out.csv');\n\n define('USER_EXPORT_IPC_AUTO_REEXPORT', false);\n define('USER_EXPORT_IPC_URL_EDIT', null); // add or edit\n define('USER_EXPORT_IPC_URL_DELETE', null);\n define('USER_EXPORT_EMAIL', null);\n\n global $USER_EXPORT_WANTED;\n $USER_EXPORT_WANTED = array(\n // LOCAL => REMOTE\n 'id' => 'Composr member ID',\n 'm_username' => 'Username',\n 'm_email_address' => 'E-mail address',\n );\n}",
"public static function getFileadminPath() {\n\t\treturn 'fileadmin/';\n\t}",
"public function export()\n {\n return Excel::download(new UsersExport, 'users.xlsx');\n }",
"public static function getDataDir()\n {\n return self::getDir('getDataHome');\n }",
"function wp_privacy_exports_dir()\n {\n }",
"function fm_get_user_dir_space($userid = NULL) {\r\n\tglobal $USER;\r\n\t\r\n\tif ($userid == NULL) {\r\n\t\t$userid = $USER->id;\r\n\t}\r\n\t\r\n\treturn \"file_manager/users/$userid\";\r\n}",
"function rlip_get_export_filename($plugin, $tz = 99) {\n global $CFG;\n $tempexportdir = $CFG->dataroot . sprintf(RLIP_EXPORT_TEMPDIR, $plugin);\n $export = basename(get_config($plugin, 'export_file'));\n $timestamp = get_config($plugin, 'export_file_timestamp');\n if (!empty($timestamp)) {\n $timestamp = userdate(time(), get_string('export_file_timestamp',\n $plugin), $tz);\n if (($extpos = strrpos($export, '.')) !== false) {\n $export = substr($export, 0, $extpos) .\n \"_{$timestamp}\" . substr($export, $extpos);\n } else {\n $export .= \"_{$timestamp}.csv\";\n }\n }\n if (!file_exists($tempexportdir) && !@mkdir($tempexportdir, 0777, true)) {\n error_log(\"/blocks/rlip/lib.php::rlip_get_export_filename('{$plugin}', {$tz}) - Error creating directory: '{$tempexportdir}'\");\n }\n return $tempexportdir . $export;\n}",
"public function getFolderPath(){}",
"public function export()\n {\n return $this->connector->exportLoginData();\n }",
"private function get_reports_dir(Application $app) : string {\n\n\t\t//Generate path directory\n\t\treturn $this->config->item(\"data_directory\").\"reports/\".$app->id.\"/\";\n\n\t}",
"public function getDirectory();",
"public function getDirectory();",
"public static function getProductImagesDownloadDirectory()\n\t{\n\n\t\t$downloadPath = SDZeCOM_Library_Helper_Directory::joinPaths(Mage::getBaseDir('media'), 'import');\n\n\t\tif (!file_exists($downloadPath))\n\t\t{\n\t\t\t@mkdir($downloadPath, 0777, true);\n\t\t}\n\n\t\treturn $downloadPath;\n\t}",
"function getImportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$import_dir = ilUtil::getDataDir().\"/svy_data\".\n\t\t\t\"/svy_\".$this->getId().\"/import\";\n\t\tif (!is_dir($import_dir))\n\t\t{\n\t\t\tilUtil::makeDirParents($import_dir);\n\t\t}\n\t\tif(@is_dir($import_dir))\n\t\t{\n\t\t\treturn $import_dir;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getHomeDirectory() {\n $physicalWebDir = getcwd();\n\n return $physicalWebDir . 'data';\n }",
"function CurrentUserFolder() {\n\treturn $_SESSION['username'];\n}",
"private static function findUserHome()\n {\n if (false !== ($home = getenv('HOME'))) {\n return $home;\n }\n\n if (self::isWindows() && false !== ($home = getenv('USERPROFILE'))) {\n return $home;\n }\n\n if (function_exists('posix_getuid') && function_exists('posix_getpwuid')) {\n $info = posix_getpwuid(posix_getuid());\n\n return $info['dir'];\n }\n\n throw new \\RuntimeException('Could not determine user directory');\n }",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/users';\n }",
"static public function get_dir() {\n\t\treturn apply_filters( 'themeisle_site_import_uri', trailingslashit( get_template_directory_uri() ) . self::OBOARDING_PATH );\n\t}",
"public function pathToStoreFile(){\n return $this->dirFile().DIRECTORY_SEPARATOR.$this->nameReportFile();\n }",
"public function getDirectory(): string;",
"public function export()\n {\n if (isAdmin()) {\n return (new ContactsExport)->download('contacts_' . now()->toIso8601String() . '.csv');\n }\n abort(404);\n }",
"private function getDatFilePath()\n\t{\n\t\treturn Zend_Registry::get('config')->get('minecraft')->get('worldPath') . '/world/players/' . $this->_username . '.dat';\n\t}",
"private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }",
"public function getHomeDirectory() {\n $physicalWebDir = getcwd();\n\n return $physicalWebDir . 'data';\n }",
"function cot_pfs_path($userid)\n{\n\tglobal $cfg;\n\n\tif ($cfg['pfs']['pfsuserfolder'])\n\t{\n\t\treturn($cfg['pfs_dir'].'/'.$userid.'/');\n\t}\n\telse\n\t{\n\t\treturn($cfg['pfs_dir'].'/');\n\t}\n}",
"public function get_files_directory() {\n return '../data/files/' . hash_secure($this->name);\n }",
"function getExportFiles()\n\t{\n\t\t$dir = $this->getExportDirectory();\n\n\t\t// quit if export dir not available\n\t\tif (!@is_dir($dir) or\n\t\t\t!is_writeable($dir))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// open directory\n\t\t$dir = dir($dir);\n\n\t\t// initialize array\n\t\t$file = array();\n\n\t\t// get files and save the in the array\n\t\twhile ($entry = $dir->read())\n\t\t{\n\t\t\tif ($entry != \".\" and\n\t\t\t\t$entry != \"..\" and\n\t\t\t\tpreg_match(\"/^[0-9]{10}_{2}[0-9]+_{2}([a-z0-9]{3})_usrf\\.[a-z]{1,3}\\$/\", $entry, $matches))\n\t\t\t{\n\t\t\t\t$filearray[\"filename\"] = $entry;\n\t\t\t\t$filearray[\"filesize\"] = filesize($this->getExportDirectory().\"/\".$entry);\n\t\t\t\tarray_push($file, $filearray);\n\t\t\t}\n\t\t}\n\n\t\t// close import directory\n\t\t$dir->close();\n\n\t\t// sort files\n\t\tsort ($file);\n\t\treset ($file);\n\n\t\treturn $file;\n\t}",
"public function export() { \n\t\t$type = $this->uri->segment ( 4 );\n\n\t\t$uri_array = $this->uri->uri_to_assoc ( 3, array (\n\t\t\t\t'export' \n\t\t) );\n\n\t\t// Export selected data\n\t\tif (($uri_array ['export'] == 'csv') || ($uri_array ['export'] == 'xls') && $type == \"user\") {\n\t\t\t$this->export_user ( $uri_array, $uri_array ['export'] );\n\t\t}\n\t\t\n\t}",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return '/uploads/users/'.$this->getId().'/';\n }",
"protected function _generateFilePath() {\n\t\treturn self::normalPaths(\n\t\t\tMage::getBaseDir(),\n\t\t\tMage::helper('pepperjam_network/config', $this->getStore())->getExportFilePath(),\n\t\t\t$this->_getFileName()\n\t\t);\n\t}",
"public function reportingDirectory(): string\n {\n return rtrim($this->config['reporting']['directory'], '/') . '/';\n }",
"public function getAbsoluteDir()\n {\n return $this->getMachine()->getHome() . '/' . $this->getDir() . '/';\n }",
"public function getDownloadPath() {}",
"private function __getEmailDir() {\n\t\treturn $this->_testDir() . 'HMS_Emails/';\n\t}",
"public function get_backup_dir()\n\t{\n\t\t$upload_dir = wp_upload_dir();\n\t\treturn $upload_dir['basedir'] . '/backup';\n\t}",
"private static function GetFolder(){\r\n\t return System:::IO:::Path::Combine(\r\n\t System:::Environment::GetFolderPath(System:::Environment:::SpecialFolder::ApplicationData),\r\n\t \"RegEditPHP\");\r\n\t }",
"public function download()\n {\n return \\Excel::download(new UsersExport, 'data_buku_yang_dipinjam.xlsx'); \n }",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/user';\n }",
"public function getUploadDir()\n {\n // image profile should be saved\n return __DIR__.'/../../../../web/uploads/evento/'.$this->id;\n }",
"public function download()\n {\n $this->authorize('viewAny', User::class);\n\n return Excel::download(new UsersExport, 'users.xlsx');\n }",
"public function getSystemDirectoryPath() {\n return Mage::getBaseDir('var') . '/smartling/localization_files';\n }",
"public function getDir();",
"public abstract function getDirectory();",
"public function getWorkingDir()\n {\n return $this->_varDirectory->getAbsolutePath($this->borntechiesHelper->getCustomerImportDirectory());\n }",
"public function sessionDirectoryPath();",
"public function getRelativeDataDir()\n\t{\n\t\treturn 'ash';\n\t}",
"public function profilePhotoDirectory(): string\n {\n return config('filament-jet.profile_photo_directory', 'profile-photos');\n }",
"public function getDirectorySpool();",
"protected function exportLocations()\n {\n echo 'Starting ' . $this->accountName . ' locations file generation.' . PHP_EOL;\n $time = time();\n $fileName = $this->accountID . \"_locations.txt\";\n $fullFilePath = self::EXPORT_TMP_DIR . '/' . $time . \"_\" . $fileName;\n\n $dataSet = $this->dataAccessContainer['Table.Mhcdynad.MhcLocations']->exportLocations($this->accountID);\n if (!$this->writeTabSeparatedFileStmt($fullFilePath, $dataSet)) {\n echo $this->accountID . ' locations tmp file could not be created.' . PHP_EOL;\n\n return false;\n }\n\n // file move operations\n $month = date(\"m\", strtotime($this->monthYear));\n $year = date(\"Y\", strtotime($this->monthYear));\n if (filesize(self::EXPORT_TMP_DIR . '/' . $time . \"_\" . $fileName)) {\n\n if (rename(self::EXPORT_TMP_DIR . '/' . $time . \"_\" . $fileName, $this->settingsOutPath . '/' . $fileName)) {\n chmod($this->settingsOutPath . '/' . $fileName, 0666);\n copy(\n $this->settingsOutPath . '/' . $fileName,\n $this->metaFileOutPath . '/' . $year . '_' . $month . '_' . $fileName\n );\n chmod($this->metaFileOutPath . '/' . $year . '_' . $month . '_' . $fileName, 0666);\n echo $this->accountID . ' locations file created successfully.' . PHP_EOL;\n } else {\n echo $this->accountID . ' locations tmp file could not be moved!' . PHP_EOL;\n }\n\n } else {\n echo $this->accountID . ' locations file could not be created.' . PHP_EOL;\n }\n\n echo 'Finishing ' . $this->accountName . ' locations file generation.' . PHP_EOL;\n }",
"function jobsearch_resume_export_files_upload_dir($dir = '')\n{\n $cus_dir = 'jobsearch-resume-export-temp';\n $dir_path = array(\n 'path' => $dir['basedir'] . '/' . $cus_dir,\n 'url' => $dir['baseurl'] . '/' . $cus_dir,\n 'subdir' => $cus_dir,\n );\n return $dir_path + $dir;\n}",
"public static function getAbsoluteDataDir(){\r\n\t\treturn sfTeraWurflConfig::getDataDir();\r\n\t}",
"public function getDefaultUserAliasesPath()\n {\n return $this->getUserHomePath().'/'.self::USER_ALIASES_DIR_NAME;\n }",
"public static function getConfigDir()\n {\n return self::getDir('getConfigHome');\n }",
"public static function get_directory(): string {\n return Simply_Static\\Options::instance()->get('local_dir') ?: '';\n }",
"function getSystemUploadDirectory() {\r\n return sys_get_temp_dir();\r\n }",
"public function getFileDirectory();",
"public function GetRealPath()\n {\n return PATH_CMS_CUSTOMER_DATA.'/'.$this->GetRealFileName();\n }",
"function export_system_users_csv() {\r\n\t$sql = \"SELECT * from system_users_tbl\";\r\n\t$result = runQuery($sql);\r\n\t\r\n\t# open file\r\n\t$export_file = \"downloads/system_users_export.csv\";\r\n\t$handler = fopen($export_file, 'w');\r\n\t\r\n\tfwrite($handler, \"system_users_id,system_users_name,system_users_description,system_users_disabled\\n\");\r\n\tforeach($result as $line) {\r\n\t\tfwrite($handler,\"$line[system_users_id],$line[system_users_name],$line[system_users_descripion],$line[system_users_disabled]\\n\");\r\n\t}\r\n\t\r\n\tfclose($handler);\r\n\r\n}",
"public static function getWorkingDir()\n {\n return Mage::getBaseDir('var') . DS . 'storelocator' . DS;\n }",
"public function getExport(){\n\n $Model = new \\EmailNewsletter\\model\\Email;\n\n $result = $Model\n ->select('email')\n ->order('created_on DESC')\n ->data();\n\n $csv = '';\n\n while($row = $result->fetch()){\n $csv .= \"{$row['email']}\\n\";\n }//while\n\n $path = ENACT_STORAGE . 'email-newsletter-dump.csv';\n\n file_put_contents(ENACT_STORAGE . 'email-newsletter-dump.csv', $csv);\n\n if(!is_file($path)){\n $back = enact_cpSlug('email-newsletter/');\n $this->html(\"<h1>Sorry, the email newsletter export doesn't exist</h1><a href='{$back}'>Go back</a>\");\n }//if\n\n $this->download($path);\n\n }",
"protected function getTempFolderPath() {}",
"protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/documents/images/profile';\n }",
"protected function checkOutputPaths()\n {\n /* Uncomment iff shared dir is brought back */\n /* if (!is_dir($this->baseExportDir . self::SHARED_DIR_DOWNLOADS . '/' . $this->accountID)) { */\n /* mkdir($this->baseExportDir . self::SHARED_DIR_DOWNLOADS . '/' . $this->accountID); */\n /* chmod($this->baseExportDir . self::SHARED_DIR_DOWNLOADS . '/' . $this->accountID, 0777); */\n /* } */\n\n if (!is_dir($this->baseExportDir . '/'. $this->accountID)) {\n mkdir($this->baseExportDir . '/'. $this->accountID);\n chmod($this->baseExportDir . '/'. $this->accountID, 0777);\n }\n\n if (!is_dir($this->commissionsOutPath)) {\n mkdir($this->commissionsOutPath);\n chmod($this->commissionsOutPath, 0777);\n }\n\n if (!is_dir($this->settingsOutPath)) {\n mkdir($this->settingsOutPath);\n chmod($this->settingsOutPath, 0777);\n }\n\n if (!is_dir($this->dailyFileOutPath)) {\n mkdir($this->dailyFileOutPath);\n chmod($this->dailyFileOutPath, 0777);\n }\n\n if (!is_dir($this->monthlyFileOutPath)) {\n mkdir($this->monthlyFileOutPath);\n chmod($this->monthlyFileOutPath, 0777);\n }\n\n if (!is_dir($this->metaFileOutPath)) {\n mkdir($this->metaFileOutPath);\n chmod($this->metaFileOutPath, 0777);\n }\n }",
"public function getHomeDir()\n {\n return $this->homeDir;\n }",
"public function getDirectory()\n {\n return mfConfig::get('mf_sites_dir').\"/\".$this->getSiteName().\"/\".$this->getApplication().\"/view/pictures/\".$this->get('lang');\n }",
"protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../uploads/user/';\n }",
"public function getInstallationPath()\n {\n return get_storage_path($this->getSubdir().DIRECTORY_SEPARATOR.$this->getId());\n }",
"public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'invitationstatus'.DS.'file';\n }",
"public function utils_dir(){\n return $this->plugin_dir() . 'utils/';\n }",
"public function getUserPath($user_id, $type = 'curl') {\n\t\t$user_name = Yii::app()->db->createCommand()\n\t\t\t->select('username')\n\t\t\t->from('user')\n\t\t\t->where(':id = id', array(':id' => $user_id))\n\t\t\t->queryColumn();\n\t\t\n\t\t$type = ($type == 'curl') ? 'curl' : 'ftp';\n\t\t\n\t\treturn Yii::getPathOfAlias('application.' . $type . '_downloads') . DIRECTORY_SEPARATOR . $user_name[0];\n\t}",
"protected function getUploadDir()\n {\n return 'uploads/org' . $this->id;\n }",
"public function public_path();",
"public function getDataDir()\n {\n return (string) $this->file->get(self::SETTING_DATA_DIR);\n }",
"protected function outputPath()\n {\n $destination = $this->ask('Where do you want to save the file? (Press enter for the current directory)'); \n $output_path = !is_null($destination) ? $destination : generate_path($this->config('source'));\n \n if (!file_exists($output_path)) {\n mkdir($output_path, 0744, true);\n }\n\n return $output_path;\n }",
"public function getRocketeerConfigFolder()\n\t{\n\t\treturn $this->getUserHomeFolder().'/.rocketeer';\n\t}",
"function exportUsers()\n {\n //get all users in the given range, return array of user data.\n geoAdmin::m('Fake export run, all users exported from local to bridge.', geoAdmin::NOTICE);\n return true;\n }",
"public static function dashboardAssetsPath()\n {\n return asset(config('onion_engine.options.public_assets_path').'dashboard/assets').'/';\n }",
"private function getSessionSavePath() {}",
"public static function getDumpPath()\n\t{\n\t\treturn FileCache::getCacheDir() . DIRECTORY_SEPARATOR . 'DatabaseReportBotDRL.red';\n\t}"
] | [
"0.77157414",
"0.7433574",
"0.70509726",
"0.6722199",
"0.6703358",
"0.6395572",
"0.63304895",
"0.63304895",
"0.6227603",
"0.61589086",
"0.6032105",
"0.60036784",
"0.5987433",
"0.59700906",
"0.5887101",
"0.5882436",
"0.5869087",
"0.58589864",
"0.5856343",
"0.5844826",
"0.58379686",
"0.583199",
"0.5830543",
"0.58151674",
"0.57578456",
"0.57331866",
"0.57066405",
"0.56962854",
"0.5686479",
"0.566438",
"0.5652962",
"0.5652962",
"0.56365025",
"0.5623257",
"0.5612983",
"0.5609754",
"0.55862427",
"0.557797",
"0.5576212",
"0.5554114",
"0.5554061",
"0.55536056",
"0.55513924",
"0.55494606",
"0.5547889",
"0.55475193",
"0.55462056",
"0.5525364",
"0.5517539",
"0.5515213",
"0.5512433",
"0.5511942",
"0.54956573",
"0.54645526",
"0.54621786",
"0.5459629",
"0.5452029",
"0.5446317",
"0.5441281",
"0.54407966",
"0.54407775",
"0.5436714",
"0.5436019",
"0.54341894",
"0.5433262",
"0.5401168",
"0.5398779",
"0.5387375",
"0.53846586",
"0.53726643",
"0.5364786",
"0.53535736",
"0.5350561",
"0.53483516",
"0.5346728",
"0.5341043",
"0.5337287",
"0.5336429",
"0.5335494",
"0.5331977",
"0.53306025",
"0.5330514",
"0.5328314",
"0.53255975",
"0.53114",
"0.5307226",
"0.5300288",
"0.5296831",
"0.529509",
"0.5289343",
"0.5286369",
"0.52802235",
"0.52797806",
"0.52769697",
"0.5271996",
"0.526753",
"0.5258639",
"0.5247831",
"0.5245002",
"0.5243303"
] | 0.8034237 | 0 |
Get a list of the already exported files in the export directory Get a list of the already exported files in the export directory | function getExportFiles()
{
$dir = $this->getExportDirectory();
// quit if export dir not available
if (!@is_dir($dir) or
!is_writeable($dir))
{
return array();
}
// open directory
$dir = dir($dir);
// initialize array
$file = array();
// get files and save the in the array
while ($entry = $dir->read())
{
if ($entry != "." and
$entry != ".." and
preg_match("/^[0-9]{10}_{2}[0-9]+_{2}([a-z0-9]{3})_usrf\.[a-z]{1,3}\$/", $entry, $matches))
{
$filearray["filename"] = $entry;
$filearray["filesize"] = filesize($this->getExportDirectory()."/".$entry);
array_push($file, $filearray);
}
}
// close import directory
$dir->close();
// sort files
sort ($file);
reset ($file);
return $file;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function FetchExporterList()\n\t{\n\t\t$exporterRoot = APP_ROOT.\"/includes/converter/exporters/\";\n\t\t$files = scandir($exporterRoot);\n\n\t\tforeach($files as $file) {\n\t\t\tif(!is_file($exporterRoot.$file) || isc_substr($file, -3) != \"php\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trequire_once $exporterRoot.$file;\n\t\t\t$file = isc_substr($file, 0, isc_strlen($file)-4);\n\t\t\t$className = \"ISC_ADMIN_EXPORTER_\".isc_strtoupper($file);\n\t\t\tif(!class_exists($className)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$exporter = new $className;\n\t\t\t$exporters[$file] = array(\n\t\t\t\t\"title\" => $exporter->title,\n\t\t\t\t\"configuration\" => \"\"\n\t\t\t);\n\t\t\tif(method_exists($exporter, \"Configure\")) {\n\t\t\t\t$exporters[$file]['configuration'] = $exporter->Configure();\n\t\t\t}\n\t\t}\n\t\treturn $exporters;\n\t}",
"abstract public function getAvailableExports();",
"public static function GetExportFileTypeList()\n\t{\n\t\t$files = scandir(TYPE_ROOT);\n\n\t\t$types = array();\n\n\t\tforeach($files as $file) {\n\t\t\tif(!is_file(TYPE_ROOT . $file) || isc_substr($file, -3) != \"php\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trequire_once TYPE_ROOT . $file;\n\n\t\t\t$file = isc_substr($file, 0, isc_strlen($file) - 4);\n\t\t\t/*\n\t\t\t$pos = isc_strrpos($file, \".\");\n\t\t\t$typeName = isc_strtoupper(isc_substr($file, $pos + 1));\n\t\t\t*/\n\t\t\t$className = \"ISC_ADMIN_EXPORTFILETYPE_\" . strtoupper($file); //$typeName;\n\t\t\tif(!class_exists($className)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$obj = new $className;\n\t\t\tif (!$obj->ignore) {\n\t\t\t\t$types[$file] = $obj->GetTypeDetails();\n\t\t\t}\n\t\t}\n\n\t\treturn $types;\n\t}",
"function _generateFilesList() {\n return array();\n }",
"public function getNfsExports()\n {\n return $this->nfs_exports;\n }",
"protected function getExistingDumps()\n\t{\n\t\t$files = glob($this->backupDir . '/*.' . $this->extension);\n\t\t$dumps = array();\n\t\tforeach ($files as $filename)\n\t\t{\n\t\t\t$time = $this->getTime(basename($filename));\n\t\t\tif ($time !== FALSE)\n\t\t\t{\n\t\t\t\t$dumps[] = array(\n\t\t\t\t\t'path' => $filename,\n\t\t\t\t\t'time' => $time,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $dumps;\n\t}",
"public function findExports();",
"public function exportedAssets(): array\n {\n $exported = [];\n\n foreach ($this->tagsByType('ExportAssets') as $export) {\n $characterId = $export->tags->item;\n\n foreach ($export->names->item as $name) {\n $exported[(string) $name] = (int) $characterId;\n }\n }\n\n return $exported;\n }",
"public function fileList()\n {\n return array_values(array_diff(scandir($this->location), ['.', '..']));\n }",
"private function exportAll()\n {\n $files = Mage::getModel('factfinder/export_type_product')->saveAll();\n echo \"Successfully generated the following files:\\n\";\n foreach ($files as $file) {\n echo $file . \"\\n\";\n }\n }",
"public function clearExports()\n {\n $location = \"application/export/files/*.*\";\n $files = glob($location); \n foreach($files as $file){\n unlink($file); \n }\n return;\n }",
"protected function _getFiles() {\n\t\t$Directory = new RecursiveDirectoryIterator(BACKUPS);\n\t\t$It = new RecursiveIteratorIterator($Directory);\n\t\t$Regex = new RegexIterator($It, '/dbdump_.*?[\\.sql|\\.gz]$/', RecursiveRegexIterator::GET_MATCH);\n\t\t$files = array();\n\t\tforeach ($Regex as $v) {\n\t\t\t$files[] = $v[0];\n\t\t}\n\t\t$files = array_reverse($files);\n\t\treturn $files;\n\t}",
"private function exportFilesAndClear()\n {\n foreach (File::allFiles(Auth()->user()->getPublicPath()) as $file) {\n if (strpos($file, \".jpg\") !== false || strpos($file, \".png\") !== false) {\n $name = $this->reformatName($file);\n File::move($file, Auth()->user()->getPublicPath() . '/' . $name);\n }\n }\n $files = scandir(Auth()->user()->getPublicPath());\n foreach ($files as $key => $file) {\n if (is_dir(Auth()->user()->getPublicPath() . '/' . $file)) {\n if ($file[0] != '.') {\n File::deleteDirectory(Auth()->user()->getPublicPath() . '/' . $file);\n }\n } else {\n if (strpos($file, \".jpg\") === false && strpos($file, \".png\") === false) {\n File::delete(Auth()->user()->getPublicPath() . '/' . $file);\n }\n }\n }\n return null;\n }",
"public function getList() {\n\t\treturn Cgn_Module_Manager_File::getListStatic();\n\t}",
"public function get_h5p_exports_list($ids = NULL) {\n global $wpdb;\n\n // Determine where part of SQL\n $where = ($ids ? \"WHERE id IN (\" . implode(',', $ids) . \")\" : '');\n\n // Look up H5P IDs\n $results = $wpdb->get_results(\n \"SELECT hc.id,\n hc.slug\n FROM {$wpdb->prefix}h5p_contents hc\n {$where}\"\n );\n\n // Format output\n $data = array();\n $baseurl = $this->get_h5p_url(true);\n foreach ($results as $h5p) {\n $slug = ($h5p->slug ? $h5p->slug . '-' : '');\n $data[] = array(\n 'id' => $h5p->id,\n 'url' => \"{$baseurl}/exports/{$slug}{$h5p->id}.h5p\"\n );\n }\n return $data;\n }",
"function getExportDirectory()\n\t{\n\t\t$export_dir = ilUtil::getDataDir().\"/usrf_data/export\";\n\n\t\treturn $export_dir;\n\t}",
"function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}",
"function getExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$export_dir = ilUtil::getDataDir().\"/svy_data\".\"/svy_\".$this->getId().\"/export\";\n\n\t\treturn $export_dir;\n\t}",
"public function getFileList()\n {\n return array_map(\n function (FileEntry $file) {\n return $file->getFilename();\n },\n $this->pharchive->getFiles()\n );\n }",
"protected function getModuleFileNames()\n {\n $results = db_query('SELECT name, filename FROM {system} WHERE status = 1 ORDER BY weight ASC, name ASC')->fetchAllAssoc('name');\n\n return array_map(function ($value) {\n return DRUPAL_ROOT.DIRECTORY_SEPARATOR.$value->filename;\n }, $results);\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }",
"protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}",
"function get_export_list(){\n\n\t\t$output = array();\n\n\t\t$query = \"SELECT lead_id FROM leads_pending\n\t\tWHERE sent_fes = 0\n\t\tLIMIT 60000; \";\n\n\t\tif ($result = mysql_query($query, $this->conn)){\n\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t$output[] = $row['lead_id'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->display(\"Query failed: $query\" . mysql_error($this->conn));\n\t\t}\n\n\t\treturn $output;\n\t}",
"function DNUI_get_backup() {\r\n $basePlugin = plugin_dir_path(__FILE__) . '../backup/';\r\n $urlBase = plugin_dir_url(__FILE__) . '../backup/';\r\n\r\n $out = array();\r\n $backups = DNUI_scan_dir($basePlugin);\r\n foreach ($backups as $backup) {\r\n $file = DNUI_scan_dir($basePlugin . $backup);\r\n array_push($out, array('id' => $backup, 'urlBase' => $urlBase, 'files' => $file));\r\n }\r\n return $out;\r\n}",
"public function export() {\n $data = array();\n foreach ($this->elements as $element) {\n $data[$element->getName()] = $element->export();\n }\n return $data;\n }",
"function getExportPath() {\n\t\t$exportPath = Config::getVar('files', 'files_dir') . '/' . $this->getPluginSettingsPrefix();\n\t\tif (!file_exists($exportPath)) {\n\t\t\t$fileManager = new FileManager();\n\t\t\t$fileManager->mkdir($exportPath);\n\t\t}\n\t\tif (!is_writable($exportPath)) {\n\t\t\t$errors = array(\n\t\t\t\tarray('plugins.importexport.common.export.error.outputFileNotWritable', $exportPath)\n\t\t\t);\n\t\t\treturn $errors;\n\t\t}\n\t\treturn realpath($exportPath) . '/';\n\t}",
"public function getFiles ();",
"public function export_all()\n\t{\n\t\tforeach ($this->collection as $image)\n\t\t{\n\t\t\t$image->export();\n\t\t}\t\n\t}",
"static function getList()\n {\n $out = array();\n\n if ($dh = opendir(__DIR__ . '/../img/')) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, -4) === '.jpg') {\n $filename = substr($file, 0, -4);\n $out[$filename] = realpath(__DIR__ . '/../img/' . $file);\n }\n }\n\n closedir($dh);\n }\n\n return $out;\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }",
"public function getPrintFiles()\n {\n $key = $this->specification->key;\n\n $files = glob(storage_path('prints' . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . '*.docx'));\n $file_names = array_map('basename', $files);\n\n return $file_names;\n }",
"public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }",
"public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"protected function _getDeclaredModuleFiles()\n {\n $etcDir = $this->getOptions()->getEtcDir();\n $moduleFiles = glob($etcDir . DS . 'modules' . DS . '*.xml');\n if (!$moduleFiles) {\n return false;\n }\n\n $collectModuleFiles = array();\n foreach ($moduleFiles as $files) {\n array_push($collectModuleFiles, $files);\n }\n\n return $collectModuleFiles;\n }",
"public function exportParticipantsList(){\n return (new ParticipantsExport())->download('participants.xls');\n }",
"public function getModulesDirOnDisk() {\n\t\t$moduleList = array();\n\t\t$modulePath = Yii::getPathOfAlias('application.modules');\n\t\t$modules = scandir(Yii::getPathOfAlias('application.modules'));\n\t\tforeach($modules as $name) {\n\t\t\tif (file_exists($moduleFile = $modulePath . '/' . $name . '/' . ucfirst($name) . 'Module.php')) {\n\t\t\t\t$moduleName = strtolower(trim($name));\n\t\t\t\tif(!in_array($moduleName, self::getIgnoreModule())) {\n\t\t\t\t\t$moduleList[] = $moduleName;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(count($moduleList) > 0) {\n\t\t\treturn $moduleList;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function getExportDirectory() {\n\n $upload_dir = wp_upload_dir();\n\n $path = $upload_dir['basedir'] . '/form_entry_exports';\n\n // Create the backups directory if it doesn't exist\n if ( is_writable( dirname( $path ) ) && ! is_dir( $path ) )\n mkdir( $path, 0755 );\n\n // Secure the directory with a .htaccess file\n $htaccess = $path . '/.htaccess';\n\n $contents[]\t= '# ' . sprintf( 'This %s file ensures that other people cannot download your export files' , '.htaccess' );\n $contents[] = '';\n $contents[] = '<IfModule mod_rewrite.c>';\n $contents[] = 'RewriteEngine On';\n $contents[] = 'RewriteCond %{QUERY_STRING} !key=334}gtrte';\n $contents[] = 'RewriteRule (.*) - [F]';\n $contents[] = '</IfModule>';\n $contents[] = '';\n\n if ( ! file_exists( $htaccess ) && is_writable( $path ) && require_once( ABSPATH . '/wp-admin/includes/misc.php' ) )\n insert_with_markers( $htaccess, 'BackUpWordPress', $contents );\n\n return $path;\n }",
"public function get_file_list() {\n\t\tset_time_limit( 0 );\n\n\t\t$this->image_dir = self::_add_trailing_slash( $this->image_dir );\n\n\t\tif ( is_dir( $this->image_dir ) ) {\n $result = array();\n\t\t\t$iterator = new \\RecursiveDirectoryIterator( $this->image_dir, \\FileSystemIterator::SKIP_DOTS );\n\t\t\t$iterator = new \\RecursiveIteratorIterator( $iterator );\n\t\t\t$iterator = new \\RegexIterator( $iterator, '/^.+\\.(jpe?g|png|gif|svg)$/i', \\RecursiveRegexIterator::MATCH );\n\n\t\t\tforeach ( $iterator as $info ) {\n\t\t\t if ( $info->isFile() ) {\n $result[] = $info->getPathname();\n }\n\t\t\t}\n\n\t\t\tunset( $iterator );\n\t\t} else {\n $result = false;\n }\n\n\t\treturn $result;\n\t}",
"public function getFiles() {}",
"public function readAll()\r\n {\r\n $plugins_dir = $this->basePath.\"/extern/openInviter/plugins\";\r\n $array_file=array();\r\n \r\n $temp=glob(\"{$plugins_dir}/*.php\");\r\n foreach ($temp as $file) {\r\n// echo 'File: '.$file.' - Check: '.str_replace(\"{$plugins_dir}/\",'',$file).\"\\n\";\r\n\r\n if (($file!=\".\") AND ($file!=\"..\") AND (!isset($this->ignoredFiles[str_replace(\"{$plugins_dir}/\",'',$file)]))) {\r\n $array_file[$file]=$file;\r\n }\r\n }\r\n\r\n return $array_file;\r\n }",
"protected function getFiles(): array\n {\n return [];\n }",
"public function getTemporaryFilesPathForExport() {}",
"public function getDatafiles()\n {\n return $this->game->getDatafiles();\n }",
"public function exportProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//output\n\t\t\t\t'{\"Export\":{\"created_timestamp\":1414143865,\"created\":\"2014-10-24 12:44:25\"},\"Languages\":[],\"Messages\":[],\"References\":[],\"Translations\":[]}',\n\t\t\t\t//headers\n\t\t\t\tarray(\n\t\t\t\t\t'Content-Disposition' => 'attachment; filename=\"localization_export_2014-10-24 12:44:25.json\"'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}",
"public static function GetConvertedFiles()\n\t{\n\t\t$results = array();\n\t\t$jsons = self::StatusConvert();\n\t\tforeach($jsons as $json)\n\t\t\tarray_push($results, array(\n\t\t\t\t\"name\"\t\t=> $json->outputName\n\t\t\t\t,\"size\"\t\t=> $json->outputSize\n\t\t\t\t,\"original\"\t=> $json->name\n\t\t\t\t,\"source\"\t=> self::GetFile($json->outputName)\n\t\t\t));\n\t\treturn $results;\n\t}",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/mediaelement.php',\n 'data_custom/mediaelement/flashmediaelement.swf',\n 'data_custom/mediaelement/silverlightmediaelement.xap',\n 'themes/default/css_custom/mediaelementplayer.css',\n 'themes/default/images_custom/mediaelement/background.png',\n 'themes/default/images_custom/mediaelement/bigplay.png',\n 'themes/default/images_custom/mediaelement/bigplay_svg.svg',\n 'themes/default/images_custom/mediaelement/controls.png',\n 'themes/default/images_custom/mediaelement/controls_svg.svg',\n 'themes/default/images_custom/mediaelement/jumpforward.png',\n 'themes/default/images_custom/mediaelement/loading.gif',\n 'themes/default/images_custom/mediaelement/skipback.png',\n 'themes/default/javascript_custom/mediaelement-and-player.js',\n 'themes/default/templates_custom/MEDIA_AUDIO_WEBSAFE.tpl',\n 'themes/default/templates_custom/MEDIA_VIDEO_WEBSAFE.tpl',\n );\n }",
"public function getImports();",
"function get_file_objs() {\n return $this->file_objs;\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }",
"private static function file_list($d,$x){ \r\n\t\treturn array_diff(scandir(__DIR__.'/../../'.$d),array('.','..'));\r\n\t}",
"protected function getAvailableFiles() {\n\t\t$sql = \"SELECT\tfilename\n\t\t\tFROM\twcf\".WCF_N.'_'.$this->tableName.\"\n\t\t\tWHERE\tpackageID = \".$this->installation->getPackageID();\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\n\t\t$availableFiles = array();\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$availableFiles[] = $row['filename'];\n\t\t}\n\t\t\n\t\treturn $availableFiles;\n\t}",
"public function getFiles(): array;",
"public function displayFiles()\n {\n // Specify the location of the stored files\n $path = \"application/export/files/\";\n \n // Open the folder \n $dir_handle = @opendir($path); \n\n // Loop through the files \n while ($file = readdir($dir_handle)) { \n\n if($file == \".\" || $file == \"..\" || $file == \"index.php\" ) \n\n continue; \n $myfile = $path.$file;\n $checksum = md5($myfile);\n echo \"<a href=\\\"index.php?mid=700&action=download&f=$file&csum=$checksum&area=export\\\"><span class=\\\"iconSpanExport\\\"><img src=\\\"images/icons/drive-download.png\\\" alt=\\\"User Control\\\" title=\\\"User Control\\\"/><br/>$file</a>\"; \n\n } \n // Close \n closedir($dir_handle); \n \n return;\n \n }",
"public static function get_file_list() {\n\t\t$new_file_list = array();\n\t\t$files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( ABSPATH ), RecursiveIteratorIterator::SELF_FIRST );\n\t\tforeach ( $files as $file ) {\n\t\t\t$file = realpath( $file );\n\t\t\tif ( File_List::in_ignore_list( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( is_dir( $file) ) {\n\t\t\t\t$file .= '/';\n\t\t\t}\n\t\t\t$new_file_list[] = array( $file, File_List::INCLUDED ) ;\n\t\t}\n\t\tasort( $new_file_list );\n\t\treturn array_values( $new_file_list );\n\t}",
"public function getDirectoryModules();",
"function get_list_of_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC');\n return $result;\n }",
"public function getFiles()\n\t{\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}",
"function wp_privacy_exports_dir()\n {\n }",
"public function getAll( $archived = false )\n {\n $match = $this->path;\n if ( $archived )\n {\n $match .= 'archived/';\n }\n $match .= '*' . $this->extension;\n $files = glob( $match );\n $ids = array();\n foreach ($files as $file)\n {\n $ids[] = basename( $file, $this->extension );\n }\n return $ids;\n }",
"public function get_csv_batch_files() {\n $fileName = 'F_AGEL_CFD_' . date('Ymd');\n $tmpFileName = tempnam(sys_get_temp_dir(), 'mbe_');\n $sTmpFileName = tempnam(sys_get_temp_dir(), 'mbes_');\n $zip = new ZipArchive();\n if (!$zip->open($tmpFileName, ZipArchive::CREATE)) {\n throw new export_exception(\"Unable to create file \\\"{$tmpFileName}\\\" for mexico_buzon_export\");\n }\n $zip->addFromString((\"{$fileName}.\" . self::TEXT_FILE_EXTENSION), $this->csv_export());\n $zip->close();\n file_put_contents($sTmpFileName, '');\n\n return array( (\"{$fileName}.\" . self::ZIP_FILE_EXTENSION) => array('type' => batch_export::FILE_TYPE_BINARY, 'tmp_location' => $tmpFileName),\n \"{$fileName}_s\" => array('type' => batch_export::FILE_TYPE_TEXT, 'tmp_location' => $sTmpFileName));\n }",
"public function getExportMappings()\n {\n }",
"public function &getLocalFilesLoaded() {\n\t\tstatic $array = null;\n\t\tif ($array==null) {\n\t\t\t$array = $this->ajapCoreFiles;\n\t\t\tforeach ($this->objectWriters as &$objectWriter) {\n\t\t\t\t$array = array_merge($array,$objectWriter->getLocalFilesLoaded());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $array;\n\t}",
"static function getDirectoryListing();",
"public function readPluginsDirectory()\n\t{\n\t\t$pluginsName = glob( \"plugins/*\",GLOB_ONLYDIR);\n\t\t$pluginsName = array_map('basename', $pluginsName);\n\t\treturn $pluginsName;\n\t}",
"protected function obtenerListadoDeArchivos(){\n $directorio = storage_path() . '/app/backup';\n // Array en el que obtendremos los resultados\n $res = array();\n\n // Agregamos la barra invertida al final en caso de que no exista\n if(substr($directorio, -1) != \"/\") $directorio .= \"/\";\n\n // Creamos un puntero al directorio y obtenemos el listado de archivos\n $dir = @dir($directorio) or die(\"getFileList: Error abriendo el directorio $directorio para leerlo\");\n while (($archivo = $dir->read()) !== false) {\n // Obviamos los archivos ocultos\n if($archivo[0] == \".\") continue;\n if(is_dir($directorio . $archivo)) {\n $res[] = array(\n \"nombre\" => $archivo,\n \"tamaño\" => 0,\n \"modificado\" => filemtime($directorio . $archivo)\n );\n } else if (is_readable($directorio . $archivo)) {\n $fileTime = Carbon::now()->timestamp(filemtime($directorio . $archivo));\n $res[] = array(\n \"nombre\" => $archivo,\n \"tamaño\" => $this->formatBytes(filesize($directorio . $archivo)),\n //\"modificado\" => date(\"F d Y H:i:s.\",filemtime($directorio . $archivo))\n //\"modificado\" => filemtime($directorio . $archivo)->diffForHuman()\n \"modificado\" => $fileTime->diffForHumans(),\n );\n }\n }\n $dir->close();\n return $res;\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }",
"public function getPaths()\n {\n $out = array();\n $pluginsDir = $this->baseDir . '/modules';\n foreach (scandir($pluginsDir) as $f) {\n if ($f[0] != '.' && is_dir($pluginsDir . '/' . $f)) {\n $out[$f] = realpath($pluginsDir . '/' . $f);\n }\n }\n return $out;\n }",
"public function getOtherFiles(): array;",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }",
"protected static function _getFiles() {\n\t\t$libraries = Finder::libraries();\n\t\t$libs = array_keys($libraries);\n\t\t$cachedLibs = &static::$_cachedLibs;\n\t\t$cachedFiles = &static::$_cachedFiles;\n\t\tif (array_diff($cachedLibs, $libs) || array_diff($libs, $cachedLibs)) {\n\t\t\t$cachedLibs = $libs;\n\t\t\t$cachedFiles = array ();\n\t\t\tforeach (Finder::paths('bootstrap') as $dir) {\n\t\t\t\tif ($handle = opendir($dir)) {\n\t\t\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\t\t\tif ($entry !== '.' && $entry !== '..') {\n\t\t\t\t\t\t\t$cachedFiles += array ($entry => $dir.$entry);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tclosedir($handle);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $cachedFiles;\n\t}",
"private function getArchiveFiles(): array\n {\n $list = [];\n\n for ($i = 0; $i < $this->getArchive()->numFiles; $i++) {\n\n $file = $this->getArchive()->statIndex($i);\n if ($file === false) {\n continue;\n }\n\n $name = str_replace('\\\\', '/', $file['name']);\n if (\n ($name[0] == \".\" &&\n in_array($this->getSkipMode(), [\"HIDDEN\", \"ALL\"])) ||\n ($name[0] == \".\" &&\n @$name[1] == \"_\" &&\n in_array($this->getSkipMode(), [\"COMODOJO\", \"ALL\"]))\n ) {\n continue;\n }\n\n $list[] = $name;\n }\n\n return $list;\n }",
"public function getFiles()\n {\n return array_keys($this->files);\n }",
"function get_list_of_files() {\n $result = $this->pdo->query('SELECT * FROM files ORDER BY filename ASC');\n return $result;\n }",
"private function getFilenames() {\n $result = [];\n $files = scandir($this->tmpFolder);\n foreach ($files as $v) {\n if($v != '.' && $v != '..' && '__MACOSX') {\n $result[] = $v;\n }\n }\n\n return $result;\n }",
"public function getExportItems($nExportDefId, $nFullDump, $nWithdrawn)\n {\n $aExportItems = array();\n \n $bDrawn = 'f';\n if ($nWithdrawn == 1) {\n $bDrawn = 't';\n }\n \n $query = \"SELECT DISTINCT i.item_id, h.handle\n FROM \n item i,\n dspace2omega d2o,\n ubuaux_exportdef e,\n ubuaux_exportdef2coll e2coll,\n collection col,\n collection2item col2i,\n handle h\n WHERE\n i.withdrawn='$bDrawn'\";\n if ($nWithdrawn != 1) {\n $query .= \" AND i.in_archive='t'\";\n }\n if ($nFullDump != 1) {\n $query .= \" AND i.last_modified >= d2o.last_run \";\n }\n $query .= \" AND i.item_id=h.resource_id \n AND h.resource_type_id=2\n AND i.item_id=col2i.item_id\n AND col2i.collection_id=col.collection_id \n AND col2i.collection_id=e2coll.collection_id \n AND e.exportdef_id=e2coll.exportdef_id \";\n if ($nExportDefId != 0) {\n $query .= \" AND e.exportdef_id=$nExportDefId \";\n }\n $query .= \" ORDER BY i.item_id\";\n \n \n $result = pg_query($this->dbconn, $query);\n \n while ($row = pg_fetch_assoc($result)) {\n $aExportItems[] = $row;\n }\n \n \n pg_free_result($result);\n \n \n return $aExportItems;\n }",
"public function getConcatenateFiles() {}",
"public function export();",
"public function export();",
"public function export();",
"public function export();",
"public function export();",
"public function getExport(){\n\n $Model = new \\EmailNewsletter\\model\\Email;\n\n $result = $Model\n ->select('email')\n ->order('created_on DESC')\n ->data();\n\n $csv = '';\n\n while($row = $result->fetch()){\n $csv .= \"{$row['email']}\\n\";\n }//while\n\n $path = ENACT_STORAGE . 'email-newsletter-dump.csv';\n\n file_put_contents(ENACT_STORAGE . 'email-newsletter-dump.csv', $csv);\n\n if(!is_file($path)){\n $back = enact_cpSlug('email-newsletter/');\n $this->html(\"<h1>Sorry, the email newsletter export doesn't exist</h1><a href='{$back}'>Go back</a>\");\n }//if\n\n $this->download($path);\n\n }",
"function listPlugins( ) {\n\t\t$list = array();\n\n\t\t$pathname = $GLOBALS['mosConfig_absolute_path'].'/administrator/components/com_joomap/plugins/';\n\t\tif ( is_dir($pathname) ) {\n\t\t\t$dir_handle = opendir($pathname);\n\t\t\tif( $dir_handle ) {\n\t\t\t\twhile (($filename = readdir($dir_handle)) !== false) {\n\t\t\t\t\tif( substr( $filename, -11 ) == '.plugin.php' ) {\n\t\t\t\t\t\t$list[] = $filename;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dir_handle);\n\t\t\t}\n\t\t}\n\t\treturn $list;\n\t}",
"public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }",
"public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}",
"public function export() {\n $folder = $this->config->get('oxygen.mod-import-export.path');\n if(!file_exists($folder)) {\n mkdir($folder);\n }\n $path = $folder . $this->environment;\n if(!file_exists($path)) {\n mkdir($path);\n }\n\n $this->exportStrategy->create($path);\n\n foreach($this->workers as $worker) {\n $files = $worker->export($this->output);\n foreach($files as $localPath => $path) {\n $this->output->writeln('Adding file: ' . $path);\n $this->exportStrategy->addFile($path, $localPath);\n }\n }\n\n $this->exportStrategy->commit();\n\n foreach($this->workers as $worker) {\n $worker->postExport($this->output);\n }\n }",
"public function getAll() : Array\n\t{\n\t\tif ($this->exists() && $this->isReadable()) {\n\t\t\treturn scandir($this->directory);\n\t\t}\n\n\t\treturn [];\n\t}",
"public function export_entries()\n {\n }",
"public function getFileNames();",
"function get_export_formats() {\n //default to no export (override in report class)\n return array();\n }",
"function getFiles($searchdir) {\n\tglobal $jlistConfig;\n $up_files = array();\n\n\tif(file_exists(JPATH_SITE.'/'.$jlistConfig['files.uploaddir'])){\n $startdir = JPATH_SITE.'/'.$jlistConfig['files.uploaddir'].'/';\n $dir_len = strlen($startdir);\n $dir = $startdir;\n $type = array(\"zip\",\"txt\",\"pdf\");\n $only = FALSE;\n $allFiles = TRUE;\n $recursive = TRUE;\n $onlyDir = TRUE;\n $files = array();\n $file = array();\n\n $all_dirs = scan_dir($dir, $typ, $only, $allFiles, $recursive, $onlyDir, $files);\n if ($all_dirs != FALSE) {\n reset ($files);\n foreach($files as $key => $array) {\n // ist dirname > startdir?\n if ($startdir <> $files[$key]['path']) {\n // unterverzeichnis vorhanden - nur pfadnamen ab download root + dateinamen\n $restpath = substr($files[$key]['path'], $dir_len);\n $files[$key]['path'] = $restpath;\n } else { // dir ist startdir - also nur filenamen\n $files[$key]['path'] = '';\n }\n }\n\n // list all files\n foreach($files as $key3 => $array2) {\n if ($files[$key3]['file'] <> '') {\n // no files in tempzifiles directory\n if(strpos($files[$key3]['path'], 'tempzipfiles') === FALSE) {\n $up_files[] = $files[$key3]['path'].$files[$key3]['file'];\n }\n }\n }\n }\n }\n\treturn $up_files;\n}",
"public function all_available()\n\t{\n\t\t$available = array();\n\t\tif (!is_dir($this->phpbb_root_path . 'ext/'))\n\t\t{\n\t\t\treturn $available;\n\t\t}\n\n\t\t$iterator = new \\RecursiveIteratorIterator(\n\t\t\tnew \\phpbb\\recursive_dot_prefix_filter_iterator(\n\t\t\t\tnew \\RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \\FilesystemIterator::NEW_CURRENT_AND_KEY | \\FilesystemIterator::FOLLOW_SYMLINKS)\n\t\t\t),\n\t\t\t\\RecursiveIteratorIterator::SELF_FIRST\n\t\t);\n\t\t$iterator->setMaxDepth(2);\n\n\t\tforeach ($iterator as $file_info)\n\t\t{\n\t\t\tif ($file_info->isFile() && $file_info->getFilename() == 'composer.json')\n\t\t\t{\n\t\t\t\t$ext_name = $iterator->getInnerIterator()->getSubPath();\n\t\t\t\t$ext_name = str_replace(DIRECTORY_SEPARATOR, '/', $ext_name);\n\t\t\t\tif ($this->is_available($ext_name))\n\t\t\t\t{\n\t\t\t\t\t$available[$ext_name] = $this->get_extension_path($ext_name, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tksort($available);\n\t\treturn $available;\n\t}",
"function tw_asset_list() {\n\n\t$assets = tw_app_get('tw_registered_assets');\n\n\tif (!is_array($assets)) {\n\t\t$assets = [];\n\t}\n\n\treturn $assets;\n\n}",
"public function getExportState() {}",
"public function getFiles()\n {\n $dir = $this->getDir();\n\n return array_filter(array_map(function ($file) use ($dir) {\n if (is_file($dir.$file) && pathinfo($file, PATHINFO_EXTENSION) == 'php') {\n return $dir.$file;\n }\n }, scandir($dir)));\n }",
"public function Get(){\n\n // TODO: this is horrible - try to use glob or RecursiveIteratorIterator - no time\n $fileList = [];\n\n if (!is_dir($this->currentPath)) {\n return $fileList;\n }\n\n $files = $this->scanFolder($this->currentPath);\n\n // up one level link\n if ($this->currentPath != $this->rootPath) {\n $fileList[] = array(\n 'file_name' => \"↑\",\n 'directory' => true,\n 'extension' => '',\n 'size' => \"\",\n 'link' => $this->oneLevelUp(),\n );\n }\n\n foreach ($files as $file) {\n if($file == \".\" || $file == \"..\"){\n continue;\n }\n\n if ($this->isDir($file)) {\n $fileList[] = array(\n 'file_name' => $file,\n 'directory' => true,\n 'extension' => 'folder',\n 'size' => \"\",\n 'link' => $this->currentPath . $file,\n );\n } else {\n // filter on the fly\n $ext = $this->fileExtension($file);\n if(!empty($this->extensionFilter)){\n if(!in_array($ext, $this->extensionFilter)){\n continue;\n }\n }\n $fileList[] = [\n 'file_name' => $file,\n 'directory' => false,\n 'extension' => $ext,\n 'size' => $this->fileSize($file),\n 'link' => \"\",\n ];\n\n }\n }\n\n return $fileList;\n }",
"private function getHistoricFilesList()\n\t{\n\t\t$historic_files = array();\n\t\t$files = $this->ftpConnection->listFiles($this->shop->ftp_dir);\n\t\tforeach ($files as $file) {\n\t\t\tif (defined('PATHINFO_EXTENSION')) {\n\t\t\t\tif (pathinfo($file, PATHINFO_EXTENSION) == \"csv\") {\n\t\t\t\t\t$historic_files[$file] = array(\n\t\t\t\t\t\t'name' => $file,\n\t\t\t\t\t\t'size' => $this->ftpConnection->getFileSize($file)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $historic_files;\n\t}"
] | [
"0.73119366",
"0.6505552",
"0.64573514",
"0.63354045",
"0.6275798",
"0.62234676",
"0.6104274",
"0.60710806",
"0.6069981",
"0.60503703",
"0.59917426",
"0.59884036",
"0.59783393",
"0.59728575",
"0.5964481",
"0.5882239",
"0.58674145",
"0.5851655",
"0.58128285",
"0.57794315",
"0.5776116",
"0.5774126",
"0.57705975",
"0.575993",
"0.5758907",
"0.57486105",
"0.56861806",
"0.56711584",
"0.5660773",
"0.5655934",
"0.56424594",
"0.563484",
"0.5633141",
"0.56282663",
"0.56282663",
"0.56282663",
"0.5628262",
"0.5623247",
"0.5623064",
"0.56220293",
"0.5619412",
"0.56092143",
"0.560115",
"0.55835426",
"0.5566304",
"0.55632055",
"0.5563106",
"0.5559057",
"0.55509543",
"0.5544451",
"0.55429053",
"0.55375296",
"0.5536863",
"0.55294955",
"0.55253714",
"0.5509006",
"0.5508939",
"0.550245",
"0.5494484",
"0.54901695",
"0.5488891",
"0.54869515",
"0.5484499",
"0.5479818",
"0.5479229",
"0.5472995",
"0.54690015",
"0.5458557",
"0.54561",
"0.5448694",
"0.5441536",
"0.54369533",
"0.54343265",
"0.5431594",
"0.5429637",
"0.54223603",
"0.5421577",
"0.54169106",
"0.54166144",
"0.54163116",
"0.54163116",
"0.54163116",
"0.54163116",
"0.54163116",
"0.5416175",
"0.54137844",
"0.5413736",
"0.5412661",
"0.540496",
"0.54026204",
"0.5398209",
"0.5392166",
"0.53861773",
"0.53693455",
"0.53678185",
"0.5367785",
"0.53652036",
"0.53651786",
"0.5363211",
"0.5348903"
] | 0.8022613 | 0 |
Get all exportable user defined fields | function getUserDefinedExportFields()
{
include_once './Services/User/classes/class.ilUserDefinedFields.php';
$udf_obj =& ilUserDefinedFields::_getInstance();
$udf_ex_fields = array();
foreach($udf_obj->getDefinitions() as $definition)
{
if ($definition["export"] != FALSE)
{
$udf_ex_fields[] = array("name" => $definition["field_name"],
"id" => $definition["field_id"]);
}
}
return $udf_ex_fields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getExportFields(): array;",
"public function getFieldsForExport()\n {\n return $this->fields;\n }",
"public function getFieldsForExport()\n {\n return $this->fields;\n }",
"public function getAllFields();",
"public function exportFields()\r\n\t{\r\n\t\treturn $this->exportOptions;\r\n\t}",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getUserFields()\r\n {\r\n return CrugeFactory::get()->getICrugeFieldListModels();\r\n }",
"final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }",
"public function getGroupExportableFields()\n\t{\n\t\tforeach($this->definitions as $id => $definition)\n\t\t{\n\t\t\tif($definition['group_export'])\n\t\t\t{\n\t\t\t\t$cexp_definition[$id] = $definition;\n\t\t\t}\n\t\t}\n\t\treturn $cexp_definition ? $cexp_definition : array();\n\t}",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }",
"public function getExportFields()\n {\n $fields = parent::getExportFields();\n \n if ($this->modelClass == 'Product') {\n $fields[\"URLSegment\"] = \"URLSegment\";\n $fields[\"Content\"] = \"Content\";\n $fields[\"StockID\"] = \"StockID\";\n $fields[\"Images.first.AbsoluteLink\"] = \"ImageLink\";\n }\n\n $this->extend(\"updateExportFields\", $fields);\n \n return $fields;\n }",
"abstract public function getFields();",
"abstract public function getFields();",
"public function getExportFields(): array\n {\n $summaryFields = $this->modelClass::config()->get('summary_fields') ?? [];\n $extraFields = $this->modelClass::config()->get('extra_export_fields') ?? [];\n\n if ($extraFields) {\n return array_merge($summaryFields, $extraFields);\n }\n\n return $summaryFields;\n }",
"function getFields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function getAllFields()\n {\n return $this->fields;\n }",
"public function getFields(): array;",
"public function getFields(): array;",
"public function getFields(): array;",
"private function fields() {\n $fields = array();\n include($this->directories['plugin']['var']['dir'].'/fields.php');\n return $fields;\n }",
"abstract protected function getFields();",
"public static function get_fields()\n {\n }",
"function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }",
"public function getFieldsList(){\n return $this->_get(1);\n }",
"function acf_prepare_fields_for_export($fields = array())\n{\n}",
"public function fields(){\n\t\treturn array();\n\t}",
"public function getFields() : FieldCollection;",
"public static function available_fields()\n {\n return self::$available_fields;\n }",
"public function getListFields();",
"public function fetchFields();",
"function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}",
"private function getImportableFields()\n {\n $createFields = $this->crud->getFields('create');\n $importFields = [];\n foreach ($createFields as $idx_1 => $createField) {\n if (isset($createField['importable']) && $createField['importable']) {\n if (isset($createField['importable_fields'])) {\n foreach ($createField['importable_fields'] as $idx_2 => $nested) {\n $importFields[] = $nested;\n }\n } else {\n $importFields[] = $createField;\n }\n }\n }\n\n return $importFields;\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}",
"public static function getListOfUserFields()\n {\n // so, list needs to be manually updated\n return array(\n \"morgid\",\n \"garageid\",\n \"talkid\",\n \"username\",\n \"password\",\n \"joindate\",\n \"title\",\n \"firstname\",\n \"lastname\",\n \"birthdate\",\n \"street\",\n \"postcode\",\n \"city\",\n \"country\",\n \"ccode\",\n \"email\",\n \"phone\",\n \"fax\",\n \"homepage\",\n \"jabber\",\n \"icq\",\n \"aim\",\n \"yahoo\",\n \"msn\",\n \"skype\",\n );\n }",
"public function fetch_fields() {}",
"protected function get_registered_fields()\n {\n }",
"public function fields()\n {\n return [ \n ];\n }",
"public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_NAME,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t);\n\t}",
"public function all_fields() {\n\t\t$general_fields = $this->general_fields();\n\t\t$promo_fields = $this->promotional_fields();\n\t\t$script_fields = $this->scripts_fields();\n\t\t$all_fields = array_merge( $general_fields, $promo_fields, $script_fields );\n\t\treturn $all_fields;\n\t}",
"public function get_fields() {\n\t\treturn apply_filters( 'wpcd_get_custom_fields', $this->custom_fields );\n\t}",
"protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }",
"abstract public function getFields(): array;",
"public function getFieldsAttribute(): Collection\n {\n if (! $repeatable = $this->getRepeatable()) {\n return collect([]);\n }\n\n return $repeatable->getRegisteredFields();\n }",
"public function &getFields();",
"public function getToApiObjectFields() {\n return array();\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"static public function getFieldsList () {\n return self::_getInstance()->_fieldsList;\n }",
"public function getFields()\n\t{\n\t\treturn [];\n\t}",
"public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }",
"abstract public function fields();",
"public function getCustomFields() {\n }",
"public function getCustomFields() {\n }",
"function erp_get_import_export_fields() {\n $erp_fields = [\n 'contact' => [\n 'required_fields' => [\n 'first_name',\n 'email'\n ],\n 'fields' => [\n 'first_name',\n 'last_name',\n 'email',\n 'phone',\n 'mobile',\n 'other',\n 'website',\n 'fax',\n 'notes',\n 'street_1',\n 'street_2',\n 'city',\n 'state',\n 'postal_code',\n 'country',\n 'currency',\n ]\n ],\n 'company' => [\n 'required_fields' => [\n 'email',\n 'company',\n ],\n 'fields' => [\n 'email',\n 'company',\n 'phone',\n 'mobile',\n 'other',\n 'website',\n 'fax',\n 'notes',\n 'street_1',\n 'street_2',\n 'city',\n 'state',\n 'postal_code',\n 'country',\n 'currency',\n ]\n ],\n 'employee' => [\n 'required_fields' => [\n 'first_name',\n 'last_name',\n 'user_email',\n ],\n 'fields' => [\n 'first_name',\n 'middle_name',\n 'last_name',\n 'user_email',\n 'designation',\n 'department',\n 'location',\n 'hiring_source',\n 'hiring_date',\n 'date_of_birth',\n 'reporting_to',\n 'pay_rate',\n 'pay_type',\n 'type',\n 'status',\n 'other_email',\n 'phone',\n 'work_phone',\n 'mobile',\n 'address',\n 'gender',\n 'marital_status',\n 'nationality',\n 'driving_license',\n 'hobbies',\n 'user_url',\n 'description',\n 'street_1',\n 'street_2',\n 'city',\n 'country',\n 'state',\n 'postal_code',\n ]\n ]\n ];\n\n return apply_filters( 'erp_import_export_csv_fields', $erp_fields );\n}",
"public static function getFields(){\n\t\treturn self::$fields;\n\t}",
"public function fields() {\n // The fields are passed to the constructor for this plugin.\n return $this->fields;\n }",
"abstract public function getSettingsFields();",
"public function getReadOnlyFields();",
"function ihc_get_public_register_fields($exclude_field=''){\n\t$return = array();\n\t$fields_meta = ihc_get_user_reg_fields();\n\tforeach ($fields_meta as $arr){\n\t\tif ($arr['display_public_reg']>0 && !in_array($arr['type'], array('payment_select', 'social_media', 'upload_image', 'plain_text', 'file', 'capcha')) && $arr['name']!='tos'){\n\t\t\tif ($exclude_field && $exclude_field==$arr['name']){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$return[$arr['name']] = $arr['name'];\n\t\t}\n\t}\n\treturn $return;\n}",
"public function get_fields() {\n return $this->fields;\n }",
"function ywccp_get_all_custom_fields(){\r\n\t\t\r\n\t\t$fields = array();\r\n\t\t// get billing\r\n\t\t$fields['billing'] = ywccp_get_custom_fields('billing');\r\n\t\t// get shipping\r\n\t\t$fields['shipping'] = ywccp_get_custom_fields('shipping');\r\n\t\t// get additional\r\n\t\t$fields['additional'] = ywccp_get_custom_fields('additional');\r\n\t\t\r\n\t\treturn $fields;\r\n\t}",
"public function all_fields()\n {\n $allfields = array();\n foreach (array_values($this->CLASS_CONTAINER) as $val){\n $allfields = array_merge($allfields, $this->{$val});\n }\n foreach (array_values($this->singular_fields) as $val){\n if($this->{$val}) {\n $allfields[] = $this->{$val};\n }\n }\n\n return $allfields;\n }",
"public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}",
"public function getFrontendFields();",
"public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }",
"public function getFields() {\n $modifiable_fields = [];\n $type = $this->getType();\n $bundle = $this->getBundle();\n // Get _all_ defined fields. This should return an associative array.\n $fields = Framework::instance()->fieldInfoFields();\n foreach ($fields as $field => $info) {\n if (isset($info['bundles'][$type]) && is_array($info['bundles'][$type]) && in_array($bundle, $info['bundles'][$type]) && $this->filter($field)) {\n $this->addModifier($modifiable_fields, 'field', $field);\n }\n }\n return $modifiable_fields;\n }",
"public function get_fields() {\n\t\treturn $this->fields;\n\t}",
"public function getFields() {\n return $this->program->getFields();\n }",
"public function getAllCustomFields() : array\n {\n return $this->getAll();\n }",
"public function getExportableValues() {\n\t\telgg_deprecated_notice(__METHOD__ . ' has been deprecated by toObject()', 1.9);\n\t\treturn array(\n\t\t\t'id',\n\t\t\t'entity_guid',\n\t\t\t'name',\n\t\t\t'value',\n\t\t\t'value_type',\n\t\t\t'owner_guid',\n\t\t\t'type',\n\t\t);\n\t}",
"public function fields()\n\t{\n\t\treturn [\n\t\t\t'organization_id'=>\t[\n\t\t\t\t\t\t\t\t\t'type' \t\t\t=> Type::string(),\n\t\t\t\t\t\t\t\t\t'description' \t=> 'The id of the user'\n\t\t\t\t\t\t\t\t],\n\t\t\t'scopes'\t\t=> \t[\n\t\t\t\t\t\t\t\t\t'type' \t\t\t=> Type::listOf(Type::string()),\n\t\t\t\t\t\t\t\t\t'description' \t=> 'The name of the user'\n\t\t\t\t\t\t\t\t],\n\t\t\t'id'\t\t\t=> \t[\n\t\t\t\t\t\t\t\t\t'type' \t\t\t=> Type::string(),\n\t\t\t\t\t\t\t\t\t'description' \t=> 'The active authorization start time'\n\t\t\t\t\t\t\t\t],\n\t\t];\n\t}"
] | [
"0.8024037",
"0.76265126",
"0.76265126",
"0.7204274",
"0.71236205",
"0.7002998",
"0.7002998",
"0.7002998",
"0.7002998",
"0.7002998",
"0.7002998",
"0.6957784",
"0.6915152",
"0.69085884",
"0.69043565",
"0.69043565",
"0.69043565",
"0.6840719",
"0.6826699",
"0.68175596",
"0.68175596",
"0.67935616",
"0.67618173",
"0.6744545",
"0.6744545",
"0.6744545",
"0.6744545",
"0.6744545",
"0.6740018",
"0.6697317",
"0.6697317",
"0.6697317",
"0.66921014",
"0.6686935",
"0.6647106",
"0.6634988",
"0.6613925",
"0.6598661",
"0.65906763",
"0.6588356",
"0.6559659",
"0.6551319",
"0.653548",
"0.64996934",
"0.64946836",
"0.6490797",
"0.6490797",
"0.6490797",
"0.6490797",
"0.6490797",
"0.64882916",
"0.6482759",
"0.6467464",
"0.6464678",
"0.6456807",
"0.6431233",
"0.64104754",
"0.64068824",
"0.639626",
"0.6394807",
"0.63919336",
"0.6389487",
"0.63808125",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.6377677",
"0.636385",
"0.6362718",
"0.6361216",
"0.63579655",
"0.63564676",
"0.63564676",
"0.6347291",
"0.63407135",
"0.63407063",
"0.63309157",
"0.6325862",
"0.6324219",
"0.63161844",
"0.63100564",
"0.63090605",
"0.63035697",
"0.62987554",
"0.62954676",
"0.62904537",
"0.6281443",
"0.6277799",
"0.6277667",
"0.62670666",
"0.62652177"
] | 0.804589 | 0 |
build xml export file | function buildExportFile($a_mode = "userfolder_export_excel_x86", $user_data_filter = FALSE)
{
global $ilBench;
global $log;
global $ilDB;
global $ilias;
global $lng;
//get Log File
$expDir = $this->getExportDirectory();
//$expLog = &$log;
//$expLog->delete();
//$expLog->setLogFormat("");
//$expLog->write(date("[y-m-d H:i:s] ")."Start export of user data");
// create export directory if needed
$this->createExportDirectory();
//get data
//$expLog->write(date("[y-m-d H:i:s] ")."User data export: build an array of all user data entries");
$settings =& $this->getExportSettings();
// user languages
$query = "SELECT * FROM usr_pref WHERE keyword = ".$ilDB->quote('language','text');
$res = $ilDB->query($query);
$languages = array();
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
{
$languages[$row['usr_id']] = $row['value'];
}
$data = array();
$query = "SELECT usr_data.* FROM usr_data ".
" ORDER BY usr_data.lastname, usr_data.firstname";
$result = $ilDB->query($query);
while ($row = $ilDB->fetchAssoc($result))
{
if(isset($languages[$row['usr_id']]))
{
$row['language'] = $languages[$row['usr_id']];
}
else
{
$row['language'] = $lng->getDefaultLanguage();
}
if (is_array($user_data_filter))
{
if (in_array($row["usr_id"], $user_data_filter)) array_push($data, $row);
}
else
{
array_push($data, $row);
}
}
//$expLog->write(date("[y-m-d H:i:s] ")."User data export: build an array of all user data entries");
$fullname = $expDir."/".$this->getExportFilename($a_mode);
switch ($a_mode)
{
case "userfolder_export_excel_x86":
$this->createExcelExport($settings, $data, $fullname, "latin1");
break;
case "userfolder_export_csv":
$this->createCSVExport($settings, $data, $fullname);
break;
case "userfolder_export_xml":
$this->createXMLExport($settings, $data, $fullname);
break;
}
//$expLog->write(date("[y-m-d H:i:s] ")."Finished export of user data");
return $fullname;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"com_section != 'bugtracker'\" ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'components.xml', '', 0 );\n\t}",
"public static function exportXML()\n {\n $xml = new \\XMLWriter();\n $xml->openMemory();\n $xml->setIndent(true);\n $xml->setIndentString(\"\t\");\n $xml->startDocument(\"1.0\", \"UTF-8\");\n $xml->startElement(\"productos\");\n $productos = self::findAll();\n foreach ($productos as $producto) {\n $xml->startElement(\"producto\");\n $xml->writeAttribute(\"id\", $producto->getId());\n $xml->writeElement(\"nombre\", $producto->getNombre());\n $xml->writeElement(\"descripcion\", $producto->getDescripcion());\n $urlImagen = $producto->getImagen() ? BASE_URL.\"/productos/{$producto->getId()}?image=1\": \"\";\n $xml->writeElement(\"imagen\", $urlImagen);\n if($categoria = $producto->getCategoria()) {\n $xml->startElement(\"categoria\");\n $xml->writeAttribute(\"id\", $categoria->getId());\n $xml->writeElement(\"nombre\", $categoria->getNombre());\n $xml->writeElement(\"descripcion\", $categoria->getDescripcion());\n $xml->endElement();\n }\n $xml->endElement();\n }\n $xml->endElement();\n return $xml->outputMemory();\n }",
"function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'g_id ASC',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( 0, 6 ) ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t$r['g_icon'] = '';\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'groups.xml', '', 0 );\n\t}",
"private function create_xml_file(){\r\n global $CFG;\r\n \r\n $tmpfileid = time().rand(1,99999);\r\n $tmpfile = 'export_xml_'.$tmpfileid.'.pdf';\r\n $this->attachfile = $CFG->tempdir.'/'.$tmpfile;\r\n \r\n $dom = new DOMDocument('1.0', 'utf-8');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($this->xml_structure);\r\n $dom->save($this->attachfile);\r\n }",
"public function exportXmlAction()\n {\n $fileName = 'traineedoc.xml';\n $content = $this->getLayout()->createBlock('bs_traineedoc/adminhtml_traineedoc_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction()\n {\n $fileName = 'coursedoc.xml';\n $content = $this->getLayout()->createBlock('bs_coursedoc/adminhtml_coursedoc_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function toXML();",
"public function SaveXMLFile();",
"public function exportXmlAction()\n {\n $fileName = 'curriculumdoc.xml';\n $content = $this->getLayout()->createBlock('bs_curriculumdoc/adminhtml_curriculumdoc_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction()\n {\n $fileName = 'aircraft.xml';\n $content = $this->getLayout()->createBlock('bs_misc/adminhtml_aircraft_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXml()\n {\n $time = time();\n $filePath = ROOT_DIR . \"/data/beer_$time.xml\";\n\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\"?><beers></beers>\");\n array_to_xml($this->items,$xml);\n\n try {\n $xml->asXML($filePath);\n\n App::cliLog(\"Successfully exported to $filePath\");\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }",
"function toFile($fileName = 'export.xml'){\n\t\t\tif($content = $this->process()){\n\t\t\t\t$fp = fopen($fileName,'w');\n\t\t\t\tfwrite($fp,$content);\n\t\t\t\tfclose($fp);\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\ttrigger_error(\"An error occured during XML Data generation\",1);\n\t\t\t}\t\t\t\n\t\t}",
"function _buildXML() {\r\n\r\n\t\t$db = &FabrikWorker::getDbo();\r\n\t\t$this->clearExportBuffer();\r\n\t\t$strXML = \"<?xml version=\\\"1.0\\\" ?>\\n\";\r\n\t\t$strXML .= \"<install type=\\\"fabrik\\\" version=\\\"2.0\\\">\\n\";\r\n\r\n\t\t$strXML .= \"<creationDate>\" . JRequest::getVar('creationDate', '', 'post') . \"</creationDate>\\n\";\r\n\t \t$strXML .= \"<author>\" . JRequest::getVar('creationDate', '', 'author') . \"</author>\\n\";\r\n\t \t$strXML .= \"<copyright>\" . JRequest::getVar('creationDate', '', 'copyright') . \"</copyright>\\n\";\r\n\t \t$strXML .= \"<authorEmail>\" . JRequest::getVar('creationDate', '', 'authoremail') . \"</authorEmail>\\n\";\r\n\t \t$strXML .= \"<authorUrl>\" . JRequest::getVar('creationDate', '', 'authorurl') . \"</authorUrl>\\n\";\r\n\t \t$strXML .= \"<version>\" . JRequest::getVar('creationDate', '', 'version') . \"</version>\\n\";\r\n\t \t$strXML .= \"<liscence>\" . JRequest::getVar('creationDate', '', 'license') . \"</liscence>\\n\";\r\n\t \t$strXML .= \"<description>\" . JRequest::getVar('creationDate', '', 'description') . \"</description>\\n\";\r\n\r\n\t\t$aTableObjs = array();\r\n\r\n\t\t$tables = $this->packageModel->_tables;\r\n\t\t$forms = $this->packageModel->_forms;\r\n\t\tif ($this->fabrikData) {\r\n\r\n\t\t\t$strXML .= \"<tables>\\n\";\r\n\t\t\tif (is_array($this->tableIds)) {\r\n\r\n\t\t\t\tforeach ($tables as $table) {\r\n\t\t\t\t\t$vars = get_object_vars($table);\r\n\t\t\t\t\t$strXML .= \"\\t<table>\\n\";\r\n\t\t\t\t\tforeach( $vars as $key=>$val ) {\r\n\t\t\t\t\t\tif (substr($key, 0, 1) != '_' ) {\r\n\t\t\t\t\t\t\t$strXML .= \"\\t\\t<$key><![CDATA[$val]]></$key>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$strXML .= \"</tables>\\n\\n\";\r\n\r\n\t\t\t$strXML .= \"<forms>\\n\";\r\n\r\n\t\t\tforeach ($forms as $form) {\r\n\t\t\t\t$vars = get_object_vars($form);\r\n\t\t\t\t$strXML .= \"\\t<form>\\n\";\r\n\t\t\t\tforeach ($vars as $key=>$val) {\r\n\t\t\t\t\tif (substr($key, 0, 1) != '_') {\r\n\t\t\t\t\t\t$strXML .= \"\\t\\t<$key><![CDATA[$val]]></$key>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$strXML .= \"\\t</form>\\n\";\r\n\t\t\t}\r\n\t\t\t$strXML .= \"</forms>\\n\\n\";\r\n\r\n\t\t\t$strElementXML \t\t= \"<elements>\\n\";\r\n\t\t\t$strXML \t\t\t.= \"<groups>\\n\";\r\n\t\t\t$strValidationXML \t= \"<validations>\\n\";\r\n\t\t\tforeach ($this->_aTables as $listModel) {\r\n\t\t\t\t$groups = $listModel->_oForm->getGroupsHiarachy();\r\n\r\n\t\t\t\t$i = 0;\r\n\t\t\t\tforeach ($groups as $groupModel) {\r\n\t\t\t\t\t$group = $groupModel->getGroup();\r\n\t\t\t\t\t$vars = get_object_vars($group);\r\n\t\t\t\t\t$strXML .= \"\\t<group form_id=\\\"\".$listModel->getFormModel()->getId().\"\\\" ordering=\\\"\" . $i .\"\\\">\\n\";\r\n\t\t\t\t\tforeach ($vars as $key=>$val) {\r\n\t\t\t\t\t\t//dont insert join_id as this isnt in the group table\r\n\t\t\t\t\t\tif ($key != \"join_id\") {\r\n\t\t\t\t\t\t\tif (substr($key, 0, 1) != '_') {\r\n\t\t\t\t\t\t\t\t$strXML .= \"\\t\\t<$key><![CDATA[$val]]></$key>\\n\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$strXML .= \"\\t</group>\\n\";\r\n\t\t\t\t\t$elementModels = $groupModel->getPublishedElements();\r\n\t\t\t\t\tforeach ($elementModels as $elementModel) {\r\n\t\t\t\t\t\t$element = $elementModel->getElement();\r\n\t\t\t\t\t\t$vars = get_object_vars($element);\r\n\t\t\t\t\t\t$strElementXML .= \"\\t<element>\\n\";\r\n\t\t\t\t\t\tforeach ($vars as $key=>$val) {\r\n\t\t\t\t\t\t\tif (substr($key, 0, 1) != '_') {\r\n\t\t\t\t\t\t\t\t$strElementXML .= \"\\t\\t<$key><![CDATA[$val]]></$key>\\n\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$strElementXML .= \"\\t</element>\\n\\n\";\r\n\r\n\t\t\t\t\t\tforeach ($elementModel->_aValidations as $oValidation) {\r\n\t\t\t\t\t\t\t$vars = get_object_vars($oValidation);\r\n\t\t\t\t\t\t\t$strValidationXML .= \"\\t<validation>\\n\";\r\n\t\t\t\t\t\t\tforeach ($vars as $key=>$val) {\r\n\t\t\t\t\t\t\t\tif (substr($key, 0, 1) != '_') {\r\n\t\t\t\t\t\t\t\t\t$strValidationXML .= \"\\t\\t<$key><![CDATA[$val]]></$key>\\n\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$strValidationXML .= \"\\t</validation>\\n\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$strXML \t\t\t.= \"</groups>\\n\";\r\n\t\t\t$strElementXML \t\t.= \"</elements>\\n\\n\";\r\n\t\t\t$strValidationXML \t.= \"</validations>\\n\\n\";\r\n\t\t\t$strXML .= $strElementXML . $strValidationXML;\r\n\r\n\t\t}\r\n\t\t$this->writeExportBuffer($strXML);\r\n\t\tif ($this->incTableStructure) {\r\n\t\t\t$strXML = $this->_createTablesXML($strXML);\r\n\t\t}\r\n\t\t$strXML .= $this->getTemplateFiles();\r\n\t\t$strXML .= \"</install>\";\r\n\t\t$this->writeExportBuffer($strXML);\r\n\t}",
"public function exportXmlAction()\n {\n $fileName = 'ifeedback.xml';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_ifeedback_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction()\n {\n $fileName = 'kstitem.xml';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_kstitem_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction(){\r\n $fileName = 'siege.xml';\r\n $content = $this->getLayout()->createBlock('reseauchx_reservationreseau/adminhtml_siege_grid')->getXml();\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }",
"public function createXML() {}",
"function export_to_osm() {\n $res = \"<?xml version='1.0' encoding='UTF-8'?>\\n\";\n $res .= \"<osm version='0.6' upload='false' generator='Mapcraft'>\\n\";\n\n // Export nodes\n foreach ($this->nodes as $node) {\n $res .= sprintf(\" <node id='%d' version='1' visible='true' lat='%s' lon='%s' />\\n\", $node['id'], $node['lat'], $node['lon']);\n }\n\n // Export slices\n foreach ($this->slices as $slice) {\n $res .= sprintf(\" <way id='%d' version='1' visible='true'>\\n\", $slice['id']);\n foreach ($slice['nodes'] as $node) {\n $res .= sprintf(\" <nd ref='%d' />\\n\", $node['id']);\n }\n $res .= sprintf(\" <tag k='mapcraft:index' v='%d' />\\n\", $slice['index']);\n $res .= \" </way>\\n\";\n }\n\n $res .= \"</osm>\";\n return $res;\n }",
"public function export()\r\n\t{\r\n\t\t$this->prepareExport();\r\n\t\t$this->data = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\r\n\t\t$this->data .= \"<database dump=\\\"\".Date::timeToString(1, TIME).\"\\\">\\n\";\r\n\t\tforeach($this->tables as $table)\r\n\t\t{\r\n\t\t\tif($this->showStructure)\r\n\t\t\t{\r\n\t\t\t\t$this->data .= $this->getTableStructure($table);\r\n\t\t\t}\r\n\t\t\tif(isset($this->actions[$table]))\r\n\t\t\t{\r\n\t\t\t\t$this->data .= \"\\t<\".$table.\" action=\\\"\".$this->actions[$table].\"\\\"/>\\n\";\r\n\t\t\t}\r\n\t\t\tif($this->showData)\r\n\t\t\t{\r\n\t\t\t\t$result = Core::getDB()->query(\"SELECT * FROM \".$table);\r\n\t\t\t\twhile($row = Core::getDB()->fetch($result))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->data .= \"\\t<\".$table.\">\\n\";\r\n\t\t\t\t\t$this->data .= $this->getRowAsXML($row, $table);\r\n\t\t\t\t\t$this->data .= \"\\t</\".$table.\">\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->data .= \"</database>\";\r\n\t\treturn $this;\r\n\t}",
"public function exportXmlAction()\n {\n $fileName = 'schedule.xml';\n $content = $this->getLayout()->createBlock('bs_schedule/adminhtml_schedule_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction()\n {\n $fileName = 'equipment.xml';\n $content = $this->getLayout()->createBlock('bs_logistics/adminhtml_equipment_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function createXmlFile()\r\n\t{\r\n\t\t/*\r\n\t\t<xml>\r\n\t\t\t<videofile src=\"eafade3f55760e4cdb44f82f2a4141f6ac439c5f\" thumbnail=\"e45829281e341081e43c4394544ddcee403ddc0b\" length=\"01:27\" text=\"Massmann 1\" />\r\n\t\t</xml>\r\n\t\t*/\r\n\t\t$output = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml>';\r\n\t\r\n\t\t$videosQuery = $this->mc->database->query(\"SELECT * FROM \" . $this->mc->config['database_pref'] . \"concept_mediacenter AS A WHERE view_id = ?\", array(array($this->viewId, \"i\")), array(array(\"concept_mediacenter\", \"view_id\", \"video_name\")));\r\n\t\tforeach($videosQuery->rows as $currentVideo)\r\n\t\t{\r\n\t\t\t$output .= '<videofile src=\"' . $currentVideo->video_name . '\" thumbnail=\"' . $currentVideo->video_thumbnail . '\" length=\"' . $currentVideo->video_length . '\" text=\"' . $currentVideo->video_text . '\" />';\r\n\t\t}\r\n\t\t$output .= '</xml>';\r\n\t\t\r\n\t\t$outputFileSuffix = \"\";\r\n\t\t$outputFileHandle = fopen($this->mc->config['upload_dir'] . '/root/xml/'. $this->viewDetails->view_name . $outputFileSuffix . '.xml', 'wb');\r\n\t\tfwrite($outputFileHandle, $output);\r\n\t\tfclose($outputFileHandle);\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"function rawXMLPagegroupExport()\r\n\t{\r\n\t\tglobal $myPT;\r\n\t\tglobal $myDB;\r\n\r\n\t\t$xml ='<?xml version=\"1.0\" encoding=\"'.PT_CHARSET.'\" ?>\r\n<phenotype>\r\n\t<meta>\r\n\t\t<ptversion>'.$myPT->version.'</ptversion>\r\n\t\t<ptsubversion>'.$myPT->subversion.'</ptsubversion>\r\n\t</meta>\r\n\t<pagegroups>';\r\n\t\t$sql = \"SELECT * FROM pagegroup ORDER BY grp_id\";\r\n\t\t$rs = $myDB->query($sql);\r\n\t\twhile ($row=mysql_fetch_array($rs))\r\n\t\t{\r\n\t\t\t$xml .='\r\n\t\t<group>\r\n\t\t\t<grp_id>'.$row[\"grp_id\"].'</grp_id>\r\n\t\t\t<grp_bez>'.$myPT->codeX($row[\"grp_bez\"]).'</grp_bez>\r\n\t\t\t<grp_description>'.$myPT->codeX($row[\"grp_description\"]).'</grp_description>\r\n\t\t\t<grp_statistic>'.$myPT->codeX($row[\"grp_statistic\"]).'</grp_statistic>\r\n\t\t <grp_multilanguage>'.$myPT->codeX($row[\"grp_multilanguage\"]).'</grp_multilanguage>\r\n\t\t <grp_smarturl_schema>'.$myPT->codeX($row[\"grp_smarturl_schema\"]).'</grp_smarturl_schema>\r\n\t\t</group>';\r\n\t\t}\r\n\t\t$xml.='\r\n\t</pagegroups>\r\n</phenotype>';\r\n\t\treturn $xml;\r\n\t}",
"public function exportXmlAction()\n {\n $fileName = 'handovertwo.xml';\n $content = $this->getLayout()->createBlock('bs_handover/adminhtml_handovertwo_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction()\n {\n $fileName = 'offer.xml';\n $content = $this->getLayout()->createBlock('mfb_myflyingbox/adminhtml_offer_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"private function generateXMLReport() {\n\t\t// Adds Date Block.\n\t\t$this->XML_addDate();\n\n\t\t// Adds Resource Block.\n\t\t$this->XML_addResource($this->taskResultSet->getResourceURL(), $this->taskResultSet->getResourceIP(), $this->taskResultSet->getServerBanner() );\n\n\t\t// Adds Complex Security Level Block.\n\t\t$this->XML_addSecurityLevel($this->securityLevel);\n\n\t\t// Adds block which contains Info about tested vulnerabilities.\n\t\t$this->XML_addTestedVulnerabilities();\n\n\t\t// Adds block which contains details about scan.\n\t\t$this->XML_addScanDetails();\n\n\t\t// Adds all blocks in the general xml-container.\n\t\t$this->xmlHandler->appendChild($this->xmlRoot);\n\n\t\t// Generating and saving the XML File.\n\t\t$xmlReportFilePath = $this->savePath . DIRECTORY_SEPARATOR . $this->generateReportFilePrefix() . '.xml';\n\n\n\t\t$xmlReportFileLink = 'http://' . $_SERVER['HTTP_HOST'] . '/' . $xmlReportFilePath;\n\t\t$xmlReportFileLink = str_replace('\\\\', '/', $xmlReportFileLink);\n\n\n\t\t$this->xmlHandler->save($xmlReportFilePath);\n\n\t\treturn $xmlReportFileLink;\n\t}",
"function toXML()\n {\n // Not implemented yet.\n }",
"function saveToXML(){\n\t\t$str='<collections>';\n\t\t$str.='<collection>';\n\t\tforeach($this->items as $item){\n\t\t\t$str.=\"<item>\";\n\t\t\t$str.=\"<show>$item[0]</show>\";\n\t\t\t$str.=\"<description>\".htmlspecialchars($item[1]).\"</description>\";\n\t\t\t$str.=\"<url>\".htmlspecialchars($item[2]).\"</url>\";\n\t\t\t$str.=\"</item>\";\n\t\t}\n\t\t$str.='</collection>';\n\t\t$str.='</collections>';\n\t\t$xml = new SimpleXMLElement($str);\n\t\t$filename=$this->filename.\".xml\";\n\t\theader('Content-Type: text/xml');\n\t\theader('Content-Disposition: attachment; filename=\"'.$filename.'\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\tdie($xml->asXML());\n\t\theader(\"location:index.php\");\n\t}",
"public function exportXmlAction()\n {\n $fileName = 'traineecert.xml';\n $content = $this->getLayout()->createBlock('bs_traineecert/adminhtml_traineecert_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function export_file_extension() {\r\n // override default type so extension is .xml\r\n return \".xml\";\r\n }",
"public function output_xml()\n {\n $this->comment(sprintf(\"Estimated Execution Time Is: %s\"\n , (preg_replace(\n '/^0\\.(\\d+) (\\d+)$/', '\\2.\\1', microtime()) - START_TIME)\n ));\n\n $this->comments2xml($this->xmlw, $this->comments);\n $this->close_xml();\n $xml_out = $this->xmlw->outputMemory();\n $this->debug('---- Start XML Output ----');\n $this->debug(explode(\"\\n\", $xml_out));\n $this->debug('---- End XML Output ----');\n echo $xml_out;\n exit();\n }",
"function write_file($opt,$xml)\n {\n if ($opt->write_to_file) { //write to file\n if (($out_file = fopen($opt->out_filename, \"w\")) === false) {\n err(\"Could not open file $opt->out_filename\",3);\n }\n if ((fwrite($out_file,$xml->outputMemory(TRUE))) === false){\n err(\"Could not write to file\",3);\n }\n if (!fclose($out_file)) {\n err(\"Could not close the file\",3);\n }\n }\n else fwrite(STDOUT,$xml->outputMemory(TRUE)); //write to stdout\n\n }",
"public function exportXmlAction()\n {\n $fileName = 'giftcertificates.xml';\n $content = $this->getLayout()->createBlock('ugiftcert/adminhtml_cert_grid')\n ->getXml();\n\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXmlAction()\n {\n $fileName = 'product_like.xml';\n $content = $this->getLayout()->createBlock('like/adminhtml_like_grid')->getXml(); \n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE)\n{\n\t$xml = e107::getXml();\n\t$tp = e107::getParser();\n\t$mes = e107::getMessage();\n\n\tif(vartrue($package))\n\t{\n\n\t\t$xml->convertFilePaths = TRUE;\n\t\t$xml->modifiedPrefsOnly = true;\n\t\t$xml->filePathDestination = EXPORT_PATH;\n\t\t$xml->filePathPrepend = array(\n\t\t\t'news_thumbnail'\t=> \"{e_IMAGE}newspost_images/\"\n\t\t);\n\n\n\t\t$desinationFolder = $tp->replaceConstants($xml->filePathDestination);\n\n\t\tif(!is_writable($desinationFolder))\n\t\t{\n\t\t\t$message = str_replace('[folder]', $desinationFolder, DBLAN_107);\n\t\t\t$mes->add($message, E_MESSAGE_ERROR);\n\t\t\treturn ;\n\t\t}\n\t}\n\n\n\tif($xml->e107Export($prefs,$tables,$debug))\n\t{\n\t\t$mes->add(DBLAN_108.\" \".$desinationFolder.\"install.xml\", E_MESSAGE_SUCCESS);\n\t\tif(varset($xml->fileConvertLog))\n\t\t{\n\t\t\tforeach($xml->fileConvertLog as $oldfile)\n\t\t\t{\n\t\t\t\t$file = basename($oldfile);\n\t\t\t\t$newfile = $desinationFolder.$file;\n\t\t\t\tif($oldfile == $newfile || (copy($oldfile,$newfile)))\n\t\t\t\t{\n\t\t\t\t\t$mes->add(DBLAN_109.\" \".$newfile, E_MESSAGE_SUCCESS);\n\t\t\t\t}\n\t\t\t\telseif(!file_exists($newfile))\n\t\t\t\t{\n\t\t\t\t\t$mes->add(DBLAN_110.\" \".$newfile, E_MESSAGE_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}",
"public function exportXmlAction()\n {\n $fileName = 'supplier.xml';\n $content = $this->getLayout()->createBlock('dropship360/adminhtml_logicbroker_grid')->getExcelFile($fileName);\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function _export()\n\t{\n\t\t$title=get_page_title('EXPORT');\n\n\t\tif (!array_key_exists('tables',$_POST)) warn_exit(do_lang_tempcode('IMPROPERLY_FILLED_IN'));\n\n\t\t$xml=export_to_xml($_POST['tables'],post_param_integer('comcode_xml',0)==1);\n\n\t\tbreadcrumb_set_self(do_lang_tempcode('_RESULTS'));\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('XML_DATA_MANAGEMENT'))));\n\n\t\treturn do_template('XML_STORAGE_EXPORT_RESULTS_SCREEN',array('TITLE'=>$title,'XML'=>$xml));\n\t}",
"public function export($data)\n {\n $data = array($this->root => $data);\n\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>';\n $this->recurse($data, 0);\n echo PHP_EOL;\n }",
"public function exportXmlAction()\n {\n $fileName = 'reviews_orders.xml';\n $content = $this->getLayout()->createBlock('salesreport/adminhtml_reviews_grid')->getXml();\n $this->_sendUploadResponse($fileName, $content);\n }",
"function toXML($a_include_header = true, $a_include_binary = true, $a_shuffle = false, $test_output = false, $force_image_references = false)\n\t{\n\t\t#$this->getPlugin()->includeClass(\"export/qti12/class.assMathematikOnlineExport.php\");\n\t\t#$export = new assMathematikOnlineExport($this);\n\t\t#return $export->toXML($a_include_header, $a_include_binary, $a_shuffle, $test_output, $force_image_references);\n\t}",
"function procMenuAdminMakeXmlFile()\n\t{\n\t\t// Check input value\n\t\t$menu_srl = Context::get('menu_srl');\n\t\t// Get information of the menu\n\t\t$oMenuAdminModel = getAdminModel('menu');\n\t\t$menu_info = $oMenuAdminModel->getMenu($menu_srl);\n\t\t$menu_title = $menu_info->title;\n\t\t// Re-generate the xml file\n\t\t$xml_file = $this->makeXmlFile($menu_srl);\n\t\t// Set return value\n\t\t$this->add('menu_title',$menu_title);\n\t\t$this->add('xml_file',$xml_file);\n\t}",
"public function testWriteXml() {\n\n /* @var $export \\MDN_Antidot_Model_Export_Article */\n $export = Mage::getModel('Antidot/export_article');\n\n $context = Mage::getModel('Antidot/export_context', array('fr', 'PHPUNIT'));\n //Store id 3 : site FR, id5 : site FR discount\n $context->addStore(Mage::getModel('core/store')->load(3));\n $context->addStore(Mage::getModel('core/store')->load(5));\n\n $type = MDN_Antidot_Model_Observer::GENERATE_FULL;\n\n $filename = sys_get_temp_dir().DS.sprintf(MDN_Antidot_Model_Export_Article::FILENAME_XML, 'jetpulp', $type, $context->getLang());\n\n $items = $export->writeXml($context, $filename, $type);\n\n /*\n * test three articles are exported, number returned by the method: 2 articles, one one 2 websites => 3 article exported\n */\n $this->assertEquals(3, $items);\n\n //replace generated_at by the one in the expected result\n $result = file_get_contents($filename);\n\n /**\n * test the xml contains the correct owner tag\n */\n $xml = new SimpleXMLElement($result);\n $this->assertEquals(\"JETPULP\", (string)$xml->header->owner);\n\n /**\n * test the xml contains the correct feed tag\n */\n $this->assertEquals('article PHPUNIT v'.Mage::getConfig()->getNode()->modules->MDN_Antidot->version, (string)$xml->header->feed);\n\n /**\n * test the xml contains the correct websites tag\n */\n $this->assertEquals('3', $xml->article[0]->websites->website[0]['id']);\n $this->assertEquals('French Website', (string)$xml->article[0]->websites->website[0]);\n $this->assertEquals('3', $xml->article[1]->websites->website[0]['id']);\n $this->assertEquals('French Website', (string)$xml->article[1]->websites->website[0]);\n $this->assertEquals('5', $xml->article[2]->websites->website[0]['id']);\n $this->assertEquals('France Website_discount', (string)$xml->article[2]->websites->website[0]);\n\n /**\n * test the xml contains the correct name tag\n */\n $this->assertEquals('Article A', (string)$xml->article[0]->title);\n $this->assertEquals('Article B', (string)$xml->article[1]->title);\n $this->assertEquals('Article B', (string)$xml->article[2]->title);\n\n\n /**\n * test the xml contains the correct text tag\n */\n $this->assertEquals('test contenu A test', (string)$xml->article[0]->text);\n $this->assertEquals('test contenu B test', (string)$xml->article[1]->text);\n $this->assertEquals('test contenu B test', (string)$xml->article[2]->text);\n\n\n /**\n * test the xml contains the correct url tags\n */\n $this->assertEquals('http://www.monsiteweb.fr/AA/', (string)$xml->article[0]->url);\n $this->assertEquals('http://www.monsiteweb.fr/BB/', (string)$xml->article[1]->url);\n $this->assertEquals('http://www.monsitediscount.fr/BB/', (string)$xml->article[2]->url);\n\n\n /**\n * test the xml contains the identifier\n */\n $this->assertEquals('identifier', $xml->article[0]->identifiers->identifier[0]['type']);\n $this->assertEquals('identifier', $xml->article[1]->identifiers->identifier[0]['type']);\n $this->assertEquals('identifier', $xml->article[2]->identifiers->identifier[0]['type']);\n $this->assertEquals('AA', $xml->article[0]->identifiers->identifier[0]);\n $this->assertEquals('BB', $xml->article[1]->identifiers->identifier[0]);\n $this->assertEquals('BB', $xml->article[2]->identifiers->identifier[0]);\n\n\n\n\n }",
"public function write($xml);",
"public function asXML();",
"public function generate() \r\n\t{\t\r\n\t\tparent::generate();\r\n\t\r\n\t\t$this->schemaXml = new SimpleXMLElement(file_get_contents( $this->_xmlFile ));\r\n\t\t\r\n\t\t//parse object types\r\n\t\tforeach ($this->schemaXml->children() as $reflectionType) \r\n\t\t{\r\n\t\t\tswitch($reflectionType->getName())\r\n\t\t\t{\r\n\t\t\t\tcase \"enums\":\r\n\t\t\t\t\t//create enum classes\r\n\t\t\t\t\tforeach($reflectionType->children() as $enums_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeEnum($enums_node);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"classes\":\r\n\t\t\t\t\t//create object classes\r\n\t\t\t\t\tforeach($reflectionType->children() as $classes_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeObjectClass($classes_node);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"services\":\r\n\t\t\t\t\t//implement services (api actions)\r\n\t\t\t\t\tforeach($reflectionType->children() as $services_node)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->writeService($services_node);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//write main class (if needed, this can also be included in the static sources folder if not dynamic)\r\n\t\t\t\t\t$this->writeMainClass($reflectionType->children());\r\n\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->addFile('KalturaTypes.js', $this->enumTypes);\r\n\t\t$this->addFile('KalturaVO.js', $this->voClasses);\r\n\t\t$this->addFile('KalturaServices.js', $this->serviceClasses);\r\n\t\t$this->addFile('KalturaClient.js', $this->mainClass);\r\n\t\t//write project file (if needed, this can also be included in the static sources folder if not dynamic)\r\n\t\t$this->writeProjectFile();\r\n\t}",
"public function exportToString()\n {\n $output = \"\"; \n $output .= \"<product>\" . PHP_EOL; \n $output .= \"<merchant_ref>{$this->sku}</merchant_ref>\" . PHP_EOL; \n $output .= \"<product_url>{$this->url}</product_url>\" . PHP_EOL; \n $output .= \"<image_url>{$this->imageUrl}</image_url>\" . PHP_EOL; \n $output .= \"<price>{$this->price}</price>\" . PHP_EOL; \n $output .= \"<shipping_cost>{$this->shippingCost}</shipping_cost>\" . PHP_EOL; \n $output .= \"<designation>{$this->title}</designation>\" . PHP_EOL; \n $output .= \"<description><![CDATA[{$this->description}]]></description>\" . PHP_EOL; \n $output .= \"<in_stock>{$this->instock}</in_stock>\" . PHP_EOL; \n $output .= \"<condition>{$this->condition}</condition>\" . PHP_EOL; \n $output .= \"<category>\" . $this->exportCategories() . \"</category>\" . PHP_EOL; \n $output .= \"</product>\" . PHP_EOL; \n\n return $output; \n }",
"public function exportXmlAction()\n {\n $fileName = 'customers.xml';\n $content = $this->getLayout()->createBlock('adminhtml/customer_grid')\n ->getExcelFile();\n\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function convertToXML($res, $filename) {\r\n //$result = $this->recordSet->select($sql);\r\n\t $result = $res;\r\n\t \r\n $this->xml->create_root();\r\n $this->xml->roottag->name = \"table\";\r\n \r\n while ($list_result = mysql_fetch_array($result)) {\r\n\r\n $this->xml->roottag->add_subtag(\"ROW\", array());\r\n $tag = &$this->xml->roottag->curtag;\r\n \t \r\n\t\t for ($i = 0; $i <= mysql_num_fields($result)- 1; $i++){\r\n\t \t $tag->add_subtag(mysql_field_name($result, $i), array());\r\n\t\t\t$tag->curtag->cdata = $list_result[$i];\r\n }\r\n\t }\r\n\t\r\n\t $xml_file = fopen($filename, \"w\" );\r\n $this->xml->write_file_handle( $xml_file );\r\n }",
"private function generateXml()\n {\n\n $args = array(\n\n 'posts_per_page' => -1,\n 'numberposts' => -1,\n 'orderby' => 'post_type',\n 'order' => 'DESC',\n 'post_type' => apply_filters('fpcms_sitemap_post_types', array('post', 'page'))\n\n );\n\n if ($results = get_posts($args)) {\n\n $sitemap = new \\SimpleXMLElement($this->getDocStructure());\n\n foreach ($results as $result) {\n\n $url = $sitemap->addChild('url');\n $url->addChild('loc', get_permalink($result->ID));\n\n if (has_post_thumbnail($result->ID)) {\n\n if ($image = wp_get_attachment_image_src(get_post_thumbnail_id($result->ID))) {\n $url->addChild('image:image', $image[0]);\n }\n\n }\n\n $url->addChild('lastmod', mysql2date('Y-m-d', $result->post_date_gmt));\n\n if ($result->post_type == 'page') {\n\n //Pages should display higher than posts for the same keyword\n $url->addChild('priority', apply_filters('fpcms_sitemap_page_priority', '0.7'));\n\n } else {\n\n $url->addChild('priority', apply_filters('fpcms_sitemap_post_priority', '0.4'));\n\n }\n\n }\n\n return $sitemap->asXML();\n\n }\n\n }",
"function exportXMLMetaData(&$a_xml_writer)\n\t{\n\t\tinclude_once(\"Services/MetaData/classes/class.ilMD2XML.php\");\n\t\t$md2xml = new ilMD2XML($this->getLMId(), $this->getId(), $this->getType());\n\t\t$md2xml->setExportMode(true);\n\t\t$md2xml->startExport();\n\t\t$a_xml_writer->appendXML($md2xml->getXML());\n\t}",
"function exportXML(&$a_xml_writer, $a_inst, &$expLog)\n\t{\n\t\tglobal $ilBench;\n\n\t\t$expLog->write(date(\"[y-m-d H:i:s] \").\"Structure Object \".$this->getId());\n\t\t$attrs = array();\n\t\t$a_xml_writer->xmlStartTag(\"StructureObject\", $attrs);\n\n\t\t// MetaData\n\t\t$ilBench->start(\"ContentObjectExport\", \"exportStructureObject_exportMeta\");\n\t\t$this->exportXMLMetaData($a_xml_writer);\n\t\t$ilBench->stop(\"ContentObjectExport\", \"exportStructureObject_exportMeta\");\n\n\t\t// StructureObjects\n\t\t$ilBench->start(\"ContentObjectExport\", \"exportStructureObject_exportPageObjects\");\n\t\t$this->exportXMLPageObjects($a_xml_writer, $a_inst);\n\t\t$ilBench->stop(\"ContentObjectExport\", \"exportStructureObject_exportPageObjects\");\n\n\t\t// PageObjects\n\t\t$this->exportXMLStructureObjects($a_xml_writer, $a_inst, $expLog);\n\n\t\t// Layout\n\t\t// not implemented\n\n\t\t$a_xml_writer->xmlEndTag(\"StructureObject\");\n\t}",
"function webmap_compo_lib_xml_build()\r\n{\r\n\t$this->webmap_compo_lib_xml_base();\r\n}",
"function genexml2($matricule,$nom,$prenom,$datenaissance,$lieunaissance,$telephone,$montantdu,$anneeacademique,$statut,$etablissement,$filiere,$nationalite, $type){\n\t$xml = new DOMDocument('1.0', 'utf-8');\n\t//$items = $xml->createElement('id_dataTable');\n\t\t$item = $xml->createElement('etudiant');\n\t\t$db_item=[\"matricule\"=>$matricule,\"nom\"=>$nom,\"prenom\"=>$prenom,\"telephone\"=>$telephone,\"anneeacademique\"=>$anneeacademique,\"etablissement\"=>$etablissement,\"anneeEtude\"=>$filiere,\"nationalite\"=>$nationalite,\"statut\"=>$statut,\"montant\"=>$montantdu,\"categorie\"=>$type,\"datePaiement\"=>\"\",\"reftransaction\"=>\"\",\"intermediairePaiement\"=>\"\"];\n\t\tforeach($db_item as $key => $value){\n\t\t\t$node = $xml->createElement($key,$value);\n\t\t\t$item->appendChild($node);\n\t\t}\n\t\t//$items->appendChild($item);\n\t$xml->appendChild($item);\n\t$date=date(\"Y-m-d\");\n\t$date=convertdatebanque($date);\n\t\n\treturn $xml->saveXML();\n}",
"private function saveToXml(){\n\t\n\t\t//XML-Object\n\t\t$xml = new LegosXmlWriter();\t\n\t\n\t\t// Name Worksheet\n\t\t$xml->setWorksheetName( \"Mission $this->missionId\" );\n\t\n\t\t// Write data\n\t\t$xml->writeData ( \"Mission No. $this->missionId\", 1, 1 );\n\t\t\n\t\t$xml->writeData ( \"DCM TIME + unloading, loading\", 2, 1 );\n\t\t$xml->writeData ( $this->dcmTime, 2, 2 );\n\t\t\n\t\t$xml->writeData ( \"PCM Start\", 3, 1 );\n\t\t$xml->writeData ( $this->pcmStart, 3, 2 );\n\t\t\n\t\t$xml->writeData ( \"PCM End\", 4, 1 );\n\t\t$xml->writeData ( $this->pcmEnd, 4, 2 );\n\t\t\n\t\t$xml->writeData ( \"PCM TIME\", 5, 1 );\n\t\t$xml->writeData ( $this->pcmTime, 5, 2 );\n\t\t\n\t\t$xml->writeData ( \"Total Mission Time \", 6, 1 );\n\t\t$xml->writeData ( $this->totalTime, 6, 2 );\n\t\t\n\t\t$xml->writeData ( \"Pushback Start\", 7, 1 );\n\t\t$xml->writeData ( $this->pushbackStart, 7, 2 );\n\t\t\n\t\t$xml->writeData ( \"Pushback End\", 8, 1 );\n\t\t$xml->writeData ( $this->pushbackEnd, 8, 2 );\n\t\t\n\t\t$xml->writeData ( \"Pushback TIME\", 9, 1 );\n\t\t$xml->writeData ( $this->pushbackTime, 9, 2 );\n\t\n\t\t$exportFilename = \"Export_Mission_$this->missionId \" . date ( 'Y-m-d h:i:s' ) . '.xls';\n\t\n\t\tfile_put_contents( sfConfig::get( 'app_export_path' ). \"/\". $exportFilename, $xml->getFile());\n\t\n\t\treturn $exportFilename;\n\t\n\t}",
"public function exportlex()\n {\n $sOrderNr = oxRegistry::getConfig()->getRequestParameter(\"ordernr\");\n $sToOrderNr = oxRegistry::getConfig()->getRequestParameter(\"toordernr\");\n $oImex = oxNew(\"oximex\");\n if (($sLexware = $oImex->exportLexwareOrders($sOrderNr, $sToOrderNr))) {\n $oUtils = oxRegistry::getUtils();\n $oUtils->setHeader(\"Pragma: public\");\n $oUtils->setHeader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n $oUtils->setHeader(\"Expires: 0\");\n $oUtils->setHeader(\"Content-type: application/x-download\");\n $oUtils->setHeader(\"Content-Length: \" . strlen($sLexware));\n $oUtils->setHeader(\"Content-Disposition: attachment; filename=intern.xml\");\n $oUtils->showMessageAndExit($sLexware);\n }\n }",
"public function xml()\n {\n // if dirty data exists\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header xml data\n header('Content-Type: text/xml');\n //过滤$CFG\n if (!empty($this->vars['CFG'])) {\n unset($this->vars['CFG']);\n }\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n // set varibales data\n $results = Utility::array2XML($this->vars);\n // send\n echo $results;\n }\n }",
"private function _toXml()\r\n {\r\n $dom = new DOMDocument();\r\n $dom->formatOutput = false;\r\n $dom->loadXML('<basket></basket>');\r\n foreach ($this->_exportFields as $name)\r\n {\r\n $value = NULL;\r\n $getter = \"get\" . ucfirst($name);\r\n if (method_exists($this, $getter))\r\n {\r\n $value = $this->$getter();\r\n }\r\n\r\n if (empty($value))\r\n {\r\n continue;\r\n }\r\n\r\n $node = $this->_createDomNode($dom, $value, $name);\r\n if ($node instanceof DOMNode)\r\n {\r\n $dom->documentElement->appendChild($node);\r\n }\r\n else if ($node instanceof DOMNodeList)\r\n {\r\n for ($i = 0, $n = $node->length; $i < $n; $i++)\r\n {\r\n $child = $node->item(0);\r\n if ($child instanceof DOMNode)\r\n {\r\n $dom->documentElement->appendChild($child);\r\n }\r\n }\r\n }\r\n }\r\n return $dom->saveXML($dom->documentElement);\r\n }",
"function export_wxr_data($xml=null) {\r\n foreach($this->get_posts_xml($xml) as $item) {\r\n $atts = $item->attributes(); //get xml element attributes\r\n $hw = $item->children($this->namespaces['hw']);\r\n $wp = $item->children($this->namespaces['wp']);\r\n $title = (string)$wp->title;\r\n //get skins\r\n $skins = $this->fetch_skins($hw->skin, 'hash_skin', 'hwskin_config',0, false);\r\n\r\n //source path\r\n $source= (string) $hw->source;\r\n #if(!file_exists($source)) $source = get_stylesheet_directory().'/' .$source;\r\n\r\n $settings = $this->recursive_option_data($hw->settings->children())->option;\r\n if(isset($skins['theme'])) $settings['theme']= $skins['theme']->get_hash_skin_code();\r\n\r\n $this->run_cli('add_slider', array(\r\n 'title' => $title,\r\n 'source' => 'upload',\r\n 'num' => '3',\r\n 'from_path' => 'theme',\r\n 'source_path' => $source,\r\n 'settings' => HW_Encryptor::encode64($settings)\r\n ));\r\n }\r\n $this->add_export_widgets();\r\n $this->do_import();\r\n }",
"function exportXML($objects, $filter, $context) {\n\t\t$xml = '';\n\t\t$filterDao = DAORegistry::getDAO('FilterDAO');\n\t\t$exportFilters = $filterDao->getObjectsByGroup($filter);\n\t\tassert(count($exportFilters) == 1); // Assert only a single serialization filter\n\t\t$exportFilter = array_shift($exportFilters);\n\t\t$exportDeployment = $this->_instantiateExportDeployment($context);\n\t\t$exportFilter->setDeployment($exportDeployment);\n\t\tlibxml_use_internal_errors(true);\n\t\t$exportXml = $exportFilter->execute($objects, true);\n\t\t$xml = $exportXml->saveXml();\n\t\t$errors = array_filter(libxml_get_errors(), create_function('$a', 'return $a->level == LIBXML_ERR_ERROR || $a->level == LIBXML_ERR_FATAL;'));\n\t\tif (!empty($errors)) {\n\t\t\t$this->displayXMLValidationErrors($errors, $xml);\n\t\t\tfatalError(__('plugins.importexport.common.error.validation'));\n\t\t}\n\t\treturn $xml;\n\t}",
"public function createExport();",
"function createXMLFile($obj, $elementContent)\r\n {\r\n global $DB, $CFG;\r\n\r\n $msmRecord = $DB->get_record(\"msm\", array(\"id\" => $obj->msmid));\r\n $msmtrimName = preg_replace(\"/\\s+/\", '', $msmRecord->name);\r\n $CompDir = $CFG->dataroot . \"/temp/msmtempfiles/$msmtrimName$msmRecord->id/standalones/\";\r\n\r\n $elementType = '';\r\n switch (get_class($obj))\r\n {\r\n case \"ExportDefinition\":\r\n $elementType = \"definition\";\r\n break;\r\n case \"ExportTheorem\":\r\n $elementType = \"theorem\";\r\n break;\r\n case \"ExportComment\":\r\n $elementType = \"comment\";\r\n break;\r\n }\r\n\r\n // standalone folder already exists\r\n if (file_exists($CompDir))\r\n {\r\n // if the directory exists, there is a possibility that the same reference\r\n // was already exported --> so check if XML file with same content exists\r\n $existingCompid = $this->checkForSameFile($CompDir, $obj);\r\n\r\n if (!empty($existingCompid))\r\n {\r\n return $existingCompid;\r\n }\r\n if (!empty($obj->caption))\r\n {\r\n $captionTrim = strip_tags($obj->caption);\r\n $captionTrim = preg_replace(\"/\\s+/\", '', $captionTrim);\r\n // need to remove any non-alphanumeric characters from caption\r\n $captionmod = preg_replace(\"/[^A-Za-z0-9]/\", '', $captionTrim);\r\n $filename = $CompDir . $captionmod . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n else if (!empty($obj->type))\r\n {\r\n $filename = $CompDir . $obj->type . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n }\r\n else\r\n {\r\n // need to make a standalone folder\r\n if (mkdir($CompDir))\r\n {\r\n if (!empty($obj->caption))\r\n {\r\n $captionTrim = strip_tags($obj->caption);\r\n $captionTrim = preg_replace(\"/\\s+/\", '', $captionTrim);\r\n $captionmod = preg_replace(\"/[^A-Za-z0-9]/\", '', $captionTrim);\r\n $filename = $CompDir . $captionmod . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n else if (!empty($obj->type))\r\n {\r\n $filename = $CompDir . $obj->type . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n }\r\n else\r\n {\r\n echo \"error with creating standalone folder\";\r\n }\r\n }\r\n\r\n if ($xmlfile = fopen($filename, \"w\"))\r\n {\r\n fwrite($xmlfile, $elementContent);\r\n fclose($xmlfile);\r\n return false;\r\n }\r\n else\r\n {\r\n echo json_encode(\"error\");\r\n }\r\n }",
"function to_xml(){\n\t\tif ($this->skip) return \"\";\n\t\t\n\t\t$str=\"<item id='\".$this->get_id().\"' >\";\n\t\tfor ($i=0; $i<sizeof($this->config->text); $i++){\n\t\t\t$extra = $this->config->text[$i][\"name\"];\n\t\t\t$str.=\"<\".$extra.\"><![CDATA[\".$this->data[$extra].\"]]></\".$extra.\">\";\n\t\t}\n\t\treturn $str.\"</item>\";\n\t}",
"function LaunchExport()\n{\n\txoops_cp_header();\n\tadminmenu(4);\n\techo \"<br />\";\n\t$story = new NewsStory();\n\t$topic= new NewsTopic();\n\t$exportedstories=array();\n\t$date1=$_POST['date1'];\n\t$date2=$_POST['date2'];\n\t$timestamp1=mktime(0,0,0,intval(substr($date1,5,2)), intval(substr($date1,8,2)), intval(substr($date1,0,4)));\n\t$timestamp2=mktime(0,0,0,intval(substr($date2,5,2)), intval(substr($date2,8,2)), intval(substr($date2,0,4)));\n\t$topiclist='';\n\tif(isset($_POST['export_topics'])) {\n\t\t$topiclist=implode(\",\",$_POST['export_topics']);\n\t}\n\t$topicsexport=intval($_POST['includetopics']);\n\t$tbltopics=array();\n\t$exportedstories=$story->NewsExport($timestamp1, $timestamp2, $topiclist, $topicsexport, $tbltopics);\n\tif(count($exportedstories))\n\t{\n\t\t$xmlfile=XOOPS_ROOT_PATH.'/uploads/stories.xml';\n\t\t$fp=fopen($xmlfile,'w');\n\t\tif(!$fp) {\n\t\t\tredirect_header('index.php',4,sprintf(_AM_NEWS_EXPORT_ERROR,$xmlfile));\n\t\t}\n\n\t\tfwrite($fp,\"<?xml version=\\\"1.0\\\" ?>\\n\");\n\t\tfwrite($fp,\"<xoops_stories>\\n\");\n\t\tif($topicsexport)\n\t\t{\n\t\t\tforeach($tbltopics as $onetopic)\n\t\t\t{\n\t\t\t\tfwrite($fp,\"<xoops_topic>\\n\");\n\t\t\t\t$topic->NewsTopic($onetopic);\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_id>%u</topic_id>\\n\",$topic->topic_id()));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_pid>%u</topic_pid>\\n\",$topic->topic_pid()));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_imgurl>%s</topic_imgurl>\\n\",$topic->topic_imgurl()));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_title>%s</topic_title>\\n\",$topic->topic_title('F')));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<menu>%d</menu>\\n\",$topic->menu()));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_frontpage>%d</topic_frontpage>\\n\",$topic->topic_frontpage()));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_rssurl>%s</topic_rssurl>\\n\",$topic->topic_rssurl('E')));\n\t\t\t\tfwrite($fp,sprintf(\"\\t<topic_description>%s</topic_description>\\n\",$topic->topic_description()));\n\t\t\t\tfwrite($fp,sprintf(\"</xoops_topic>\\n\"));\n\t\t\t}\n\t\t}\n\n\t\tforeach($exportedstories as $onestory)\n\t\t{\n\t\t\tfwrite($fp,\"<xoops_story>\\n\");\n \t\tfwrite($fp,sprintf(\"\\t<storyid>%u</storyid>\\n\",$onestory->storyid()));\n \t\tfwrite($fp,sprintf(\"\\t<uid>%u</uid>\\n\",$onestory->uid()));\n \t\tfwrite($fp,sprintf(\"\\t<uname>%s</uname>\\n\",$onestory->uname()));\n \t\tfwrite($fp,sprintf(\"\\t<title>%s</title>\\n\",$onestory->title()));\n \t\tfwrite($fp,sprintf(\"\\t<created>%u</created>\\n\",$onestory->created()));\n \t\tfwrite($fp,sprintf(\"\\t<published>%u</published>\\n\",$onestory->published()));\n \t\tfwrite($fp,sprintf(\"\\t<expired>%u</expired>\\n\",$onestory->expired()));\n \t\tfwrite($fp,sprintf(\"\\t<hostname>%s</hostname>\\n\",$onestory->hostname()));\n \t\tfwrite($fp,sprintf(\"\\t<nohtml>%d</nohtml>\\n\",$onestory->nohtml()));\n \t\tfwrite($fp,sprintf(\"\\t<nosmiley>%d</nosmiley>\\n\",$onestory->nosmiley()));\n \t\tfwrite($fp,sprintf(\"\\t<hometext>%s</hometext>\\n\",$onestory->hometext()));\n \t\tfwrite($fp,sprintf(\"\\t<bodytext>%s</bodytext>\\n\",$onestory->bodytext()));\n \t\tfwrite($fp,sprintf(\"\\t<description>%s</description>\\n\",$onestory->description()));\n \t\tfwrite($fp,sprintf(\"\\t<keywords>%s</keywords>\\n\",$onestory->keywords()));\n \t\tfwrite($fp,sprintf(\"\\t<counter>%u</counter>\\n\",$onestory->counter()));\n \t\tfwrite($fp,sprintf(\"\\t<topicid>%u</topicid>\\n\",$onestory->topicid()));\n \t\tfwrite($fp,sprintf(\"\\t<ihome>%d</ihome>\\n\",$onestory->ihome()));\n \t\tfwrite($fp,sprintf(\"\\t<notifypub>%d</notifypub>\\n\",$onestory->notifypub()));\n \t\tfwrite($fp,sprintf(\"\\t<story_type>%s</story_type>\\n\",$onestory->type()));\n \t\tfwrite($fp,sprintf(\"\\t<topicdisplay>%d</topicdisplay>\\n\",$onestory->topicdisplay()));\n \t\tfwrite($fp,sprintf(\"\\t<topicalign>%s</topicalign>\\n\",$onestory->topicalign()));\n \t\tfwrite($fp,sprintf(\"\\t<comments>%u</comments>\\n\",$onestory->comments()));\n \t\tfwrite($fp,sprintf(\"\\t<rating>%f</rating>\\n\",$onestory->rating()));\n\t \tfwrite($fp,sprintf(\"\\t<votes>%u</votes>\\n\",$onestory->votes()));\n \t\tfwrite($fp,sprintf(\"</xoops_story>\\n\"));\n\t\t}\n\t\tfwrite($fp,\"</xoops_stories>\\n\");\n\t\tfclose($fp);\n\t\t$xmlfile=XOOPS_URL.'/uploads/stories.xml';\n\t\tprintf(_AM_NEWS_EXPORT_READY,$xmlfile,XOOPS_URL.'/modules/news/admin/index.php?op=deletefile&type=xml');\n\t} else {\n\t\tprintf(_AM_NEWS_EXPORT_NOTHING);\n\t}\n}",
"function export_wxr_data($xml=null) {\r\n if(empty($xml)) $xml = $this->xml_data;\r\n //set options\r\n foreach ($this->get_options_xml($xml) as $item) {\r\n $atts = $item->attributes();\r\n $hw = $item->children('hw');\r\n\r\n $settings = $this->simplexml_parser->recursive_option_data($item->children())->option;\r\n\r\n $this->options->add_option('HW_SocialsShare_Settings', $settings);\r\n }\r\n $this->add_export_widgets(); //add available widgets if found\r\n $this->do_import();\r\n }",
"private function _print_xml()\n\t{\n\t\n\t}",
"public static function exportGiudeReport()\n {\n /**\n * TODO\n */\n }",
"public function saveXML(){\n\t\t$path = \"/var/www/html/cap_12\";\n\t\t$xml = $this->gerarXMLCAP12();\n\t\n\t\t$siglacap = $this->instituicao->siglacap;\n\t\t$anoFolder = date('Y');\n\t\t$mesFolder = date('m');\n\t\t$diaFolder = date('d');\n\t\n\t\t$writer = new Writer();\n\t\t$writer->write($path . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($anoFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($mesFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($diaFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($siglacap . DIRECTORY_SEPARATOR);\n\t\t\t\t\n\t\t$nomePasta = $writer->getString();\n\t\t$fileHelper = new FileHelper();\n\t\t$fileHelper->createDirectory($nomePasta, 755, true);\t\n\t\t\n\t\t$nomeArquivo = $nomePasta. $this->identifier.\".xml\";\n\t\ttry {\n\t\t\t$this->salvarArquivo($nomeArquivo, $xml);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\tthrow new \\Exception(\"Erro ao tentar salvar o arquivo xml do cap\");\n\t\t}\n\t\treturn str_replace(\"/var/www/html/\", \"\", $nomeArquivo);\t\n\t}",
"function build_config($file = \"\", $filter = \"\", $email = \"\", $html = 1, $csv = 1) {\n\tglobal $config;\n\n\tif (empty($file)) {\n\t\t$file = \"example.xml\";\n\t}\n\n\t/* get start date of the month */\n\t$start_date = date(\"Y/m/d\", mktime(0,0,0, date(\"n\", time()), 1, date(\"Y\", time())));\n\n\t/* define email if needed */\n\tif (empty($email)) {\n\t\t$email = \"root@localhost\";\n\t}\n\n\t/* define XML encoding */\n\t$XMLEncoding = \"UTF-8\";\n\tif ($config[\"cacti_server_os\"] == \"WIN\") {\n\t\t$XMLEncoding = \"ISO-8859-1\";\n\t}\n\n\t/* open file */\n\tif (!$xml_FH = fopen($file, \"w\")) {\n\t\tprint \"ERROR: Unable to open file for writing: $file\\n\";\n\t\texit;\n\t}\n\n\t$where = \"\";\n\tif (! empty($filter)) {\n\t\t$where = \" i.local_graph_id in(\" . $filter . \") AND \";\n\t}\n\n\t/* Query database for items of interest */\n\t$graph_items = db_fetch_assoc(\"SELECT \n\t\t\ti.id AS item_id, \n\t\t\ti.local_graph_id, \n\t\t\ti.task_item_id, \n\t\t\ti.text_format, \n\t\t\tg.id AS graph_id, \n\t\t\tg.title_cache\n\t\tFROM \n\t\t\tgraph_templates_item AS i, \n\t\t\tgraph_templates_graph AS g\n\t\tWHERE \n\t\t\ti.local_graph_id = g.local_graph_id AND \n\t\t\ti.local_graph_id <> 0 AND \n\t\t\ti.graph_type_id = 1 AND \" . $where . \" \n\t\t\ttext_format LIKE '%|%:%:%|%'\n\t\tORDER BY\n\t\t\ti.local_graph_id;\");\n\n\t/* write header information */\n\tfwrite($xml_FH, \"<?xml version=\\\"1.0\\\" encoding=\\\"\" . $XMLEncoding . \"\\\" standalone=\\\"yes\\\"?\");\n\tfwrite($xml_FH, \">\\n\");\n\tfwrite($xml_FH, \"<cacti_biller>\\n\");\n\tfwrite($xml_FH, \" <global>\\n\");\n\tfwrite($xml_FH, \" <!-- Global Threshold tracking for reporting and notification of date/time of overage occurance -->\\n\");\n\tfwrite($xml_FH, \" <threshold>\\n\");\n\tfwrite($xml_FH, \" <enabled>no</enabled>\\n\");\n\tfwrite($xml_FH, \" <notification>no</notification>\\n\");\n\tfwrite($xml_FH, \" </threshold>\\n\");\n\tfwrite($xml_FH, \" <!-- Defaults are used when the same elements are not defined for a customer -->\\n\");\n\tfwrite($xml_FH, \" <defaults>\\n\");\n\tfwrite($xml_FH, \" <email html=\\\"\");\n\tif ($html == 1) {\n\t\tfwrite($xml_FH, \"yes\");\n\t}else{\n\t\tfwrite($xml_FH, \"no\");\n\t}\t\n\tfwrite($xml_FH, \"\\\" csv=\\\"\");\n\tif ($csv == 1) {\n\t\tfwrite($xml_FH, \"yes\");\n\t}else{\n\t\tfwrite($xml_FH, \"no\");\n\t}\t\n\tfwrite($xml_FH, \"\\\">\" . $email . \"</email>\\n\");\n\tfwrite($xml_FH, \" <rate unit=\\\"Mb\\\">0.00</rate><!-- Rate per Kb, Mb or Gb used for calculating billing amounts -->\\n\");\n\tfwrite($xml_FH, \" <billing_timeframe>\\n\");\n\tfwrite($xml_FH, \" <type>monthly</type><!-- Values: bi-monthly,monthly,weekly,daily -->\\n\");\n\tfwrite($xml_FH, \" <day>last</day><!-- Values: integer, dependant on type selected, last keyword selects last day of week(Saturday), month or year -->\\n\");\n\tfwrite($xml_FH, \" <every>1</every><!-- Values: integer, dependant on type selected, example: type=monthly, day=last, every=1\\n means billing will be processed every month on the last day. If every=2, then it would\\n be every 2 months on the last day. -->\\n\");\n\tfwrite($xml_FH, \" <start_date>\" . $start_date . \"</start_date><!-- Date to start billing on, format: YYYY-MM-DD -->\\n\");\n\tfwrite($xml_FH, \" </billing_timeframe>\\n\");\n\tfwrite($xml_FH, \" </defaults>\\n\");\n\tfwrite($xml_FH, \" </global>\\n\\n\");\n\n\t/* create customers */\n\tfwrite($xml_FH, \" <!-- This is the customer section. All graphs are considered seperate customers, if you care to \\n add multiple graphs to a single customer follow the examples-->\\n\");\n\tfwrite($xml_FH, \" <customers>\\n\");\n\tfwrite($xml_FH, \"<!-- Example customer syntax -->\\n\");\n\tfwrite($xml_FH, \"<!-- <customer> -->\\n\");\n\tfwrite($xml_FH, \"<!-- <description>Customer Description</description>--><!-- Customer Description, this will show on billing reports -->\\n\");\n\tfwrite($xml_FH, \"<!-- <rate unit=\\\"Mb\\\">0.01</rate>--><!-- Rate per Kb, Mb or Gb used for calculating billing amounts per customer -->\\n\");\n\tfwrite($xml_FH, \"<!-- <graphs> -->\\n\");\n\tfwrite($xml_FH, \"<!-- <graph> --><!-- Example of single graph item selection from a graph-->\\n\");\n\tfwrite($xml_FH, \"<!-- <id>1</id>--><!-- Graph Title: \\\"Customer Graph 1\\\" -->\\n\");\n\tfwrite($xml_FH, \"<!-- <rate unit=\\\"Mb\\\" type=\\\"committed\\\">0.01</rate>--><!-- Rate per Kb, Mb or Gb used for calculating billing amounts per customer\\n at committed rate -->\\n\");\n\tfwrite($xml_FH, \"<!-- <rate unit=\\\"Mb\\\" type=\\\"overage\\\" threshold=\\\"23947239\\\">0.02</rate>--><!-- Rate per Kb, Mb or Gb used for\\n calculating billing amounts per customer at overage rate, threshold parameter\\n determines what is considered overage. When overage is detected, overage rate is\\n calculated for amount above overage threshold-->\\n\");\n\tfwrite($xml_FH, \"<!-- <graph_item_id>3</graph_item_id>--><!-- Comment: \\\"95th Percentile: |95:bits:6:max:2| mbits\\\" -->\\n\");\n\tfwrite($xml_FH, \"<!-- </graph> -->\\n\");\n\tfwrite($xml_FH, \"<!-- <graph> --><!-- Example of all graph item selection from a graph-->\\n\");\n\tfwrite($xml_FH, \"<!-- <id>2</id>--><!-- Graph Title: \\\"Customer Graph 2\\\" -->\\n\");\n\tfwrite($xml_FH, \"<!-- </graph> -->\\n\");\n\tfwrite($xml_FH, \"<!-- </graphs> -->\\n\");\n\tfwrite($xml_FH, \"<!-- <email>root@localhost</email>-->\\n\");\n\tfwrite($xml_FH, \"<!-- <billing_timeframe>-->\\n\");\n\tfwrite($xml_FH, \"<!-- <type>monthly</type>--><!-- Values: bi-monthly,monthly,weekly,daily -->\\n\");\n\tfwrite($xml_FH, \"<!-- <day>last</day>--><!-- Values: integer, dependant on type selected, last keyword selects last day of week, month or year -->\\n\");\n\tfwrite($xml_FH, \"<!-- <every>1</every>--><!-- Values: integer, dependant on type selected, example: type=monthly, day=last, every=1\\n means billing will be processed every month on the last day. If every=2, then it would\\n be every 2 months on the last day. -->\\n\");\n\tfwrite($xml_FH, \"<!-- <start_date>2006-07-01</start_date>--><!-- Date to start billing on, format: YYYY-MM-DD -->\\n\");\n\tfwrite($xml_FH, \"<!-- </billing_timeframe>-->\\n\");\n\tfwrite($xml_FH, \"<!-- </customer>-->\\n\\n\");\n\n\n\t$local_graph_id_prev = 0;\n\t$item_type = \"N/A\";\n\t$match = array();\n\tif (sizeof($graph_items) > 0) {\n\n\t\tfwrite($xml_FH, \" <customer>\\n\");\n\t\tforeach ($graph_items as $graph_item) {\n\t\t\t\n\n\t\t\t$item_type = \"N/A\";\n\t\t\t$match = array();\n\t\t\tif (preg_match('/\\|sum\\:.*\\|/',$graph_item[\"text_format\"]) > 0) { \n\t\t\t\t$item_type = \"Bandwidth Summation\";\n\t\t\t} elseif (preg_match('/\\|([0-9]{1,2})\\:[\\:0-9a-z]+\\|/',$graph_item[\"text_format\"], $match) > 0) { \n\t\t\t\t$item_type = get_pretty_nth_value($match[1]);\n\t\t\t}\n\n\t\t\tif ($graph_item[\"local_graph_id\"] <> $local_graph_id_prev) {\t\n\t\t\t\tif ($local_graph_id_prev <> 0) {\n\t\t\t\t\tfwrite($xml_FH, \" </graph>\\n </graphs>\\n </customer>\\n\\n <customer>\\n\");\n\t\t\t\t}\n\t\t\t\tfwrite($xml_FH, \" <description>\" . xml_character_encode($graph_item[\"title_cache\"] . \" - \" . $graph_item[\"local_graph_id\"]) . \"</description><!-- Customer Description, this will show on billing reports -->\\n\");\n\t\t\t\tfwrite($xml_FH, \" <graphs>\\n\");\n\t\t\t\tfwrite($xml_FH, \" <graph>\\n\");\n\t\t\t\tfwrite($xml_FH, \" <id>\" . $graph_item[\"local_graph_id\"] . \"</id><!-- Graph Title: \\\"\" . $graph_item[\"title_cache\"] . \"\\\" -->\\n\");\n\n\t\t\t}\n\t\t\tfwrite($xml_FH, \" <graph_item_id>\" . $graph_item[\"item_id\"] . \"</graph_item_id><!-- Comment: \\\"\" . $graph_item[\"text_format\"] . \"\\\"-->\\n\"); \n\t\t\t$local_graph_id_prev = $graph_item[\"local_graph_id\"];\n\t\t}\n\t\tfwrite($xml_FH, \" </graph>\\n </graphs>\\n </customer>\\n\");\n\t}else{\n\t\tprint \"No billable graphs found\\n\";\n\t}\n\n\tfwrite($xml_FH, \" </customers>\\n\\n\");\n\n\t/* write footer information */\n\tfwrite($xml_FH, \"</cacti_biller>\\n\");\n\n\t/* close file */\n\tfclose($xml_FH);\n\n\tprint \"\\nConfiguration file written to: $file\\n\\n\";\n\n}",
"function export(& $site) {\n\t\t$this->_document =& new DOMIT_Document();\n\t\t$this->_document->xmlDeclaration = '<?xml version=\"1.0\" encoding=\"UTF-8\" '.'?'.'>';\n\t\t$doctype = \"<!DOCTYPE site [\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT site (title,history,(activation?),(permissions?),header,footer,(theme?),(media?),(section|navlink)*)>\";\n\t\t$doctype .= \"\\n\\t<!ATTLIST site id CDATA #REQUIRED owner CDATA #REQUIRED type (system|class|personal|other) #REQUIRED>\";\t\t\n \t\t$doctype .= \"\\n\\t<!ELEMENT section (title,history,(activation?),(permissions?),(page|navlink|heading|divider)*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT page (title,history,(activation?),(permissions?),(story|link|image|file)*)>\";\n\t\t$doctype .= \"\\n\\t<!ATTLIST page story_order (custom|addeddesc|addedasc|editeddesc|editedasc|author|editor|category|titleasc|titledesc) #REQUIRED horizontal_rule (TRUE|FALSE) #REQUIRED show_creator (TRUE|FALSE) #REQUIRED show_date (TRUE|FALSE) #REQUIRED archiving CDATA #REQUIRED>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT story (title,history,(activation?),(permissions?),shorttext,(longtext?),(category?),(discussion?))>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT navlink (title,history,(activation?),(permissions?),url)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT heading (title,history,(activation?),(permissions?))>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT divider (history,(activation?),(permissions?))>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT link (title,history,(activation?),(permissions?),description,url,(category?),(discussion?))>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT image (title,history,(activation?),(permissions?),description,(filename|url),(category?),(discussion?))>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT file (title,history,(activation?),(permissions?),description,(filename|url),(category?),(discussion?))>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT discussion (discussion_node*)>\";\n\t\t$doctype .= \"\\n\\t<!ATTLIST discussion email_owner (TRUE|FALSE) #REQUIRED show_authors (TRUE|FALSE) #REQUIRED show_others_posts (TRUE|FALSE) #REQUIRED>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT discussion_node (creator,created_time,title,text,rating?,filename?,(discussion_node*))>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT media (media_file*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT media_file (creator,last_editor,last_edited_time,filename,type)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT type (#PCDATA)>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT theme (name,color_scheme?,background_color?,border_style?,border_color?,text_color?,link_color?,navigation_arrangement?,navigation_width?,section_nav_size?,page_nav_size?)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT name (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT color_scheme (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT background_color (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT border_style (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT border_color (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT text_color (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT link_color (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT navigation_arrangement (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT navigation_width (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT section_nav_size (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT page_nav_size (#PCDATA)>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT history (creator,created_time,last_editor,last_edited_time)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT created_time (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT last_edited_time (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT creator (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT last_editor (#PCDATA)>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT activation ((manual_activiation)?,(activate_date)?,(deactivate_date)?)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT manual_activiation (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT activate_date (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT deactivate_date (#PCDATA)>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT permissions ((locked?),(view_permission?),(add_permission?),(edit_permission?),(delete_permission?),(discuss_permission?))>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT locked EMPTY>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT view_permission (agent*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT add_permission (agent*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT edit_permission (agent*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT delete_permission (agent*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT discuss_permission (agent*)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT agent (#PCDATA)>\";\n\t\t\n\t\t$doctype .= \"\\n\\t<!ELEMENT category (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT title (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT text (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT shorttext (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ATTLIST shorttext text_type (text|html) #REQUIRED>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT longtext (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT filename (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT rating (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT url (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT description (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT header (#PCDATA)>\";\n\t\t$doctype .= \"\\n\\t<!ELEMENT footer (#PCDATA)>\";\n\t\t\n\t\t$doctype .= \"\\n]>\";\n\t\t\n\t\t$this->_document->doctype = $doctype;\n\t\t$this->addSite($site);\n\t\treturn $this->_document->toNormalizedString();\n//\t\treturn $this->_document->toString();\n\t}",
"public function savetofile()\n\t\t{\n\t\t\treturn $this->xml->asXML($this->file);\n\t\t}",
"public function writeXML($file)\r\n \t{\r\n \t\t$doc = new DOMDocument();\r\n \t\t$doc->formatOutput = true;\r\n \r\n \t\t$tests = $doc->createElement(\"tests\");\r\n \t\t$doc->appendChild($tests);\r\n \r\n \t \t//get the array of results\r\n \t\t$resultsArray = $this->suite->getTestCases();\r\n \t\tforeach($resultsArray as $testCase)\r\n \t\t{\r\n\t \t\t//create the test element \r\n\t \t\t$test = $doc->createElement(\"test\");\r\n \t\r\n\t \t\t//attach test's elements\r\n\t \t\t$result = $testCase->getResult(); \r\n\t \t\t$resultElement = $doc ->createElement(\"result\");\r\n\t \t\t$resultElement ->appendChild($doc->createTextNode($result));\r\n \t\t\r\n \t\t\t$category = $testCase->getCategory(); \r\n \t\t\t$categoryElement = $doc ->createElement(\"category\");\r\n \t\t\t$categoryElement ->appendChild($doc->createTextNode($category));\r\n \t\r\n \t\t\t$name = $testCase->getName(); \r\n \t\t\t$nameElement = $doc ->createElement(\"name\");\r\n \t\t\t$nameElement ->appendChild($doc->createTextNode($name));\r\n \t\r\n \t\t\t$description = $testCase->getDescription(); \r\n \t\t\t$descriptionElement = $doc ->createElement(\"description\");\r\n \t\t\t$descriptionElement ->appendChild($doc->createTextNode($description));\r\n \t\r\n \t\t\t//attach elements to their parent's\r\n \t\t\t$test ->appendChild($resultElement);\r\n \t\t\t$test ->appendChild($categoryElement);\r\n \t\t\t$test ->appendChild($nameElement);\r\n \t\t\t$test ->appendChild($descriptionElement);\r\n \t\t\t$tests ->appendChild($test); \r\n \t\t\t$doc ->appendChild($tests);\r\n \t\t}\r\n \r\n\t\t //writes the string to disk\r\n \t\t$xmlString = $doc->saveXML();\r\n \t\t$openFile = fopen($file, 'w');\r\n \t\tif(!$openFile) \r\n \t\t\tthrow new Exception(\"Could not open XML file\");\r\n \r\n \t\telse\r\n \t\t{\r\n \t\t\tfputs($openFile, $xmlString);\r\n \t \t fclose($openFile);\r\n\t \t}\r\n\t }",
"function create_temp_xml($file_path, $protection_options){\n $path_info = pathinfo($file_path);\n $dir_name = realpath($path_info[\"dirname\"]);\n\n $xml = new SimpleXMLElement(\"<project></project>\");\n\n $xml->addAttribute(\"outputDir\", $dir_name . \"\\obfuscated\");\n $xml->addAttribute(\"baseDir\", $dir_name);\n $xml->addAttribute(\"xmlns\", \"http://confuser.codeplex.com\"); // <- i dont think thats needed\n\n $rules = $xml->addChild(\"rule\");\n $rules->addAttribute(\"pattern\", \"true\");\n $rules->addAttribute(\"inherit\", \"false\");\n\n foreach ($protection_options as &$opt) {\n $protections = $rules->addChild(\"protection\");\n $protections->addAttribute(\"id\", $opt);\n }\n\n $mdl = $xml->addChild(\"module\");\n $mdl->addAttribute(\"path\", $path_info[\"basename\"]);\n\n $xml_output_path = \"projects/\" . uniqid() . \".crproj\";\n\n $output = fopen($xml_output_path, \"w\");\n fwrite($output, explode(\"\\n\", $xml->asXML(), 2)[1]);\n fclose($output);\n\n return realpath($xml_output_path);\n}",
"protected function renderAsXML() {}",
"function saveToXML( $filename, $xml = null ){\n\t\tif( ! $xml ){\n\t\t\t$xml = $this->xml;\n\t\t}\n\t\t$xml->asXML( $filename );\n\t}",
"private function open_xml()\n {\n $xmlw = new XMLWriter();\n $xmlw->openMemory();\n\n if (isset($this->request['fs_curl_debug']) && $this->request['fs_curl_debug'] > 0) {\n $indent = true;\n } else {\n $indent = false;\n }\n $xmlw->setIndent($indent);\n $xmlw->setIndentString(' ');\n\n $xmlw->startDocument('1.0', 'UTF-8', 'no');\n $xmlw->startElement('document');\n $xmlw->writeAttribute('type', 'freeswitch/xml');\n\n return $xmlw;\n }",
"function createXML($outputArray,$ext=FALSE)\t{\n\n\t\t\t// Options:\n\t\t$options = array(\n\t\t\t'parentTagMap' => array(\n\t\t\t\t'data' => 'languageKey',\n\t\t\t\t'orig_hash' => 'languageKey',\n\t\t\t\t'orig_text' => 'languageKey',\n\t\t\t\t'labelContext' => 'label',\n\t\t\t\t'languageKey' => 'label'\n\t\t\t)\n\t\t);\n\n\t\t\t// Creating XML file from $outputArray:\n\t\t$XML = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>'.chr(10);\n\t\t$XML.= t3lib_div::array2xml($outputArray,'',0,$ext ? 'T3locallangExt' : 'T3locallang',0,$options);\n\n\t\treturn $XML;\n\t}",
"public function toXML()\n {\n // TODO: Implement toXML() method.\n }",
"function mysql2xml() {\r\n\t $this->xml = new XMLFile();\r\n \r\n }",
"public function build_xml_map() {\n $this->_create_map();\n header(\"content-type: text/xml\");\n echo $this->result;\n }",
"public function export($file);",
"function export()\n\t{\n\t\t$zip = $this->buildExportFile();\n\t\t\n\t ilUtil::deliverFile($zip, $this->object->getTitle().\".zip\", '', false, true);\n\t}",
"function xml_export ($data) {\r\n\t\t$xml = XML_serialize($data);\r\n\t\tif ($xml === NULL) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t return $xml;\r\n\t\t}\r\n\t}",
"function admin_generate(){\n\t\t$fp = fopen('files/sitemap.xml', 'w+');\n\n\t$start_string = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/</loc>\n \t\t<changefreq>daily</changefreq>\n \t\t<priority>1</priority>\n\t</url>';\n\n\t\tfwrite($fp, $start_string);\n\n\t\t// projdu vsechny produkty\n\t\tApp::import('Model', 'Product');\n\t\t$this->Sitemap->Product = new Product;\n\t\t\n\t\t$this->Sitemap->Product->recursive = -1;\n\t\t$products = $this->Sitemap->Product->find('all', array('fields' => array('Product.url', 'Product.modified')));\n\n\t\tforeach ( $products as $product ){\n\t\t\t// pripnout k sitemape\n\t\t\t$mod = explode(' ', $product['Product']['modified']);\n\t\t\t$mod = $mod[0];\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . $product['Product']['url'] . '</loc>\n \t\t<lastmod>' . $mod . '</lastmod>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.9</priority>\n\t</url>'; \n\n\t\t\tfwrite($fp, $string);\n\t\t}\n\t\t\n\t\t// projdu vsechny kategorie\n\t\tApp::import('Model', 'Category');\n\t\t$this->Sitemap->Category = new Category;\n\t\t\n\t\t$this->Sitemap->Category->recursive = -1;\n\t\t$categories = $this->Sitemap->Category->find('all', array('fields' => array('Category.id', 'Category.url')));\n\n\t\t$skip = array(0 => '5', '25', '26', '53');\n\t\tforeach ( $categories as $category ){\n\t\t\tif ( in_array($category['Category']['id'], $skip) ){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$mod = date('Y-m-d');\n\n\t\t\t// pripnout k sitemape\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . $category['Category']['url'] . '</loc>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.8</priority>\n\t</url>'; \n\n\t\t\tfwrite($fp, $string);\n\t\t\t\n\t\t}\n\t\t\n\t\t// projdu vsechny vyrobce\n\t\tApp::import('Model', 'Manufacturer');\n\t\t$this->Sitemap->Manufacturer = new Manufacturer;\n\t\t\n\t\t$this->Sitemap->Manufacturer->recursive = -1;\n\t\t$manufacturers = $this->Sitemap->Manufacturer->find('all', array('fields' => array('Manufacturer.id', 'Manufacturer.name')));\n\t\t\n\t\tforeach ( $manufacturers as $manufacturer ){\n\t\t\t// pripnout k sitemape\n\t\t\t// vytvorim si url z name a id\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . strip_diacritic($manufacturer['Manufacturer']['name']) . '-v' . $manufacturer['Manufacturer']['id'] . '</loc>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.8</priority>\n\t</url>';\n\t\t\tfwrite($fp, $string);\n\t\t}\n\t\t\n\t\t// projdu vsechny obsahove stranky\n\t\tApp::import('Model', 'Content');\n\t\t$this->Sitemap->Content = new Content;\n\t\t\n\t\t$this->Sitemap->Content->recursive = -1;\n\t\t$contents = $this->Sitemap->Content->find('all', array('fields' => array('Content.path')));\n\t\t\n\t\tforeach ( $contents as $content ){\n\t\t\t// pripnout k sitemape\n\t\t\tif ( $content['Content']['path'] == 'index' ){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$string = '\n\t<url>\n \t\t<loc>http://www.' . CUST_ROOT . '/' . $content['Content']['path'] . '</loc>\n \t\t<changefreq>weekly</changefreq>\n \t\t<priority>0.7</priority>\n\t</url>';\n\t\t\tfwrite($fp, $string);\n\t\t}\n\t\t\n\t\t$end_string = '\n</urlset>';\n\t\tfwrite($fp, $end_string);\n\t\tfclose($fp);\n\t\t// uzavrit soubor\n\t\tdie('here');\n\t}",
"public function generateXML()\n {\n $xml = new xmlWriter();\n $xml->openMemory();\n $xml->setIndent(true);\n\n $xml->startDocument('1.0', $this->charset);\n\n $xml->startElement('rdf:RDF');\n $xml->writeAttribute('xmlns:rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');\n $xml->writeAttribute('xmlns', 'http://purl.org/rss/1.0/');\n\n $xml->startElement('channel');\n $xml->writeAttribute('rdf:about', $this->resource);\n\n $xml->writeElement('title', $this->title);\n $xml->writeElement('link', $this->link);\n $xml->writeElement('description', $this->description);\n\n if (!is_null($this->image)) {\n $xml->startElement('image');\n $xml->writeAttribute('rdf:resource', $this->image->url);\n $xml->endElement();\n }\n\n if (!is_null($this->textinput)) {\n $xml->startElement('textinput');\n $xml->writeAttribute('rdf:resource', $this->textinput->uri);\n $xml->endElement();\n }\n\n if (empty($this->items))\n throw new CException(Yii::t('EWebFeed', 'At least one item must exist'));\n $xml->startElement('items');\n $xml->startElement('rdf:Seq');\n foreach ($this->items as $item) {\n $xml->startElement('rdf:li');\n $xml->writeAttribute('resource', $item->uri);\n $xml->endElement();\n }\n $xml->endElement();\n $xml->endElement();\n\n $xml->endElement();\n\n if (!is_null($this->image)) {\n $xml->startElement('image');\n $xml->writeAttribute('rdf:about', $this->image->url);\n $xml->writeElement('title', $this->image->title);\n $xml->writeElement('link', $this->image->link);\n $xml->writeElement('url', $this->image->url);\n $xml->endElement();\n }\n\n if (!is_null($this->textinput)) {\n $xml->startElement('textinput');\n $xml->writeAttribute('rdf:about', $this->textinput->uri);\n $xml->writeElement('title', $this->textinput->title);\n $xml->writeElement('description', $this->textinput->description);\n $xml->writeElement('name', $this->textinput->name);\n $xml->writeElement('link', $this->textinput->link);\n $xml->endElement();\n }\n\n foreach ($this->items as $item) {\n $xml->startElement('item');\n $xml->writeAttribute('rdf:about', $item->uri);\n $xml->writeElement('title', $item->title);\n $xml->writeElement('link', $item->link);\n if ($item->description !== '') $xml->writeElement('description', $item->description);\n $xml->endElement();\n }\n \n $xml->endElement();\n $xml->endDocument();\n\n return $xml->flush();\n }",
"public function exportXmlAction()\r\n {\r\n $fileName = 'customer_store_credit_balances.xml';\r\n $content = $this->getLayout()->createBlock('wf_customerbalance/adminhtml_balances_grid')\r\n ->getExcelFile();\r\n\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }",
"public function output(){\n header('Content-type: text/xml');\n echo $this->getDocument();\n }",
"public static function create_xrd() {\n $xrd = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n $xrd .= '<XRD xmlns=\"http://docs.oasis-open.org/ns/xri/xrd-1.0\">'.\"\\n\";\n $xrd .= ' <Subject>'.site_url(\"/\").'</Subject>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/vendor\">'.get_bloginfo('name').'</Property>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/title\">'.get_bloginfo('description').'</Property>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/name\">\"Press This\" bookmarklet</Property>'.\"\\n\";\n $xrd .= ' <Property type=\"http://www.oexchange.org/spec/0.8/prop/prompt\">Press This</Property>'.\"\\n\";\n $xrd .= ' <Link rel= \"icon\" href=\"'.OExchangePlugin::get_icon_url(16).'\" />'.\"\\n\";\n $xrd .= ' <Link rel= \"icon32\" href=\"'.OExchangePlugin::get_icon_url(32).'\" />'.\"\\n\";\n $xrd .= ' <Link rel= \"http://www.oexchange.org/spec/0.8/rel/offer\" href=\"'.admin_url('press-this.php').'\" type=\"text/html\"/>'.\"\\n\";\n $xrd .= '</XRD>';\n\n return $xrd;\n }",
"public function export();",
"public function export();",
"public function export();",
"public function export();",
"public function export();",
"function export_wxr_data($xml=null) {\r\n if(empty($xml)) $xml = $this->xml_data;\r\n //add posts\r\n foreach($this->get_posts_xml($xml) as $item) {\r\n $atts = $item->attributes(); //get xml element attributes\r\n $hw = $item->children($this->namespaces['hw']);\r\n $wp = $item->children($this->namespaces['wp']);\r\n\r\n $post_type = (string) $wp->post_type;\r\n $title = (string) $wp->title;\r\n\r\n //post/page..\r\n if((string)$atts->type != 'gallery' || $post_type !='hw-gallery') {\r\n /*if(isset($hw->content) && ($hw->content->xpath('hw:params'))) {\r\n //$content = $this->get_result_content($hw->content[0]->params->children()); //is deprecated\r\n //$content = $this->get_import_result($hw->content[0]->params->children());\r\n //$content = $this->recursive_option_data($hw->content->xpath('hw:params'));\r\n $content = $hw->content->xpath('hw:params');\r\n foreach($hw->content->xpath('hw:params') as $content){break;};\r\n\r\n }\r\n else $content = (string) $hw->content;\r\n */\r\n $content = $this->get_hw_params_element($hw->content,'hw:params', true);\r\n $this->posts->addItem(array(\r\n 'title' => $title,\r\n 'description' => '',\r\n 'content' => $content,\r\n 'post_type' => (string)$wp->post_type\r\n ));\r\n continue;\r\n }\r\n //skin data\r\n $skin = $hw->skin->children($this->namespaces['skin']);\r\n $skin_name = ($hw->skin->attributes()->name? (string)$hw->skin->attributes()->name : 'skin');\r\n $skin_instance = (string) $skin->instance;\r\n\r\n //skin\r\n $pskin = new HWIE_Skin_Params($skin_name, $skin_instance);\r\n $pskin->add_hash_skin('hash_skin', array(\r\n 'skin' => (string)$skin->skin_name,\r\n 'source' => (string)$skin->source\r\n ));\r\n //other skin params\r\n $params = array(\r\n 'hwskin_condition' => '',\r\n 'skin_options' => array(\r\n 'enqueue_css_position' => 'footer',\r\n 'enqueue_js_position' => 'footer'\r\n )\r\n );\r\n $pskin->add_skin_config();\r\n if(!empty($skin->params)) {\r\n $skin_options = $this->simplexml_parser->recursive_option_data($skin->params[0]->children() )->option;\r\n if(!empty($skin_options)) $params = array_merge($params, $skin_options);\r\n }\r\n $pskin->extra_params($params);\r\n //gallery data\r\n $galleries = array();\r\n if(!empty($hw->data) && !empty($hw->data->item)) {\r\n foreach($hw->data->item as $item) {\r\n //$this->simplexml_parser->recursive_option_data($item->children())->option;\r\n $gallery = HW_XML::xml2array($item->children());\r\n if(!isset($gallery['src'])) continue;\r\n\r\n $gallery['status'] = !isset($gallery['status']) || $gallery['status']? 'active' : '';\r\n if(!isset($gallery['link'])) $gallery['link'] = $gallery['src'];\r\n if(!isset($gallery['alt'])) $gallery['alt'] = '';\r\n if(!isset($gallery['thumb'])) $gallery['thumb'] = '';\r\n\r\n $galleries[] = $gallery;\r\n }\r\n\r\n }\r\n\r\n $post_name = $this->posts->addItem(array(\r\n 'title' => $title,\r\n 'description' => '',\r\n 'content'=> '',\r\n 'excerpt' => '',\r\n 'post_type' => 'hw-gallery',\r\n 'post_metas'=> array(\r\n '_eg_gallery_data' => array(\r\n 'title' => $title,\r\n 'config' => array(\r\n 'columns' => '1',\r\n 'gutter' => '10',\r\n 'margin' => '10',\r\n 'crop' => '0',\r\n 'crop_width' => '960',\r\n 'crop_height' => '300',\r\n 'lightbox_enabled' => '1',\r\n 'title_display' => 'float',\r\n 'classes' => array(),\r\n 'title' => $title,\r\n 'slug' => '',\r\n 'rtl' => '0',\r\n 'hw_skin' => $pskin->get_skin(0)\r\n ),\r\n 'gallery' => $galleries\r\n ),\r\n '_eg_in_gallery' => array(),\r\n '_edit_last' => '1'\r\n ),\r\n\r\n ), HW_XML::attributesArray($item) );\r\n }\r\n $this->add_export_widgets(); //import widgets if exists\r\n $this->do_import(); //start import data\r\n $posts = $this->importer->get_import_results('posts');\r\n\r\n /*if(!empty($post_name) && isset($posts[$post_name])) { //don't need\r\n $gallery_id = $posts[$post_name]['ID'];\r\n //create page to display gallery\r\n wp_insert_post(array(\r\n 'post_type' => 'page',\r\n 'import_id' => 0,\r\n 'post_title' => 'Gallery',\r\n 'post_content' => '[hw-gallery id=\"'.$gallery_id.'\"]',\r\n 'post_status' => 'publish',\r\n ));\r\n }*/\r\n\r\n }",
"function toXML() {\r\n\t\tglobal $persons;\r\n\t\tglobal $expenses;\r\n\t\tglobal $action;\r\n\r\n\t\t$xmlString = \"<?xml version='1.0' ?>\\n<mshare version=\\\"\".VERSION.\"\\\"\";\r\n\t\t\r\n\t\tif ($action == \"CLOSE\") $xmlString .= \" state=\\\"CLOSED\\\"\";\r\n\r\n\t\t$xmlString .= \">\\n\";\r\n\r\n\t\tif (count($persons) > 0) {\r\n\t\t\t$xmlString .= \"\\t<persons>\\n\";\r\n\r\n\t\t\tfor ($i = 0; $i < count($persons); $i++) {\r\n\t\t\t\t$xmlString .= \"\\t\\t<person name=\\\"\".$persons[$i]->name.\"\\\" ID=\\\"\".$persons[$i]->ID.\"\\\"/>\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$xmlString .= \"\\t</persons>\\n\";\r\n\t\t}\r\n\r\n\t\tif (count($expenses) > 0) {\r\n\t\t\t$xmlString .= \"\\t<expenses>\\n\";\r\n\r\n\t\t\tfor ($i = 0; $i < count($expenses); $i++) {\r\n\t\t\t\t$xmlString .= \"\\t\\t<expense ID=\\\"\".$expenses[$i]->ID.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"spenderID=\\\"\".$expenses[$i]->spenderID.\"\\\" \";\r\n\r\n\t\t\t\t$xmlString .= \"accountableIDs=\\\"\";\r\n\t\t\t\tfor ($j = 0; $j < count($expenses[$i]->accountableIDs); $j++) {\r\n\t\t\t\t\t$xmlString .= $expenses[$i]->accountableIDs[$j];\r\n\r\n\t\t\t\t\tif ($j != count($expenses[$i]->accountableIDs)-1) {\r\n\t\t\t\t\t\t$xmlString .= \":\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$xmlString .= \"\\\" \";\r\n\r\n\t\t\t\t$xmlString .= \"expenseDate=\\\"\".$expenses[$i]->expenseDate.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"amount=\\\"\".$expenses[$i]->amount.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"description=\\\"\".$expenses[$i]->description.\"\\\"\"; \r\n\r\n\t\t\t\tif ($expenses[$i]->deleted) {\r\n\t\t\t\t\t$xmlString .= \" state=\\\"DELETED\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$xmlString .= \"/>\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$xmlString .= \"\\t</expenses>\\n\";\r\n\t\t}\r\n\r\n\t\t$xmlString .= \"</mshare>\\n\";\r\n\r\n\t\treturn $xmlString;\r\n\t}",
"private function exportAll()\n {\n $files = Mage::getModel('factfinder/export_type_product')->saveAll();\n echo \"Successfully generated the following files:\\n\";\n foreach ($files as $file) {\n echo $file . \"\\n\";\n }\n }",
"public function build()\n {\n return $this->generateXml();\n }",
"public function actionGenerateAndDownloadDatasetCreationFile() {\n $fileColumns[] = DatasetController::AGRONOMICAL_OBJECT_URI;\n $fileColumns[] = DatasetController::DATE;\n $variables = Yii::$app->request->post('variables');\n foreach ($variables as $variableAlias) {\n $fileColumns[] = $variableAlias;\n }\n\n $file = fopen('./documents/DatasetFiles/datasetTemplate.csv', 'w');\n fputcsv($file, $fileColumns, $delimiter = \";\"); \n fclose($file);\n }",
"private function create_xml_file()\n {\n $this->add_to_log(__FUNCTION__, 'Attempting to create xml file for each state of the MMS order');\n $this->add_to_log(__FUNCTION__, implode(',', $this->_mms_order['Accepted']));\n \n if (($this->_mms_order['Accepted'] || $this->_mms_order['Delivered'] || $this->_mms_order['Disbanded']) && $this->get_shipment_number()) {\n foreach ($this->_mms_order as $_key => $_value) {\n if ($_key != \"ShipmentNumber\" && count($_value) >= 1) {\n // Save cleaned xml value into MMS order array property\n $_xml_value = $this->prepare_xml_string($this->_mms_order[$_key]['payload']);\n $this->_mms_order[$_key]['xml'] = $_xml_value;\n \n $_filename = date(\"Y-m-d\") . \"_\" . $this->get_shipment_number() . \"_\" . strtolower($_key) . \".xml\";\n $_file = $this->_config['data']['path'] . SELF::DS . $_filename;\n \n if ($this->write_to_file($_file, $_xml_value)) {\n \n if (file_exists($_file)) {\n $this->_mms_order[$_key]['xml_file'] = $_file;\n $this->add_to_xml_history($_key, $_file, $this->get_shipment_number(), 'created');\n }\n }\n }\n }\n }\n }",
"public function download_xml_file(){\r\n \r\n if (file_exists($this->attachfile)) {\r\n $attachfilename = 'export_xml_'.date(\"Y-m-d\").'.xml';\r\n \r\n header(\"Content-Description: File Transfer\");\r\n header(\"Content-type: text/xml\");\r\n header('Content-Disposition: attachment; filename=\"'.$attachfilename.'\"');\r\n \r\n readfile($this->attachfile);\r\n unlink($this->attachfile);\r\n return true;\r\n }\r\n return false;\r\n }",
"public function generateXmlFiles()\n\t{\n\t\t// Sitemaps\n\t\t$this->generateSitemap();\n\n\t\t// HOOK: add custom jobs\n\t\tif (isset($GLOBALS['TL_HOOKS']['generateXmlFiles']) && is_array($GLOBALS['TL_HOOKS']['generateXmlFiles']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['generateXmlFiles'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}();\n\t\t\t}\n\t\t}\n\n\t\t// Also empty the page cache so there are no links to deleted files\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Regenerated the XML files', __METHOD__, TL_CRON);\n\t}",
"function createXMLfile($phonebook){\r\n\r\n/* Het handigste is om een leeg bestand generated.phonebook.xml aan te maken en de juiste rechten toe te kennen. \r\n De onderstaande regel moet aangepast worden in bijv. $filePath = 'C://DIRECTORY/ANDERE/DIRECTORY/generated.phonebook.xml'; onder windows\r\n*/\r\n\t$filePath = '/var/www/html/telefoonboek/generated.phonebook.xml'; \r\n\t\r\n\t$document = new DOMDocument(\"1.0\",\"UTF-8\");\r\n\t$root = $document->createElement('IPPhoneDirectory');\r\n $parent1 = $document->createElement('Title','Phonelist');\r\n $parent2= $document->createElement('Prompt','Prompt');\r\n \t$root->appendChild($parent1);\r\n \t$root->appendChild($parent2);\r\n\t$document->appendChild($root);\r\n\r\n\tfor($i=0; $i<count($phonebook); $i++){\r\n\r\n\t$_Name \t = $phonebook[$i]['name'];\r\n\t$_phonenumber = $phonebook[$i]['number']; \r\n\r\n\t$_Directory = $document->createElement('DirectoryEntry');\r\n $name = $document->createElement('Name', $_Name);\r\n $_Directory->appendChild($name); \r\n $phonenumber = $document->createElement('Telephone', $_phonenumber);\r\n $_Directory->appendChild($phonenumber);\r\n \t\r\n\t$root->appendChild($_Directory);\r\n\t}\r\n\r\n $document->appendChild($root);\r\n \r\n $document->save($filePath)or die(\"Error saving phonebook file. Check folder or permissions?\"); \r\n echo \"Saving changes\";\r\n// echo $document->saveXML() . \"\\n\";\r\n}"
] | [
"0.7585008",
"0.71546763",
"0.71497726",
"0.70407176",
"0.6882637",
"0.68497276",
"0.6842053",
"0.68106157",
"0.6776037",
"0.6774941",
"0.6756682",
"0.6721928",
"0.67107326",
"0.66853225",
"0.66129136",
"0.65997577",
"0.6576241",
"0.65615356",
"0.6556655",
"0.6555185",
"0.6553264",
"0.65190923",
"0.6512649",
"0.6481517",
"0.6454749",
"0.64520323",
"0.63934356",
"0.6359936",
"0.6324141",
"0.6311467",
"0.6310436",
"0.62783396",
"0.6269709",
"0.6265288",
"0.6251224",
"0.6238073",
"0.6220649",
"0.6201322",
"0.61976117",
"0.6196307",
"0.6151424",
"0.6142078",
"0.6138613",
"0.6123844",
"0.6118191",
"0.61148965",
"0.61037076",
"0.608315",
"0.6078513",
"0.6067339",
"0.6062834",
"0.60481685",
"0.6047241",
"0.6027235",
"0.6024521",
"0.5975585",
"0.5967649",
"0.59622806",
"0.59530675",
"0.5952636",
"0.5937249",
"0.5924717",
"0.5902109",
"0.5896876",
"0.5855704",
"0.58492905",
"0.5844249",
"0.5843904",
"0.582164",
"0.5812182",
"0.58042914",
"0.57903004",
"0.5785184",
"0.5775967",
"0.57689583",
"0.57562476",
"0.5755381",
"0.5752493",
"0.5723365",
"0.5717327",
"0.5712408",
"0.5707994",
"0.5703142",
"0.56939745",
"0.5685865",
"0.5684495",
"0.56706905",
"0.5664177",
"0.5664177",
"0.5664177",
"0.5664177",
"0.5664177",
"0.56610364",
"0.56539816",
"0.5651791",
"0.56498003",
"0.56461394",
"0.56364626",
"0.5631429",
"0.56218815",
"0.56208014"
] | 0.0 | -1 |
creates data directory for export files (data_dir/usrf_data/export, depending on data directory that is set in ILIAS setup/ini) | function createExportDirectory()
{
if (!@is_dir($this->getExportDirectory()))
{
$usrf_data_dir = ilUtil::getDataDir()."/usrf_data";
ilUtil::makeDir($usrf_data_dir);
if(!is_writable($usrf_data_dir))
{
$this->ilias->raiseError("Userfolder data directory (".$usrf_data_dir
.") not writeable.",$this->ilias->error_obj->MESSAGE);
}
// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)
$export_dir = $usrf_data_dir."/export";
ilUtil::makeDir($export_dir);
if(!@is_dir($export_dir))
{
$this->ilias->raiseError("Creation of Userfolder Export Directory failed.",$this->ilias->error_obj->MESSAGE);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t\n\t\t// create learning module directory (data_dir/lm_data/lm_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t$export_dir = $svy_dir.\"/export\";\n\t\tilUtil::makeDir($export_dir);\n\t\tif(!@is_dir($export_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Export Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}",
"function getExportDirectory()\n\t{\n\t\t$export_dir = ilUtil::getDataDir().\"/usrf_data/export\";\n\n\t\treturn $export_dir;\n\t}",
"function createDataPaths() {\n foreach ($this->data_paths as $path) {\n if (!file_exists($this->root . $path)) {\n mkdir($this->root . $path);\n }\n }\n }",
"function createImportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\t\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\n\t\t// create test directory (data_dir/svy_data/svy_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\n\t\t// create import subdirectory (data_dir/svy_data/svy_<id>/import)\n\t\t$import_dir = $svy_dir.\"/import\";\n\t\tilUtil::makeDir($import_dir);\n\t\tif(!@is_dir($import_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Import Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}",
"function buildExportFile($a_mode = \"userfolder_export_excel_x86\", $user_data_filter = FALSE)\n\t{\n\t\tglobal $ilBench;\n\t\tglobal $log;\n\t\tglobal $ilDB;\n\t\tglobal $ilias;\n\t\tglobal $lng;\n\n\t\t//get Log File\n\t\t$expDir = $this->getExportDirectory();\n\t\t//$expLog = &$log;\n\t\t//$expLog->delete();\n\t\t//$expLog->setLogFormat(\"\");\n\t\t//$expLog->write(date(\"[y-m-d H:i:s] \").\"Start export of user data\");\n\n\t\t// create export directory if needed\n\t\t$this->createExportDirectory();\n\n\t\t//get data\n\t\t//$expLog->write(date(\"[y-m-d H:i:s] \").\"User data export: build an array of all user data entries\");\n\t\t$settings =& $this->getExportSettings();\n\t\t\n\t\t// user languages\n\t\t$query = \"SELECT * FROM usr_pref WHERE keyword = \".$ilDB->quote('language','text');\n\t\t$res = $ilDB->query($query);\n\t\t$languages = array();\n\t\twhile($row = $res->fetchRow(DB_FETCHMODE_ASSOC))\n\t\t{\n\t\t\t$languages[$row['usr_id']] = $row['value'];\n\t\t}\n\t\t\n\t\t\n\t\t$data = array();\n\t\t$query = \"SELECT usr_data.* FROM usr_data \".\n\t\t\t\" ORDER BY usr_data.lastname, usr_data.firstname\";\n\t\t$result = $ilDB->query($query);\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tif(isset($languages[$row['usr_id']]))\n\t\t\t{\n\t\t\t\t$row['language'] = $languages[$row['usr_id']];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row['language'] = $lng->getDefaultLanguage();\n\t\t\t}\n\t\t\t\n\t\t\tif (is_array($user_data_filter))\n\t\t\t{\n\t\t\t\tif (in_array($row[\"usr_id\"], $user_data_filter)) array_push($data, $row);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($data, $row);\n\t\t\t}\n\t\t}\n\t\t//$expLog->write(date(\"[y-m-d H:i:s] \").\"User data export: build an array of all user data entries\");\n\n\t\t$fullname = $expDir.\"/\".$this->getExportFilename($a_mode);\n\t\tswitch ($a_mode)\n\t\t{\n\t\t\tcase \"userfolder_export_excel_x86\":\n\t\t\t\t$this->createExcelExport($settings, $data, $fullname, \"latin1\");\n\t\t\t\tbreak;\n\t\t\tcase \"userfolder_export_csv\":\n\t\t\t\t$this->createCSVExport($settings, $data, $fullname);\n\t\t\t\tbreak;\n\t\t\tcase \"userfolder_export_xml\":\n\t\t\t\t$this->createXMLExport($settings, $data, $fullname);\n\t\t\t\tbreak;\n\t\t}\n\t\t//$expLog->write(date(\"[y-m-d H:i:s] \").\"Finished export of user data\");\n\n\t\treturn $fullname;\n\t}",
"private function create_downloads_dir(){\r\n\t\t$wp_upload_dir = wp_upload_dir();\r\n\r\n\t\t$downloads_dir = $wp_upload_dir['basedir'].'/downloads';\r\n\t\t$archived_dir = $wp_upload_dir['basedir'].'/archived';\r\n\r\n\t\t$reports_dir = $downloads_dir.'/reports';\r\n\t\t$archived_reports_dir = $archived_dir.'/reports';\r\n\r\n\t\tif(!file_exists($downloads_dir)){ mkdir($downloads_dir, 0777); }\r\n\t\tif(!file_exists($archived_dir)){ mkdir($archived_dir, 0777); }\r\n\r\n\t\tif(!file_exists($reports_dir)){ mkdir($reports_dir, 0777); }\r\n\t\tif(!file_exists($archived_reports_dir)){ mkdir($archived_reports_dir, 0777); }\r\n\r\n\t\t$rslt['reports_dir'] = $reports_dir;\r\n\t\t$rslt['archived_reports_dir'] = $archived_reports_dir;\r\n\r\n\t\treturn $rslt;\r\n\t}",
"function createDirectory() {\n\t$fmpImporter = new FilemakerProImporter();\n\t$fmpImporter->createDirectory();\n}",
"public function generateDataYmlDirectoryPath()\n {\n return self::DATA_CSV_PATH.$this->generateDataSubDirectoryPath();\n }",
"function getExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$export_dir = ilUtil::getDataDir().\"/svy_data\".\"/svy_\".$this->getId().\"/export\";\n\n\t\treturn $export_dir;\n\t}",
"function init__user_export()\n{\n define('USER_EXPORT_ENABLED', false);\n define('USER_EXPORT_MINUTES', 60 * 24);\n\n define('USER_EXPORT_DELIM', ',');\n\n define('USER_EXPORT_PATH', 'data_custom/modules/user_export/out.csv');\n\n define('USER_EXPORT_IPC_AUTO_REEXPORT', false);\n define('USER_EXPORT_IPC_URL_EDIT', null); // add or edit\n define('USER_EXPORT_IPC_URL_DELETE', null);\n define('USER_EXPORT_EMAIL', null);\n\n global $USER_EXPORT_WANTED;\n $USER_EXPORT_WANTED = array(\n // LOCAL => REMOTE\n 'id' => 'Composr member ID',\n 'm_username' => 'Username',\n 'm_email_address' => 'E-mail address',\n );\n}",
"public static function getDataDir()\n {\n return self::getDir('getDataHome');\n }",
"function local_powerprouserexport_write_user_data($config, $runhow = 'auto', $data = null) {\n global $CFG, $DB;\n\n if (empty($config->usercsvlocation)) {\n $config->usercsvlocation = $CFG->dataroot.'/powerprouserexport';\n }\n if (!isset($config->usercsvprefix)) {\n $config->usercsvprefix = '';\n }\n if (!isset($config->lastrun)) {\n $config->lastrun = 0;\n }\n\n // Open the file for writing.\n $filename = '';\n\n if ($data) {\n $filename = $config->usercsvlocation.'/'.$config->usercsvprefix.date(\"Ymd\").'-'.date(\"His\").'.csv';\n } else {\n $filename = $config->usercsvlocation.'/'.$config->usercsvprefix.date(\"Ymd\").'.csv';\n }\n\n if ($fh = fopen($filename, 'w')) {\n\n // Write the headers first.\n fwrite($fh, implode(',', local_powerprouserexport_get_user_csv_headers()).\"\\r\\n\");\n\n $users = local_powerprouserexport_get_user_data($config->lastrun, $data);\n\n if ($users->valid()) {\n\n // Cycle through data and add to file.\n foreach ($users as $user) {\n\n // profile_load_custom_fields($user);\n\n $user->profile = (array)profile_user_record($user->id);\n $employer = ($user->profile['employer'] == 'Other'\n and !empty($user->profile['employerother'])\n and strtolower($user->profile['employerother']) != 'n/a')\n ? $user->profile['employerother']\n : $user->profile['employer'];\n\n // Write the line to CSV file.\n fwrite($fh,\n implode(',', array(\n $user->username,\n $user->email,\n $user->firstname,\n $user->lastname,\n $user->country,\n $user->profile['DOB'],\n $user->profile['streetnumber'],\n $user->profile['streetname'],\n $user->profile['addresslocation'],\n $user->profile['postcode'],\n $user->profile['state'],\n $user->profile['gender'],\n $user->profile['postaldetails'],\n $employer,\n $user->profile['UniqueStudentID'],\n $user->profile['Phonenumber'])\n ).\"\\r\\n\");\n }\n\n // Close the recordset to free up RDBMS memory.\n $users->close();\n }\n // Close the file.\n fclose($fh);\n\n return true;\n } else {\n return false;\n }\n}",
"public function generateDataCsvDirectoryPath()\n {\n return $this->generateDataYmlDirectoryPath().$this->config->getEntityName().'/';\n }",
"public function createExportFile()\n {\n $this->csvFile = self::tempFile('export.csv');\n $this->photoZip = self::tempFile('photos.zip');\n $this->exportFile = sys_get_temp_dir() . '/' . $this->datestamp . '-marcato.zip';\n\n $this->createCSV();\n $this->createPhotoZipfile();\n\n $zip = new ZipArchive();\n $result = $zip->open($this->exportFile, ZipArchive::CREATE | ZipArchive::OVERWRITE);\n if ($result !== true) {\n throw new RuntimeException(\"Failed to create zip archive result=[$result]\");\n }\n $zip->addFile($this->csvFile, $this->datestamp . '.csv');\n $zip->addFile($this->photoZip, $this->datestamp . '_ranger_photos.zip');\n $zip->close();\n }",
"private function createFileDir()\n\t{\n\t\t$this->fileDir = IMAGES.'uploads'.DS.$this->model.DS.$this->modelId;\n\t\t$this->imgDir = 'uploads/'.$this->model.'/'.$this->modelId;\n\t}",
"public static function getDataFolder()\n {\n $class = get_called_class();\n $strip = explode('\\\\', $class);\n\n return RELEASE_NAME_DATA . '/' . strtolower(array_pop($strip)) . 's';\n }",
"public function create($data) {\n\t\t// Create an ID\n\t\t$id = $this->idCreate();\n\t\t// Write the data file\n\t\tfile_put_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}",
"function install($data='') {\r\n @umask(0);\r\n if (!Is_Dir(ROOT.\"./cms/products/\")) {\r\n mkdir(ROOT.\"./cms/products/\", 0777);\r\n }\r\n parent::install();\r\n }",
"protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))\n\t\t\t{\n\t\t\t\tmkdir($this->ruta,0777,true);\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!file_exists($this->rutaMini))\n\t\t\t{\n\t\t\t\tmkdir($this->rutaMini,0777,true);\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t}",
"private function writeAppData()\n {\n $fileName = \"{$this->storeDirectory}/appData.json\";\n $data = json_encode([\n 'default-counter' => $this->defaultCounter,\n ]);\n file_put_contents($fileName, $data, JSON_PRETTY_PRINT);\n }",
"protected function createDirectory() {}",
"public function prepareFile() {\n\t\t// Check if the file do exists\n\t\tif (!is_dir($this->filedir)) {\n\t\t\t// Create empty directory for the userexport\n\t\t\tif (!mkdir($this->filedir, 0755)) {\n\t\t\t\t// Creating the directory failed\n\t\t\t\tthrow new Exception(elgg_echo('userexport:error:nofiledir'));\n\t\t\t}\n\t\t}\n\n\t\t// Delete any existing file\n\t\tunlink($this->filename);\n\t}",
"function logonscreener_destination_prepare() {\n if (is_file(LOGONSCREENER_DESTINATION_PATH)) {\n chmod(LOGONSCREENER_DESTINATION_PATH, 0777);\n }\n else {\n $directory = dirname(LOGONSCREENER_DESTINATION_PATH);\n\n if (!is_dir($directory)) {\n mkdir($directory, 0, TRUE);\n }\n }\n}",
"protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }",
"protected function createOtherDirs()\n {\n $this->createDir('Database', true);\n $this->createDir('Database/Migrations', true);\n $this->createDir('Database/Seeds', true);\n $this->createDir('Filters', true);\n $this->createDir('Language', true);\n $this->createDir('Validation', true);\n }",
"protected function prepareArchiveDir(): void\n {\n $this->filesystem = new Filesystem();\n $this->archiveDir = FsUtils::tmpDir(self::ARCHIVES_DIR_NAME);\n }",
"function getExportDirectory() {\n\n $upload_dir = wp_upload_dir();\n\n $path = $upload_dir['basedir'] . '/form_entry_exports';\n\n // Create the backups directory if it doesn't exist\n if ( is_writable( dirname( $path ) ) && ! is_dir( $path ) )\n mkdir( $path, 0755 );\n\n // Secure the directory with a .htaccess file\n $htaccess = $path . '/.htaccess';\n\n $contents[]\t= '# ' . sprintf( 'This %s file ensures that other people cannot download your export files' , '.htaccess' );\n $contents[] = '';\n $contents[] = '<IfModule mod_rewrite.c>';\n $contents[] = 'RewriteEngine On';\n $contents[] = 'RewriteCond %{QUERY_STRING} !key=334}gtrte';\n $contents[] = 'RewriteRule (.*) - [F]';\n $contents[] = '</IfModule>';\n $contents[] = '';\n\n if ( ! file_exists( $htaccess ) && is_writable( $path ) && require_once( ABSPATH . '/wp-admin/includes/misc.php' ) )\n insert_with_markers( $htaccess, 'BackUpWordPress', $contents );\n\n return $path;\n }",
"function generate_directory($id){\n $filename = \"intranet/usuarios/\" . $id . \"/uploads/\";\n if (!file_exists($filename)) {\n mkdir($filename, 0777, true);\n }\n }",
"protected function generateUploadDir()\n\t{\n\t\treturn self::EXPORT_PATH;\n\t}",
"abstract function exportData();",
"function create_user_dir(){\n\t$safeUserDir=bin2hex(random_bytes(4));\n\t$oldDir=getcwd();\n\tchdir(FS_PATH);\n\tif(mkdir(\"$safeUserDir\")) {\n\tchmod(\"$safeUserDir\",0755); //owner=r,w,x group=r,x other=r,x\n\tchdir($oldDir);\n\treturn \t$safeUserDir;\n\t} else {\n\t\tchdir($oldDir);\n\t\terror_log(\"create_user_dir: Could not create user directory in \".FS_PATH,0);\n\t\treturn false;\n\t}\n}",
"public function getRelativeDataDir()\n\t{\n\t\treturn 'ash';\n\t}",
"protected function setExportTmpAndLogSettings()\n {\n $this->setExportFolderPath(\n $this->directory->getPath(DirectoryList::TMP) . DS . 'shopgate' . DS . $this->getShopNumber()\n );\n $this->createFolderIfNotExist($this->getExportFolderPath());\n\n $this->setLogFolderPath(\n $this->directory->getPath(DirectoryList::LOG) . DS . 'shopgate' . DS . $this->getShopNumber()\n );\n $this->createFolderIfNotExist($this->getLogFolderPath());\n\n $this->setCacheFolderPath(\n $this->directory->getPath(DirectoryList::TMP) . DS . 'shopgate' . DS . $this->getShopNumber()\n );\n $this->createFolderIfNotExist($this->getCacheFolderPath());\n }",
"public static function getAbsoluteDataDir(){\r\n\t\treturn sfTeraWurflConfig::getDataDir();\r\n\t}",
"protected function init()\n {\n $dir = $this->getDir();\n\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n }",
"public function actionGenerateAndDownloadDatasetCreationFile() {\n $fileColumns[] = DatasetController::AGRONOMICAL_OBJECT_URI;\n $fileColumns[] = DatasetController::DATE;\n $variables = Yii::$app->request->post('variables');\n foreach ($variables as $variableAlias) {\n $fileColumns[] = $variableAlias;\n }\n\n $file = fopen('./documents/DatasetFiles/datasetTemplate.csv', 'w');\n fputcsv($file, $fileColumns, $delimiter = \";\"); \n fclose($file);\n }",
"function mscaffolding_prepare_directories($name)\n\t{\n\t\tmkdir(\"data/scaffolding/\" . $name);\n\t\tmkdir(\"data/scaffolding/\" . $name . \"/views\");\n\t}",
"protected function _CreateExportSession()\n\t{\n\t\t$query = \"create table [|PREFIX|]export_session (\n\t\t\ttype varchar(20) not null default '',\n\t\t\tmodule varchar(30) not null default '',\n\t\t\tlog varchar(30) not null default '',\n\t\t\tdata text not null\n\t\t)\";\n\t\t$GLOBALS['ISC_CLASS_DB']->Query($query);\n\n\t\t$query = \"insert into [|PREFIX|]export_session (type,data) values ('primary', '')\";\n\t\t$GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t$this->_exportSession = array();\n\t}",
"private function makeDirectory(): void\n {\n $this->directory = $this->simulation->fileAbsolutePath('correlations/' . $this->id);\n Utils::createDirectory($this->directory);\n }",
"public function createDirectories()\n {\n self::createDirectory($this->contentDirectoryPath);\n\n if ($this->staticPreviewIsEnabled())\n self::createDirectory($this->cacheDirectoryPath);\n }",
"private function _getDatabaseDataDir(){\n $query = \"show variables where Variable_Name='datadir'\";\n try{\n $record = $this->_liquetDatabase->query($query)->fetch();\n $dataDir = reset($record);\n $dataDir = $dataDir['Value'];\n }catch (Exception $e){\n throw new InvalidQueryException($query,Exception::INVALID_QUERY);\n }\n\n if(PHP_OS === \"CYGWIN\") {\n $dataDir = LiquetFileHelper::winToCygwinPath($dataDir);\n }\n\n $databaseName = $this->_liquetDatabase->getDatabaseName();\n\n $dataDir.=$databaseName.DIRECTORY_SEPARATOR;\n\n return $dataDir;\n }",
"protected function createRealTestdir() {}",
"public function getHomeDirectory() {\n $physicalWebDir = getcwd();\n\n return $physicalWebDir . 'data';\n }",
"function export_data() {\n\t\t$sync_tables = $this->config->item('sync_tables');\n\n\t\t$this->db_tools->export_data( $sync_tables );\n\t\t$this->db_tools->echo_export_data();\n\t}",
"public function createExportFromScheduleData()\n {\n \t// create the export based on the schedule data\n //include_once( 'extension/ezstaticexport/classes/ezstaticexportexport.php' );\n \n // Total number of nodes to export\n $total = $this->attribute('total');\n \n \t$row = array( 'type' => $this->attribute( 'type' ),\n 'path_string' => $this->attribute( 'path_string' ),\n 'target' => $this->attribute( 'target' ),\n 'schedule_type' => 'scheduled',\n 'status' => eZStaticExport::STATUS_PENDING,\n 'total' => $total,\n \t\t\t\t 'static_resources' => $this->attribute('static_resources'));\n\n $this->export = new eZStaticExportExport( $row );\n $this->export->store();\n }",
"public function getDataDir()\n {\n return (string) $this->file->get(self::SETTING_DATA_DIR);\n }",
"public function data_to_disk($data, $filename, $sections, $db, $table_prefix = '', $output_filename = '', $file_base = '', $attachment_id = '')\n {\n $boardurl = '';\n $boarddir = '';\n\n require($file_base . '/Settings.php');\n $homeurl = $boardurl;\n\n $forum_dir = preg_replace('#\\\\\\\\#', '/', $boarddir); // Full path to the forum folder\n\n $attachments_dir = $forum_dir . '/attachments/'; // Forum attachments directory\n\n // Start preparing the attachment file path by adding it's md5-ied filename and attachment id\n $file_stripped = preg_replace(array('/\\s/', '/[^\\w\\.\\-]/'), array('_', ''), $filename);\n $filename_fixed = ((strlen($attachment_id) > 0) ? ($attachment_id . '_' . str_replace('.', '_', $file_stripped) . md5($file_stripped)) : (str_replace('.', '_', $file_stripped) . md5($file_stripped)));\n $file_path = $attachments_dir . $filename_fixed;\n\n $data = ($data == '') ? @file_get_contents($file_path) : $data;\n $filename = ($output_filename == '') ? $filename_fixed : $output_filename;\n\n $filename = find_derivative_filename('uploads/' . $sections, $filename);\n $path = get_custom_file_base() . '/uploads/' . $sections . '/' . $filename;\n\n require_code('files');\n cms_file_put_contents_safe($path, $data, FILE_WRITE_FIX_PERMISSIONS | FILE_WRITE_SYNC_FILE);\n\n $url = 'uploads/' . $sections . '/' . $filename;\n\n return $url;\n }",
"public function getHomeDirectory() {\n $physicalWebDir = getcwd();\n\n return $physicalWebDir . 'data';\n }",
"public function export() {\n $folder = $this->config->get('oxygen.mod-import-export.path');\n if(!file_exists($folder)) {\n mkdir($folder);\n }\n $path = $folder . $this->environment;\n if(!file_exists($path)) {\n mkdir($path);\n }\n\n $this->exportStrategy->create($path);\n\n foreach($this->workers as $worker) {\n $files = $worker->export($this->output);\n foreach($files as $localPath => $path) {\n $this->output->writeln('Adding file: ' . $path);\n $this->exportStrategy->addFile($path, $localPath);\n }\n }\n\n $this->exportStrategy->commit();\n\n foreach($this->workers as $worker) {\n $worker->postExport($this->output);\n }\n }",
"function newsItem_CreateDirektori( \n\t \t$tanggalhariini\n\t){\n \t\t$direktoribuat = \"filemodul/news/\" . \"file_item/\" . $tanggalhariini . \"/\";\n\t\t\t mkdir( $direktoribuat,'0777',true); \n\t\t\t chmod( $direktoribuat, 0777);\n\t\treturn $direktoribuat;\n\t}",
"protected function _arrayDataFolders() {\n return ['datadir', /*pages*/\n 'olddir', /*attic*/\n 'mediadir', /*media*/\n 'mediaolddir', /*media_attic*/\n 'metadir', /*meta*/\n 'mediametadir', /*media_meta*/\n 'mdprojects', /*mdprojects*/\n 'revisionprojectdir', /*project_attic*/\n 'metaprojectdir', /*project_meta*/\n ];\n }",
"private function defineDirPainelDLX(): void\n {\n // Previnir que o diretório seja alterado caso alguém tenha setado ele manualmente\n if (empty(self::$dir)) {\n $base_dir = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR;\n $document_root = $this->request->getServerParams()['DOCUMENT_ROOT'];\n\n // Setar o path do PainelDLX\n self::$dir = trim(str_replace($document_root, '', $base_dir), DIRECTORY_SEPARATOR);\n\n // Garantir que os separadores de diretório estejam padronizados\n self::$dir = str_replace(DIRECTORY_SEPARATOR, '/', self::$dir);\n\n // Adicionar o path do PainelDLX no include_path\n $this->adicionarDiretorioInclusao($base_dir);\n }\n }",
"private function _createCacheFile($data, $key)\n\t{\n\t\t$cache_path = APPPATH.'cache/' . __CLASS__;\n\t\t$filepath = $cache_path .\"/\". $key . \".xml\";\n\t\n\t\tif (! is_dir($cache_path))\n\t\t\tmkdir($cache_path . \"\", 0777, TRUE);\n\t\t\n\t\tif(! is_really_writable($cache_path))\n\t\t\treturn;\n\n\t\tif ( ! $fp = fopen($filepath, FOPEN_WRITE_CREATE_DESTRUCTIVE))\n\t\t{\n\t\t\t// print(\"<!-- Unable to write cache file: \".$filepath.\" -->\\n\");\n\t\t\tlog_message('error', \"Unable to write cache file: \".$filepath);\n\t\t\treturn;\n\t\t}\n\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp, $data);\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\t\tchmod($filepath, DIR_WRITE_MODE);\n\n\t\t// print(\"<!-- Cache file written: \" . $filepath . \" -->\\n\");\n\t\tlog_message('debug', \"Cache file written: \" . $filepath);\n\t}",
"public function stf_custom_upload_dir( $dir_data ) {\n $custom_dir = 'tar-csv-import';\n return [\n 'path' => $dir_data[ 'basedir' ] . '/' . $custom_dir,\n 'url' => $dir_data[ 'url' ] . '/' . $custom_dir,\n 'subdir' => '/' . $custom_dir,\n 'basedir' => $dir_data[ 'error' ],\n 'error' => $dir_data[ 'error' ],\n ];\n }",
"function check_and_create_import_dir($unique_code) {\n global $CFG; \n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n return $status;\n }",
"abstract public function getRelativeDataDir();",
"function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }",
"protected function createCacheDir()\n {\n if ( ! file_exists($this->cacheDir)) {\n mkdir($this->cacheDir);\n }\n }",
"public function onCreatePortafolio() {\n if (!file_exists($this->getUploadRootDir())) {\n mkdir($this->getUploadRootDir(), 0777, true);\n mkdir($this->getUploadRootDirPdf(), 0777, true);\n mkdir($this->getUploadRootDirImg(), 0777, true);\n }\n\n }",
"public function getDirectoryData();",
"function mkImageDir()\r\n {\r\n $this->imageDir = date('Ymd') . '/';\r\n $imageDirPath = $this->rootPath . $this->config->get('imgPath') . $this->imageDir;\r\n if (file_exists($imageDirPath)) return;\r\n if (!file_exists($this->rootPath . $this->config->get('imgPath'))) mkdir($this->rootPath . $this->config->get('imgPath'), 0777);\r\n mkdir($imageDirPath, 0777);\r\n }",
"protected function action_getUserMainDir() {}",
"function check_and_create_import_dir($unique_code) {\n\n global $CFG; \n\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n \n return $status;\n }",
"function makeDIR($directory,$debugtxt=0,$nMode) {\n // Create payload directory if it doesn't exist:\n if (file_exists($directory)) {\n //if ($debugtxt) { echo \"<p>Directory <b>$directory</b> already exists </p>\"; }\n $result = true; // Return true as success is when the directory has either been created or already exists\n } else {\n // Make the new temp sub_folder for unzipped files\n if (!mkdir($directory, $nMode, true)) {\n if ($debugtxt) { \n echo \"<p>Error: Could not create folder <b>$directory</b> - check file permissions\";\n echo '<div class=\"admin_img\"><a href=\"'.$sSiteUrl.'/admin\" class=\"btn btn-lg btn-primary color-white\">Admin</a></div><div class=\"play_img\"><a href=\"'.$sSiteUrl.'/play\" class=\"btn btn-lg btn-primary color-white\">Play</a></div>';\n }\n $result= false;\n } else { \n //if ($debugtxt) { echo \"Folder <b>$directory</b> Created <br>\";} \n $result = true;\n } // END mkdir\n } // END if file exists\n return $result;\n }",
"private static function create_cache_dir() {\n if ( ! is_writable(self::$_cache_dir)) {\n if ( ! file_exists(self::$_cache_dir)) {\n if ( ! @mkdir(self::$_cache_dir, 0755, TRUE))\n throw new Exception('failed to create cache directory: '\n . self::$_cache_dir);\n } else \n throw new Exception(self::$_cache_dir . ' is not writable');\n }\n }",
"function deleteAndBuildDebugUserDataFile() {\n\t\tclearAllUsers();\n\t\t$db = connectToDatabase();\n\t\twriteUser(\t\t\t\t\t-1, \"admin\",\t\"admin\",\ttrue);\n\t\twriteUser(insertarUsuario($db), \"miguel\",\t\"1234aa\",\tfalse);\n\t\twriteUser(\t\t\t\t\t-1, \"admin2\",\t\"admin\",\ttrue);\n\t\twriteUser(insertarUsuario($db), \"cesar\",\t\"aa1234\",\tfalse);\n\t\twriteUser(insertarUsuario($db), \"luis\",\t\t\"12aa34\",\tfalse);\n\t\tcloseConnection($db);\n\t}",
"private function write_data_to_db()\r\n {\r\n $dic_depth = 1;\r\n \r\n for ($dic_depth = 1; $dic_depth < 6; $dic_depth++)\r\n {\r\n foreach ($this->directory_array[$dic_depth] as $id => $dic_node)\r\n {\r\n // create node is not existed, get id when existed\r\n $ret = $this->add_testsuite_node_to_db($dic_depth, $dic_node);\r\n \r\n // create testcase under testsuite\r\n if ($ret)\r\n {\r\n $this->add_testcase_nodes_to_db($dic_depth, $dic_node);\r\n }\r\n }\r\n }\r\n }",
"function jobsearch_resume_export_files_upload_dir($dir = '')\n{\n $cus_dir = 'jobsearch-resume-export-temp';\n $dir_path = array(\n 'path' => $dir['basedir'] . '/' . $cus_dir,\n 'url' => $dir['baseurl'] . '/' . $cus_dir,\n 'subdir' => $cus_dir,\n );\n return $dir_path + $dir;\n}",
"private function createNewTempdir(){\n $tempdirname = '';\n do{\n $tempdirname = uniqid('temp_',true);\n }while(file_exists(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname));\n\n if(@mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname)){\n mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname.DIRECTORY_SEPARATOR.'gallery');\n }else{\n die(json_encode(array('state'=>'error','data'=> $this->text('e28').': '.FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.'!')));\n }\n return $tempdirname;\n }",
"private function Make_UniqueDIR( )\n\t{\n\t\t$this -> DIR = self :: $Request -> server -> get( 'DOCUMENT_ROOT' ) . $this -> FULL_PATH . self :: FOLDER_BASE_NAME . $this -> ID;\n\t\tif ( !file_exists( $this -> DIR ) )\n\t\t\tmkdir( $this -> DIR , 0777 , true ) ;\n\t}",
"public function createFolders() {\n $this->output('Current directory: ' . getcwd());\n\n // user folder.\n try {\n \\File::read_dir($this->repo_home . '/' . $this->user_id);\n $this->output('User directory already exist.');\n } catch (Exception $e) {\n $p = new Process('mkdir ' . $this->repo_home . '/' . $this->user_id);\n $p->run();\n $this->output('Created user Directory: ' . $this->user_dir);\n }\n $this->user_dir = $this->repo_home . '/' . $this->user_id;\n\n // repo folder.\n try {\n \\File::read_dir($this->user_dir . '/' . $this->deploy_id);\n $this->output('Repository directory already exist.');\n } catch (Exception $ex) {\n $p = new Process('mkdir ' . $this->user_dir . '/' . $this->deploy_id);\n $p->run();\n $this->output('Created repository directory: ' . $this->repo_dir);\n }\n $this->repo_dir = $this->user_dir . '/' . $this->deploy_id;\n }",
"protected function _create_cache_dir()\n {\n if( ! file_exists($this->config['cache_dir']))\n {\n try\n {\n mkdir($this->config['cache_dir'], 0755, TRUE);\n }\n catch(Exception $e)\n {\n throw new Kohana_Exception($e);\n }\n }\n\n // Set the cache dir\n $this->cache_dir = $this->config['cache_dir'];\n }",
"public function createFile($type = null, $filename = null, $data = [])\n {\n $overwrite = false;\n if (isset($data[\"overwrite\"])) {\n $overwrite = $data[\"overwrite\"];\n }\n $path = $this->getOutputPath($type);\n\n $namespace = \"\";\n $src = $this->getUserTemplate(\"./config.php\", $type);\n\n if (!file_exists($src)) {\n $src = config(\"craftsman.templates.{$type}\");\n }\n\n $src = $this->getPharPath().$src;\n\n if (!file_exists($src)) {\n printf(\"\\n\\n\");\n Log::error(\"Unable to locate template './{$src}' Has it been deleted?\");\n exit(1);\n }\n\n if (Str::contains($filename, \"App\")) {\n $dest = $this->path_join($filename.\".php\");\n } else {\n $dest = $this->path_join($path, $filename.\".php\");\n }\n\n if (file_exists($dest) && (!$overwrite)) {\n Messenger::error(\"✖︎ {$dest} already exists\\n\");\n return [\n \"status\" => self::FILE_EXIST,\n \"message\" => \"{$dest} already exists\",\n ];\n }\n\n $tablename = \"\";\n\n if (isset($data[\"tablename\"])) {\n $tablename = strtolower($data[\"tablename\"]);\n } else {\n if (isset($data[\"model\"])) {\n $tablename = Str::plural(strtolower(class_basename($data[\"model\"])));\n }\n }\n\n $fields = \"\";\n if (isset($data[\"fields\"])) {\n $fields = strtolower($data[\"fields\"]);\n }\n\n $fieldData = $this->buildFieldData($fields);\n $model_path = \"\";\n\n $model = \"\";\n if (isset($data[\"model\"])) {\n $model = class_basename($data[\"model\"]);\n $model_path = $data[\"model\"];\n } else {\n $model = class_basename($data[\"name\"]);\n $namespace = str_replace(\"/\", \"\\\\\", str_replace(\"/\".$model, \"\", $data[\"name\"]));\n }\n\n $vars = [\n \"name\" => $filename,\n \"model\" => $model,\n \"model_path\" => $model_path,\n \"tablename\" => $tablename,\n \"fields\" => $fieldData,\n ];\n\n if (isset($data[\"namespace\"])) {\n $vars[\"namespace\"] = $data[\"namespace\"];\n } else {\n if (strlen($namespace) > 0) {\n $vars[\"namespace\"] = $namespace;\n }\n }\n\n if (isset($data[\"namespace\"])) {\n if ($vars[\"model\"] === $vars[\"namespace\"]) {\n $vars[\"namespace\"] = \"App\";\n }\n }\n\n // this variable is only used in seed\n if (isset($data[\"num_rows\"])) {\n $vars[\"num_rows\"] = (int) $data[\"num_rows\"] ?: 1;\n }\n\n // this variable is only used in migration\n if (isset($data[\"down\"])) {\n $vars[\"down\"] = $data[\"down\"];\n }\n\n // this variable is only used in test\n if (isset($data[\"extends\"])) {\n $vars[\"extends\"] = $data[\"extends\"];\n }\n\n // this variable is only used in test\n if (isset($data[\"setup\"])) {\n $vars[\"setup\"] = $data[\"setup\"];\n }\n\n // this variable is only used in test\n if (isset($data[\"teardown\"])) {\n $vars[\"teardown\"] = $data[\"teardown\"];\n }\n\n // this variable is only used in migration\n if (isset($data[\"constructor\"])) {\n $vars[\"constructor\"] = $data[\"constructor\"];\n } else {\n $vars[\"constructor\"] = false;\n }\n\n// $vars[\"model_path\"] = str_replace(\"/\", \"\\\\\", $vars[\"model_path\"]);\n\n $template = $this->fs->get($src);\n\n $mustache = new Mustache_Engine();\n\n $vars[\"model_path\"] = str_replace(\"/\", \"\\\\\", $vars[\"model_path\"]);\n\n $template_data = $mustache->render($template, $vars);\n\n try {\n $this->createParentDirectory($dest);\n $this->fs->put($dest, $template_data);\n $result = [\n \"filename\" => $dest,\n \"status\" => \"success\",\n \"message\" => \"{$dest} created successfully\",\n ];\n } catch (\\Exception $e) {\n $result = [\n \"filename\" => $dest,\n \"status\" => \"error\",\n \"message\" => $e->getMessage(),\n ];\n }\n\n if ($result[\"status\"] === \"success\") {\n Messenger::success(\"✔︎ {$dest} created successfully\\n\");\n }\n\n return $result;\n }",
"function setUp() {\n\t\t$this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php');\n\t\t$this->dataShort = 'hats';\n\t\t$this->dataUrl = __DIR__ . '/../lib/crypt.php';\n\t\t$this->legacyData = __DIR__ . '/legacy-text.txt';\n\t\t$this->legacyEncryptedData = __DIR__ . '/legacy-encrypted-text.txt';\n\t\t$this->randomKey = Encryption\\Crypt::generateKey();\n\n\t\t$keypair = Encryption\\Crypt::createKeypair();\n\t\t$this->genPublicKey = $keypair['publicKey'];\n\t\t$this->genPrivateKey = $keypair['privateKey'];\n\n\t\t$this->view = new \\OC_FilesystemView('/');\n\n\t\t\\OC_User::setUserId(\\Test_Encryption_Keymanager::TEST_USER);\n\t\t$this->userId = \\Test_Encryption_Keymanager::TEST_USER;\n\t\t$this->pass = \\Test_Encryption_Keymanager::TEST_USER;\n\n\t\t$userHome = \\OC_User::getHome($this->userId);\n\t\t$this->dataDir = str_replace('/' . $this->userId, '', $userHome);\n\n\t\t// remember files_trashbin state\n\t\t$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');\n\n\t\t// we don't want to tests with app files_trashbin enabled\n\t\t\\OC_App::disable('files_trashbin');\n\t}",
"public function createBaseFilesAndFolders()\n {\n $this\n ->createRootFolder()\n ->createRelsFolderAndFile()\n ->createDocPropsFolderAndFiles()\n ->createXlFolderAndSubFolders();\n }",
"function make_json($data) {\n // generate JSON path with a random filename\n $json_path = __dir__ . '/datasets/' . make_name(10) . '.json';\n // convert PHP array into JSON string\n $json_data = json_encode($data);\n // write the JSON string to the file\n file_put_contents($json_path, $json_data);\n return $json_path;\n }",
"static public function createTempDir()\n {\n self::$root = vfsStream::setup('root');\n\n return vfsStream::url('root') . DIRECTORY_SEPARATOR;\n }",
"private function createProfileFiles($profile){\n \n // Create profile dir\n $profile_dir = conf::pathBase() . \"/profiles/$profile\";\n if (!file_exists($profile_dir)) {\n $mkdir = @mkdir($profile_dir);\n if (!$mkdir){\n common::abort(\"Could not make dir: '$profile_dir'\");\n }\n }\n \n $modules = $this->getModules();\n foreach ($modules as $key => $val){\n\n $source = conf::pathModules() . \"/$val[module_name]/$val[module_name].ini\";\n\n // if no ini we just skip \n if (!file_exists($source)) { \n continue;\n }\n \n $ary = conf::getIniFileArray($source, true);\n $ary = $this->iniArrayPrepare($ary); \n $config_str = conf::arrayToIniFile($ary);\n\n // Module ini file\n $dest = $profile_dir . \"/$val[module_name].ini-dist\";\n file_put_contents($dest, $config_str);\n\n // PHP config file\n $source = conf::pathModules() . \"/$val[module_name]/config.php\";\n $dest = $profile_dir . \"/$val[module_name].php-dist\";\n\n if (file_exists($source)){\n copy($source, $dest);\n }\n }\n \n $templates = $this->getTemplates();\n foreach ($templates as $key => $val){\n\n $source = conf::pathHtdocs() . \"/templates/$val[module_name]/$val[module_name].ini\";\n $dest = $profile_dir . \"/$val[module_name].ini-dist\";\n \n // templates does not need to have an ini file\n if (file_exists($source)) {\n if (copy($source, $dest)){\n $this->confirm[] = \"Copied $source to $dest\";\n } else {\n $this->error[] = \"Could not copy $source to $dest\";\n }\n }\n } \n }",
"public function exportFile($filename, $data)\n {\n // TODO\n }",
"public function exportDataCsv()\n {\n \t$tempPath = dirname(__DIR__,4).DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.\"temp\".DIRECTORY_SEPARATOR;\n $tempFile = tempnam($tempPath, \"zip\");\n\n $ret = null;\n $db_name = config('Database')->default[\"database\"];\n $zip = new ZipArchive;\n\n $db = db_connect();\n $zip->open($tempFile, ZipArchive::CREATE || ZipArchive::OVERWRITE);\n\n //get every tables's name\n $tables = $this->db->query(\"SHOW TABLES FROM `\".$db_name.\"`\")->getResultArray();\n\n\n try\n {\n //output data from each table to csv file and put it in zip\n foreach($tables as $key => $val)\n {\n $table = $val['Tables_in_'.$db_name];\n $content = '';\n\n //get columns name\n $columns = $this->db->query(\"SHOW COLUMNS FROM `\".$table.\"`\")->getResultArray();\n $lastCol = end($columns);\n $headers = '';\n\n //make headers line\n foreach($columns as $c)\n {\n if ($c['Field'] == $lastCol['Field'])\n $headers .= $c['Field'].\"\\r\";\n else\n $headers.= $c['Field'].\", \";\n }\n $content .= $headers;\n\n //get data and put it in csv\n $sql = \"SELECT * FROM \".$table;\n $data = $db->query($sql)->getResultArray();\n foreach($data as $row)\n {\n $lastKey = array_key_last($row);\n foreach($row as $key => $val)\n {\n if($key == $lastKey) $content .= $val.\"\\r\";\n else $content .= $val.\",\";\n }\n }\n\n $zip->addFromString($table.\".csv\", $content);\n }\n }\n catch(Exception $e){\n\t\t\t$tempFile = $e;\n }\n\n $zip->close();\n\n //return temp file\n return $tempFile;\n\n }",
"function prepare() {\n\t\t\tcopy( \\Rum::config()->fixtures . '/Address Book.csv', __ROOT__ . '/app/data/Address Book.csv' );\n\t\t}",
"function getExportPath() {\n\t\t$exportPath = Config::getVar('files', 'files_dir') . '/' . $this->getPluginSettingsPrefix();\n\t\tif (!file_exists($exportPath)) {\n\t\t\t$fileManager = new FileManager();\n\t\t\t$fileManager->mkdir($exportPath);\n\t\t}\n\t\tif (!is_writable($exportPath)) {\n\t\t\t$errors = array(\n\t\t\t\tarray('plugins.importexport.common.export.error.outputFileNotWritable', $exportPath)\n\t\t\t);\n\t\t\treturn $errors;\n\t\t}\n\t\treturn realpath($exportPath) . '/';\n\t}",
"public static function getDataDir(): ?string {\n $dir = self::getRoot() . self::getDS() . 'data';\n if (! is_dir($dir)) {\n $dir = null;\n }\n \n return $dir;\n }",
"function writeTempDir() {\n umask(0);\n FileSystem::mkdirOrThrowExceptionOnFailure($this->getTestDir(), true);\n }",
"protected function initAdminDirectory()\n {\n if (is_dir($this->installPath())) {\n $this->line('<error>' . $this->installPath() . ' directory already exists !</error> ');\n\n return;\n }\n\n $this->makeDir($this->installPath());\n\n $this->makeDir($this->installPath('Controllers'));\n\n $this->createRoutesFile();\n\n $this->createBootstrapFile();\n\n $this->createControllers();\n\n $this->line('<info>Installing huztw-admin!</info>');\n }",
"public function exportUsers(array $data) {\n $filename = 'users_'.date('Y_m_d_H_i_s').'.csv';\n\n if(!($file = fopen($this->dir.'/'.$filename, 'w'))) {\n return false;\n }\n\n foreach($data as $user){\n $row = (array) $user;\n fputcsv($file, $row, ',', '\"');\n }\n\n return fclose($file);\n }",
"protected function getDefaultImportExportFolder() {}",
"protected function getDefaultImportExportFolder() {}",
"function _createCacheDirectory() {\n // Create cache directory if it doesnt exist\n if (!file_exists($this->thumbnail_dir)) {\n @mkdir($this->thumbnail_dir, 0777, true);\n } else {\n // Try to make the directory writable\n @chmod($this->thumbnail_dir, 0777);\n }\n }",
"public function create($data) {\n $new_pdf_name = mt_rand();\n\n # create fdf file\n $fdf_file = $this->createFDF($data);\n $tmp_file = fopen($this->base_directory . $new_pdf_name . '.fdf', 'w');\n\n if($tmp_file && fwrite($tmp_file, $fdf_file, strlen($fdf_file))) {\n $command = \"{$this->pdftk_path} A='{$this->pdf_base}' \";\n $command .= \"fill_form '\" . $this->base_directory . $new_pdf_name . \".fdf' \";\n $command .= \"output '\" . $this->base_directory . $new_pdf_name . \".pdf' drop_xfa\";\n\n # Execute the command to merge pdf base with new fdf file\n passthru($command);\n }\n\n # Attached to array the name of pdf files\n $this->pdf_names = array_merge($this->pdf_names, array($new_pdf_name));\n\n fclose($tmp_file);\n }",
"public function exportData($area, $format){\n $area = db::escapechars($area);\n $format = db::escapechars($format);\n $dateoutput = date('ymdHis');\n \n // Get the data\n switch($area){\n case \"members\":\n if($format == 'csv'){\n $headoutput = \"Title, Firstname, Middlename, Surname, Email, Phone, Mobile, Address1, Address2, Address3,Postcode, Country, WorkPhone, WorkFax, WorkEmail, WorkWebsite, MemberType\\r\\n\";\n }\n else{\n $headoutput = \"<?xml version=\\\"1.0\\\" encoding=\\\"iso-8859-1\\\"?>\\r\\n\";\n $headoutput .= \"<kongreg8db version=\\\"2.0.1\\\">\";\n }\n $sql = \"SELECT memberID, prefix, firstname, middlename, surname, email, homephone, mobilephone, address1, address2, address3, postcode, country, workphonenumber, workfaxnumber, workemail, workwebsite, memberStatus FROM churchmembers ORDER BY surname ASC, firstname ASC, middlename ASC\";\n $path = \"application/export/files/members\".$dateoutput.\".\".$format;\n break;\n case \"groups\":\n if($format == 'csv'){\n $headoutput = \"Title, Firstname, MiddleName, Surname, Email, Phone, Mobile, Address1, Address2, Address3, Postcode, Country, WorkPhone, WorkFax, WorkEmail, WorkWebsite, MemberType, GroupName, GroupDescription \\r\\n\";\n }\n else{\n $headoutput = \"<?xml version=\\\"1.0\\\" encoding=\\\"iso-8859-1\\\"?>\\r\\n\";\n $headoutput .= \"<kongreg8db version=\\\"2.0.1\\\">\";\n }\n $sql = \"SELECT churchmembers.memberID, churchmembers.prefix, churchmembers.firstname, churchmembers.middlename, churchmembers.surname, churchmembers.email, \n churchmembers.homephone, churchmembers.mobilephone, churchmembers.address1, churchmembers.address2, churchmembers.address3, \n churchmembers.postcode, churchmembers.country, churchmembers.workphonenumber, churchmembers.workfaxnumber, churchmembers.workemail, \n churchmembers.workwebsite, churchmembers.memberStatus, \n groups.groupname, groups.groupdescription \n FROM (churchmembers RIGHT JOIN groupmembers on groupmembers.memberID = churchmembers.memberID RIGHT JOIN groups ON groups.groupID=groupmembers.groupID) \n GROUP BY churchmembers.memberID \n ORDER BY churchmembers.surname ASC, churchmembers.firstname ASC, churchmembers.middlename ASC\";\n $path = \"application/export/files/groups\".$dateoutput.\".\".$format;\n break;\n }\n \n // Output it into the correct format\n $result = db::returnallrows($sql);\n \n // OPEN THE FILE FOR OUTPUT\n $fp = fopen($path,'w');\n \n fwrite($fp,$headoutput);\n // Loop through each of the entities\n foreach($result as $row){\n // Get the row data and output\n $nextline = \"\";\n \n if($format == \"xml\"){\n $nextline .= \"<member id='\" . $row['memberID'] . \"'>\";\n $nextline .= \"<Title>\" . $row['prefix'] . \"</Title> \n <Firstname>\" . $row['firstname'] . \"</Firstname>\n <Middlename>\" . $row['middlename'] . \"</Middlename>\n <Surname>\" . $row['surname'] . \"</Surname>\n <Email>\" . $row['email'] . \"</Email>\n <Phone>\" . $row['homephone'] . \"</Phone>\n <Mobile>\" . $row['mobilephone'] . \"</Mobile>\n <Address1>\" . $row['address1'] . \"</Address1>\n <Address2>\" . $row['address2'] . \"</Address2>\n <Address3>\" . $row['address3'] . \"</Address3>\n <Postcode>\" . $row['postcode'] . \"</Postcode>\n <Country>\" . $row['country'] . \"</Country>\n <WorkPhone>\" . $row['workphonenumber'] . \"</WorkPhone>\n <WorkEmail>\" . $row['workemail'] . \"</WorkEmail>\n <WorkFax>\" . $row['workfaxnumber'] . \"</WorkFax>\n <WorkWebsite>\" . $row['workwebsite'] . \"</WorkWebsite>\n <MemberType>\" . $row['memberStatus'] . \"</MemberType>\n \";\n if($area == \"groups\"){\n $nextline .= \"<GroupName>\" . $row['groupname'] . \"</GroupName>\n <GroupDescription>\" . $row['groupdescription'] . \"</GroupDescription>\n \";\n }\n $nextline .= \"</member>\\r\\n\";\n }\n \n \n \n // IF XML ADD THE CLOSING MEMBER ENTRY\n if($format == \"csv\"){\n $nextline .= $row['prefix'] . \",\" . $row['firstname'] . \",\" . $row['middlename'] . \",\" . $row['surname'] . \",\" . $row['email'] . \",\" . $row['homephone'] . \",\" . $row['mobilephone'] . \",\" . $row['address1'] . \",\" . $row['address2'] . \",\" . $row['address3'] . \",\" . $row['postcode'] . \",\" . $row['country'];\n $nextline .= \",\" . $row['workphonenumber']. \",\" . $row['workfaxnumnber']. \",\" . $row['workemail']. \",\" . $row['workwebsite']. \",\" . $row['memberStatus'];\n \n if($area == \"groups\"){\n $nextline .= \",\" . $row['groupname'] . \",\" . $row['groupdescription'];\n }\n $nextline .= \"\\r\\n\";\n }\n // WRITE THE LINE TO THE FILE\n fwrite($fp,$nextline);\n }\n if($format == \"xml\"){\n fwrite($fp, '</kongreg8db>\\n');\n }\n fclose($fp);\n return;\n }",
"private function getDatFilePath()\n\t{\n\t\treturn Zend_Registry::get('config')->get('minecraft')->get('worldPath') . '/world/players/' . $this->_username . '.dat';\n\t}",
"protected function _createDirs()\n {\n $dir = $this->_class_dir;\n \n if (! file_exists($dir)) {\n $this->_outln('Creating app directory.');\n mkdir($dir, 0755, true);\n } else {\n $this->_outln('App directory exists.');\n }\n \n $list = array('Layout', 'Locale', 'Public', 'View');\n \n foreach ($list as $sub) {\n if (! file_exists(\"$dir/$sub\")) {\n $this->_outln(\"Creating app $sub directory.\");\n mkdir(\"$dir/$sub\", 0755, true);\n } else {\n $this->_outln(\"App $sub directory exists.\");\n }\n }\n }",
"public function getOutputDir()\n {\n $folder = str_replace('\\\\', '/', get_called_class());\n $folder = preg_replace('#^PrestaShop/PSTAF/#', '', $folder);\n\n $dir = FS::join('test-results', $folder);\n\n if (!is_dir($dir)) {\n mkdir($dir, 0777, true);\n }\n\n return $dir;\n }",
"function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}",
"protected function createDirectories() {\n\t\t@mkdir($this->getAbsoluteBasePath(), 0777, TRUE); // @ - Directories may exist\n\t}",
"function createDirectory($training_id){\n\t\t$main_folder = \"./../training_documents\";\n\t\tif(is_dir($main_folder)===false){\n\t\t\tmkdir($main_folder);\t\t\n\t\t}\n\t\tif(is_dir($main_folder.\"/\".$training_id)===false){\n\t\t\tmkdir($main_folder.\"/\".$training_id);\t\n\t\t}\n\t\treturn $training_id;\n\t}",
"protected function assignSeedsDir()\n {\n $this->seeds_dir = '';\n }",
"protected function checkOutputPaths()\n {\n /* Uncomment iff shared dir is brought back */\n /* if (!is_dir($this->baseExportDir . self::SHARED_DIR_DOWNLOADS . '/' . $this->accountID)) { */\n /* mkdir($this->baseExportDir . self::SHARED_DIR_DOWNLOADS . '/' . $this->accountID); */\n /* chmod($this->baseExportDir . self::SHARED_DIR_DOWNLOADS . '/' . $this->accountID, 0777); */\n /* } */\n\n if (!is_dir($this->baseExportDir . '/'. $this->accountID)) {\n mkdir($this->baseExportDir . '/'. $this->accountID);\n chmod($this->baseExportDir . '/'. $this->accountID, 0777);\n }\n\n if (!is_dir($this->commissionsOutPath)) {\n mkdir($this->commissionsOutPath);\n chmod($this->commissionsOutPath, 0777);\n }\n\n if (!is_dir($this->settingsOutPath)) {\n mkdir($this->settingsOutPath);\n chmod($this->settingsOutPath, 0777);\n }\n\n if (!is_dir($this->dailyFileOutPath)) {\n mkdir($this->dailyFileOutPath);\n chmod($this->dailyFileOutPath, 0777);\n }\n\n if (!is_dir($this->monthlyFileOutPath)) {\n mkdir($this->monthlyFileOutPath);\n chmod($this->monthlyFileOutPath, 0777);\n }\n\n if (!is_dir($this->metaFileOutPath)) {\n mkdir($this->metaFileOutPath);\n chmod($this->metaFileOutPath, 0777);\n }\n }",
"protected function getTestData(){\n\t\treturn \"application/testdata/Pagers.php\" ;\n\t}"
] | [
"0.71233654",
"0.6599585",
"0.6466034",
"0.6425255",
"0.6224391",
"0.59461343",
"0.58316",
"0.5826815",
"0.5776275",
"0.577291",
"0.5707089",
"0.5669395",
"0.5567984",
"0.5466869",
"0.5404557",
"0.5390497",
"0.5372604",
"0.53137654",
"0.5299719",
"0.5281254",
"0.5279568",
"0.527415",
"0.5266727",
"0.5228414",
"0.52153945",
"0.52087694",
"0.51771337",
"0.51729",
"0.5135885",
"0.5135104",
"0.5124554",
"0.5117575",
"0.51167196",
"0.5098259",
"0.50945127",
"0.50856674",
"0.508541",
"0.5077847",
"0.5068919",
"0.5068737",
"0.506215",
"0.50510174",
"0.5042262",
"0.5031412",
"0.502556",
"0.50158346",
"0.49540654",
"0.49539027",
"0.49463925",
"0.49370453",
"0.49300733",
"0.4920233",
"0.4904986",
"0.4890788",
"0.48835504",
"0.48764047",
"0.48749366",
"0.48716545",
"0.4865168",
"0.48586607",
"0.48510894",
"0.4850433",
"0.48489386",
"0.48386413",
"0.48317036",
"0.48253745",
"0.48132375",
"0.48116824",
"0.47991624",
"0.47944105",
"0.47941443",
"0.47822264",
"0.47820336",
"0.47603878",
"0.4757589",
"0.47529346",
"0.47478113",
"0.47460952",
"0.47450587",
"0.47346485",
"0.4731317",
"0.47299835",
"0.47276345",
"0.4721034",
"0.47145733",
"0.4711471",
"0.4711015",
"0.4711015",
"0.47109124",
"0.47045466",
"0.4703492",
"0.46956897",
"0.4688318",
"0.4680324",
"0.46796575",
"0.46737",
"0.46728462",
"0.46697482",
"0.4662504",
"0.4649337"
] | 0.77968264 | 0 |
Get profile fields (DEPRECATED, use ilUserProfile() instead) | static function &getProfileFields()
{
include_once("./Services/User/classes/class.ilUserProfile.php");
$up = new ilUserProfile();
$up->skipField("username");
$up->skipField("roles");
$up->skipGroup("preferences");
$fds = $up->getStandardFields();
foreach ($fds as $k => $f)
{
$profile_fields[] = $k;
}
return $profile_fields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getProfileFields(){\n \n\t\tif(self::$profileFields == null){\n\t\t\t$prefix = Engine_Db_Table::getTablePrefix();\n\t\t\t$adapter = Engine_Db_Table::getDefaultAdapter();\n\t\t\t$sql = \"SELECT engine4_user_fields_meta.* FROM `engine4_user_fields_maps` \n\t\t\t\t\tjoin engine4_user_fields_meta on (engine4_user_fields_maps.child_id = engine4_user_fields_meta.field_id )\n\t\t\t\t\twhere engine4_user_fields_maps.option_id = 1 \n\t\t\t\t\tand engine4_user_fields_meta.type NOT IN ('profile_type','heading','gender','birthdate')\n\t\t\t\t\t\";\n\t\t\t\n\t\t\tself::$profileFields = $adapter->fetchAll($sql);\n\t\t}\n\t\treturn self::$profileFields;\n\t}",
"public function getProfileInfo()\n\t{\n\t\t$data = $this->get($this->_objectType . $this->_objectId);\n\t\treturn $data;\n\t\t$fields = array();\n\t\tforeach ($data as $fieldName => $fieldValue)\n\t\t{\n\t\t\t$fields[$fieldName] = $fieldValue;\n\t\t}\n\t\t$this->_fields = $fields;\n\t\treturn $this->_fields;\n\t}",
"public static function get_mappable_profile_fields();",
"public function getUserProfile();",
"public static function sql_user_admin_profile() {\n\t\tglobal $wpdb;\n\n\t\t$profile_user_fields = $wpdb->get_results( \"SELECT * FROM {$wpdb->base_prefix}pp_profile_fields\" );\n\n\t\treturn $profile_user_fields;\n\t}",
"function get_profile($field, $user = \\false)\n {\n }",
"function auth_saml2_profile_get_custom_fields($onlyinuserobject = false) {\n global $DB, $CFG;\n\n // Get all the fields.\n $fields = $DB->get_records('user_info_field', null, 'id ASC');\n\n // If only doing the user object ones, unset the rest.\n if ($onlyinuserobject) {\n foreach ($fields as $id => $field) {\n require_once($CFG->dirroot . '/user/profile/field/' .\n $field->datatype . '/field.class.php');\n $newfield = 'profile_field_' . $field->datatype;\n $formfield = new $newfield();\n if (!$formfield->is_user_object_data()) {\n unset($fields[$id]);\n }\n }\n }\n\n return $fields;\n}",
"abstract protected function getUserProfile();",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getUserProfileDetails()\n {\n // Obtain the authenticated user's id.\n $id = Auth::id();\n\n // Query to obtain the user's profile details.\n $userDetails = User::select('first_name', 'last_name', 'email', 'max_fuel_limit', 'max_distance_limit')->where('user_id', $id)->first();\n\n // Return the selected details.\n return $userDetails;\n }",
"function theme_haarlem_intranet_get_profile_manager_profile_field($metadata_name) {\n\tstatic $fields;\n\t\n\tif (!isset($fields)) {\n\t\t$fields = array();\n\t\t\n\t\tif (elgg_is_active_plugin('profile_manager')) {\n\t\t\t$site = elgg_get_site_entity();\n\t\t\t\n\t\t\t$options = array(\n\t\t\t\t'type' => 'object',\n\t\t\t\t'subtype' => ProfileManagerCustomProfileField::SUBTYPE,\n\t\t\t\t'limit' => false,\n\t\t\t\t'owner_guid' => $site->getGUID(),\n\t\t\t\t'site_guid' => $site->getGUID()\n\t\t\t);\n\t\t\t$profile_fields = elgg_get_entities($options);\n\t\t\tif (!empty($profile_fields)) {\n\t\t\t\tforeach ($profile_fields as $profile_field) {\n\t\t\t\t\t$fields[$profile_field->metadata_name] = $profile_field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn elgg_extract($metadata_name, $fields, false);\n}",
"public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"function display_user_profile_fields() {\r\n global $wpdb, $user_id, $wpi_settings;\r\n $profileuser = get_user_to_edit($user_id);\r\n\r\n include($wpi_settings['admin']['ui_path'] . '/profile_page_content.php');\r\n }",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getInfos($fields)\n {\n $users_infos = sfFacebook::getFacebookApi()->users_getInfo(array($this->getCurrentFacebookUid()),$fields);\n\n return reset($users_infos);\n }",
"function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}",
"public static function getListOfUserFields()\n {\n // so, list needs to be manually updated\n return array(\n \"morgid\",\n \"garageid\",\n \"talkid\",\n \"username\",\n \"password\",\n \"joindate\",\n \"title\",\n \"firstname\",\n \"lastname\",\n \"birthdate\",\n \"street\",\n \"postcode\",\n \"city\",\n \"country\",\n \"ccode\",\n \"email\",\n \"phone\",\n \"fax\",\n \"homepage\",\n \"jabber\",\n \"icq\",\n \"aim\",\n \"yahoo\",\n \"msn\",\n \"skype\",\n );\n }",
"public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function loadProfileInformation() {\n\t\t\t$procedure = \"get\" . $this->mode_ . \"Information\"; \n\t\t\t$this->profileInformation_ = $this->dbHandler_->call($procedure, \"%d\", array($this->id_));\n\t\t}",
"function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}",
"public function raasGetCustomFields()\n {\n $url = RAAS_DOMAIN . \"/api/v2/userprofile/fields?apikey=\" . RAAS_API_KEY . \"&apisecret=\" . RAAS_SECRET_KEY;\n $response = $this->raasGetResponseFromRaas($url);\n return isset($response->CustomFields) ? $response->CustomFields : '';\n }",
"public function GetProfile()\n {\n return $this->profile;\n }",
"public function get_user_information($profile_id)\n\t{\n\t\treturn $this->ci->profile_model->get_user_information($profile_id);\n\t}",
"public function profile() {\n return $this->profile;\n }",
"public function get_profile_data() {\n\t\treturn $this->db->get_where('users', array('id' => $this->session->userdata('user_id')))->row_array();\n\t}",
"protected function getFields()\n {\n return array(\n 'user_id',\n 'name',\n 'oauth_user_id',\n 'username',\n 'pic_url',\n 'oauth_provider',\n 'token',\n 'secret'\n );\n }",
"public function getProfile()\n {\n return $this->request('me');\n }",
"static function sql_wp_list_table_profile_fields() {\n\t\tglobal $wpdb;\n\n\t\t$sql = $wpdb->get_results( \"SELECT * FROM {$wpdb->base_prefix}pp_profile_fields\", 'ARRAY_A' );\n\n\t\treturn $sql;\n\t}",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function getUserFields()\r\n {\r\n return CrugeFactory::get()->getICrugeFieldListModels();\r\n }",
"public function getInfo_Raw()\n {\n $raw = $this->provider->makeQuery('SELECT '.implode(',', self::_getUserFacebookFieldsMap()).' FROM user WHERE uid = me()');\n lmb_assert_true(count($raw));\n return $raw[0];\n }",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }",
"function user_get_profile_data($id = null)\n\t{\n\t\t$uid = ($id == null) ? $this->user_getid() : $id; //If ID is null, then fetch *this* user profile\n\t\t$columns = $this->DB->database_build_query('USER_PROFILE');\n\t\t$profile = $this->DB->database_select('users', $columns,\n\t\t\t\t\t\t array('uid' => $uid), 1);\n\t\tif($profile == FALSE)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $profile;\n\t}",
"function d4os_io_db_070_users_add_extra_fields(&$user) {\n if (module_exists('d4os_io_services_profile')) {\n $properties = d4os_io_db_070_os_profile_services_avatar_properties_request(array('avatar_id' => $user->UUID));\n if (isset($properties['data'][0])) {\n $user->profileURL = $properties['data'][0]['ProfileUrl'];\n $user->profileImage = $properties['data'][0]['Image'];\n $user->profileAboutText = $properties['data'][0]['AboutText'];\n $user->profileFirstImage = $properties['data'][0]['FirstLifeImage'];\n $user->profileFirstText = $properties['data'][0]['FirstLifeAboutText'];\n $user->profilePartner = $properties['data'][0]['Partner'];\n\n //$user->profileAllowPublish = $properties['data'][0]['profileAllowPublish'];\n //$user->profileMaturePublish = $properties['data'][0]['profileMaturePublish'];\n\n // interests\n $user->profileWantDoMask = $properties['data'][0]['wantmask'];\n $user->profileWantToText = $properties['data'][0]['wanttext'];\n $user->profileSkillsMask = $properties['data'][0]['skillsmask'];\n $user->profileSkillsText = $properties['data'][0]['skillstext'];\n $user->profileLanguages = $properties['data'][0]['languages'];\n }\n }\n}",
"public function getUserfield();",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->getProfile( $this->api->getCurrentUserId() );\r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t}\r\n\r\n\t\tif ( ! is_object( $data ) )\r\n\t\t{\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalide response.\", 6 );\r\n\t\t} \r\n\r\n\t\t$this->user->profile->identifier = $this->api->getCurrentUserId();\r\n\t\t$this->user->profile->displayName \t= @ $data->basicprofile->name;\r\n\t\t$this->user->profile->description \t= @ $data->aboutme;\r\n\t\t$this->user->profile->gender \t= @ $data->basicprofile->gender;\r\n\t\t$this->user->profile->photoURL \t= @ $data->basicprofile->image;\r\n\t\t$this->user->profile->profileURL \t= @ $data->basicprofile->webUri;\r\n\t\t$this->user->profile->age \t\t\t= @ $data->age;\r\n\t\t$this->user->profile->country \t\t= @ $data->country;\r\n\t\t$this->user->profile->region \t\t= @ $data->region;\r\n\t\t$this->user->profile->city \t\t\t= @ $data->city;\r\n\t\t$this->user->profile->zip \t\t\t= @ $data->postalcode;\r\n\r\n\t\treturn $this->user->profile;\r\n\t}",
"public function get_profile($field = null, $default = null)\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isset($this->user[static::_column('profile')]))\n\t\t{\n\t\t\tis_array($this->user[static::_column('profile')]) or $this->user[static::_column('profile')] = @unserialize($this->user[static::_column('profile')]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->user[static::_column('profile')] = array();\n\t\t}\n\n\t\treturn is_null($field) ? $this->user[static::_column('profile')] : \\Arr::get($this->user[static::_column('profile')], $field, $default);\n\t}",
"public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }",
"public function profileDetails()\n {\n $processReaction = $this->userEngine->prepareProfileDetails();\n\n return __processResponse($processReaction, [], null, true);\n }",
"public function getProfilePicture();",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}",
"private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }",
"public function getProfile()\n {\n $profile = new \\login\\user\\Profile($this->db);\n if (array_key_exists('profile_id', $this->data)) {\n $profile->loadFromId($this->data['profile_id']);\n }\n return $profile;\n }",
"static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }",
"public function getUserProfile() {\n\n\t\t$data = $this->api->get( 'people/~:('. implode(',', $this->config['fields']) .')?format=json' );\n\n\t\t// if the provider identifier is not received, we assume the auth has failed\n\t\tif ( ! isset( $data->id ) ) {\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response: \" . Hybrid_Logger::dumpData( $data ), 6 );\n\t\t}\n\n\t\t// # store the user profile.\n\t\t$this->user->profile->identifier = ( property_exists ( $data, 'id' ) ) ? $data->id : '';\n\t\t$this->user->profile->firstName = ( property_exists ( $data, 'firstName' ) ) ? $data->firstName : '';\n\t\t$this->user->profile->lastName = ( property_exists ( $data, 'lastName' ) ) ? $data->lastName : '';\n\t\t$this->user->profile->profileURL = ( property_exists ( $data, 'publicProfileUrl' ) ) ? $data->publicProfileUrl : '';\n\t\t$this->user->profile->email = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->emailVerified = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->photoURL = ( property_exists ( $data, 'pictureUrl' ) ) ? $data->pictureUrl : '';\n\t\t$this->user->profile->description = ( property_exists ( $data, 'summary' ) ) ? $data->summary : '';\n\t\t$this->user->profile->country = ( property_exists ( $data, 'country' ) ) ? strtoupper( $data->country ) : '';\n\t\t$this->user->profile->displayName = trim( $this->user->profile->firstName . ' ' . $this->user->profile->lastName );\n\n\t\tif ( property_exists( $data, 'phoneNumbers' ) && property_exists( $data->phoneNumbers, 'phoneNumber' ) ) {\n\t\t\t$this->user->profile->phone = (string) $data->phoneNumbers->phoneNumber;\n\t\t} else {\n\t\t\t$this->user->profile->phone = null;\n\t\t}\n\n\t\tif ( property_exists( $data, 'dateOfBirth' ) ) {\n\t\t\t$this->user->profile->birthDay = (string) $data->dateOfBirth->day;\n\t\t\t$this->user->profile->birthMonth = (string) $data->dateOfBirth->month;\n\t\t\t$this->user->profile->birthYear = (string) $data->dateOfBirth->year;\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"public function get_fields() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"SELECT email, username FROM users WHERE user_id = '$this->user_id'\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\tlist($this->email, $this->username) = mysqli_fetch_array($result, MYSQLI_NUM);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UnexpectedValueException('UnexpectedValueException occured on method call get_fields');\r\n\t\t}\r\n\t}",
"public function getUserProfile() {\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT p.firstName, p.lastName, p.dob, p.addressFirst, p.addressSecond, p.city, p.postcode, p.mobile, p.bio\n FROM users AS u\n JOIN profiles AS p ON p.userId = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }\n }",
"public function setUserFields() {\n $fields = $this->dictionary->toArray();\n /* allow overriding of class key */\n if (empty($fields['class_key'])) $fields['class_key'] = 'modUser';\n\n $fields = $this->filterAllowedFields($fields);\n\n /* set user and profile */\n $this->user->fromArray($fields);\n $this->user->set('username',$fields[$this->controller->getProperty('usernameField','username')]);\n $this->user->set('active',0);\n $version = $this->modx->getVersionData();\n /* 2.1.x+ */\n if (version_compare($version['full_version'],'2.1.0-rc1') >= 0) {\n $this->user->set('password',$fields[$this->controller->getProperty('passwordField','password')]);\n } else { /* 2.0.x */\n $this->user->set('password',md5($fields[$this->controller->getProperty('passwordField','password')]));\n }\n $this->profile->fromArray($fields);\n $this->profile->set('email',$this->dictionary->get($this->controller->getProperty('emailField','email')));\n $this->profile->set('fullname',$fields[$this->controller->getProperty('fullnameField','fullname')]);\n $this->user->addOne($this->profile,'Profile');\n\n /* add user groups, if set */\n $userGroupsField = $this->controller->getProperty('usergroupsField','');\n $userGroups = !empty($userGroupsField) && array_key_exists($userGroupsField,$fields) ? $fields[$userGroupsField] : array();\n $this->setUserGroups($userGroups);\n }",
"public function get_profile_information($profile_id)\n\t{\n\t\treturn $this->ci->profile_model->get_profile_information($profile_id);\n\t}",
"function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }",
"function getUserProfile()\n\t{\n\t\t$response = $this->api->get( 'user/get.json' );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->id_user ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\n\t\t# store the user profile.\n\t\t$this->user->profile->identifier = (property_exists($response,'id_user'))?$response->id_user:\"\";\n\t\t$this->user->profile->displayName = (property_exists($response,'username'))?$response->username:\"\";\n\t\t$this->user->profile->profileURL = (property_exists($response,'user_url'))?$response->user_url:\"\";\n\t\t$this->user->profile->photoURL = (property_exists($response,'avatar_url'))?$response->avatar_url:\"\";\n//unknown\t\t$this->user->profile->description = (property_exists($response,'description'))?$response->description:\"\";\n\t\t$this->user->profile->firstName = (property_exists($response,'firstname'))?$response->firstname:\"\";\n\t\t$this->user->profile->lastName = (property_exists($response,'name'))?$response->name:\"\";\n\n\t\tif( property_exists($response,'gender') ) {\n\t\t\tif( $response->gender == 1 ){\n\t\t\t\t$this->user->profile->gender = \"male\";\n\t\t\t}\n\t\t\telseif( $response->gender == 2 ){\n\t\t\t\t$this->user->profile->gender = \"female\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->user->profile->gender = \"\";\n\t\t\t}\n\t\t}\n\n\t\t$this->user->profile->language = (property_exists($response,'lang'))?$response->lang:\"\";\n\n\t\tif( property_exists( $response,'birth_date' ) && $response->birth_date ) {\n $birthday = date_parse($response->birth_date);\n\t\t\t$this->user->profile->birthDay = $birthday[\"day\"];\n\t\t\t$this->user->profile->birthMonth = $birthday[\"month\"];\n\t\t\t$this->user->profile->birthYear = $birthday[\"year\"];\n\t\t}\n\n\t\t$this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n\t\t$this->user->profile->emailVerified = (property_exists($response,'email'))?$response->email:\"\";\n\n//unknown\t\t$this->user->profile->phone = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->address = (property_exists($response,'address1'))?$response->address1:\"\";\n\t\t$this->user->profile->address .= (property_exists($response,'address2'))?$response->address2:\"\";\n\t\t$this->user->profile->country = (property_exists($response,'country'))?$response->country:\"\";\n//unknown\t\t$this->user->profile->region = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->city = (property_exists($response,'city'))?$response->city:\"\";\n\t\t$this->user->profile->zip = (property_exists($response,'postalcode'))?$response->postalcode:\"\";\n\n\t\treturn $this->user->profile;\n\t}",
"public function profilefields(){\r\n\t\t\t$this->load_type('professions', array($this->lang));\r\n\t\t\t$this->load_type('realmlist', array($this->lang));\r\n\t\t\t$xml_fields = array(\r\n\t\t\t\t\t'level'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'spinner',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'character',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_level',\r\n\t\t\t\t\t\t\t'max'\t\t\t=> 65,\r\n\t\t\t\t\t\t\t'min'\t\t\t=> 1,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 4\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf1'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_1',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf2'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_2',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf3'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_3',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf4'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_4',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf5'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_5',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf6'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_6',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf7'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_7',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf8'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_8',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf9'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_9',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf10'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_10',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf11'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_11',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf12'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_12',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'ruf13'\t=> array(\r\n\t\t\t\t\t\t\t'type'\t\t\t=> 'dropdown',\r\n\t\t\t\t\t\t\t'category'\t\t=> 'uc_ruf',\r\n\t\t\t\t\t\t\t'lang'\t\t\t=> 'uc_ruf_13',\r\n\t\t\t\t\t\t\t'options'\t\t=> array(''=>'', 'I' => 'I', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'),\r\n\t\t\t\t\t\t\t'tolang'\t\t=> true,\r\n\t\t\t\t\t\t\t'undeletable'\t=> false,\r\n\t\t\t\t\t\t\t'sort'\t\t\t=> 1\r\n\t\t\t\t\t),\r\n\t\t\t);\r\n\t\t\treturn $xml_fields;\r\n\t\t}",
"public function getAllProfiles()\n {\n return self::$profiles;\n }",
"function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}",
"function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}",
"function get_fields()\n\t{\n\t\trequire_code('ocf_members');\n\n\t\t$indexes=collapse_2d_complexity('i_fields','i_name',$GLOBALS['FORUM_DB']->query_select('db_meta_indices',array('i_fields','i_name'),array('i_table'=>'f_member_custom_fields'),'ORDER BY i_name'));\n\n\t\t$fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\trequire_code('fields');\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('field_'.strval($row['id']),$indexes)) continue;\n\n\t\t\t\t$ob=get_fields_hook($row['cf_type']);\n\t\t\t\t$temp=$ob->get_search_inputter($row);\n\t\t\t\tif (is_null($temp))\n\t\t\t\t{\n\t\t\t\t\t$type='_TEXT';\n\t\t\t\t\t$special=make_string_tempcode(get_param('option_'.strval($row['id']),''));\n\t\t\t\t\t$display=$row['trans_name'];\n\t\t\t\t\t$fields[]=array('NAME'=>strval($row['id']),'DISPLAY'=>$display,'TYPE'=>$type,'SPECIAL'=>$special);\n\t\t\t\t} else $fields=array_merge($fields,$temp);\n\t\t\t}\n\n\t\t\t$age_range=get_param('option__age_range',get_param('option__age_range_from','').'-'.get_param('option__age_range_to',''));\n\t\t\t$fields[]=array('NAME'=>'_age_range','DISPLAY'=>do_lang_tempcode('AGE_RANGE'),'TYPE'=>'_TEXT','SPECIAL'=>$age_range);\n\t\t}\n\n\t\t$map=has_specific_permission(get_member(),'see_hidden_groups')?array():array('g_hidden'=>0);\n\t\t$group_count=$GLOBALS['FORUM_DB']->query_value('f_groups','COUNT(*)');\n\t\tif ($group_count>300) $map['g_is_private_club']=0;\n\t\tif ($map==array()) $map=NULL;\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map,'ORDER BY g_order');\n\t\t$groups=form_input_list_entry('',true,'---');\n\t\t$default_group=get_param('option__user_group','');\n\t\t$group_titles=array();\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$row['text_original']=get_translated_text($row['g_name'],$GLOBALS['FORUM_DB']);\n\n\t\t\tif ($row['id']==db_get_first_id()) continue;\n\t\t\t$groups->attach(form_input_list_entry(strval($row['id']),strval($row['id'])==$default_group,$row['text_original']));\n\t\t\t$group_titles[$row['id']]=$row['text_original'];\n\t\t}\n\t\tif (strpos($default_group,',')!==false)\n\t\t{\n\t\t\t$bits=explode(',',$default_group);\n\t\t\t$combination=new ocp_tempcode();\n\t\t\tforeach ($bits as $bit)\n\t\t\t{\n\t\t\t\tif (!$combination->is_empty()) $combination->attach(do_lang_tempcode('LIST_SEP'));\n\t\t\t\t$combination->attach(escape_html(@$group_titles[intval($bit)]));\n\t\t\t}\n\t\t\t$groups->attach(form_input_list_entry(strval($default_group),true,do_lang_tempcode('USERGROUP_SEARCH_COMBO',escape_html($combination))));\n\t\t}\n\t\t$fields[]=array('NAME'=>'_user_group','DISPLAY'=>do_lang_tempcode('GROUP'),'TYPE'=>'_LIST','SPECIAL'=>$groups);\n\t\tif (has_specific_permission(get_member(),'see_hidden_groups'))\n// $fields[]=array('NAME'=>'_photo_thumb_url','DISPLAY'=>do_lang('PHOTO'),'TYPE'=>'','SPECIAL'=>'','CHECKED'=>false);\n\t\t{\n\t\t\t//$fields[]=array('NAME'=>'_emails_only','DISPLAY'=>do_lang_tempcode('EMAILS_ONLY'),'TYPE'=>'_TICK','SPECIAL'=>'');\tCSV export better now\n\t\t}\n\n\t\treturn $fields;\n\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"public static function getProfiles()\n {\n $db = DataBase::connect();\n\n $result = $db->query('SELECT * FROM `profile`');\n\n $profiles = [];\n\n $i = 1;\n\n while($row = $result->fetch()) {\n\n $profiles[$i]['profile'] = $row['profile'];\n $profiles[$i]['ukr_title'] = $row['ukr_title'];\n $profiles[$i]['upper_ukr_title'] = $row['upper_ukr_title'];\n\n $i++;\n }\n return $profiles;\n }",
"private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }",
"public function profileInfo()\n {\n\n return response()->json(User::where('id', '=', Auth::user()->id)->get());\n }",
"function auth_retrieve_user_properties($db, $user_id)\r\r\n{\r\r\n $result_user = func_db_query($db, \"SELECT user_id, username, email, display_name, status, activation_code, first_name, last_name, address, city, \"\r\r\n . \"state, post_code, country, phone1, phone2, phone3, date_of_birth, last_active, post_count, avatar, tag_line, attribute1, \"\r\r\n . \"attribute2, attribute3, attribute4, attribute5, attribute6, attribute7, attribute8, attribute9, attribute10 \"\r\r\n . \"FROM @TABLE_PREFIX@nx3_user WHERE user_id = ? LIMIT 1\", array(\"i\", $user_id));\r\r\n foreach ($result_user[0] as $field => $value)\r\r\n {\r\r\n $_SESSION['NX3_USER'][$field] = $value;\r\r\n }\r\r\n}",
"function GetProfileDetails(){\n\t\t$this->load->model('User_model');\n\t\t\n\t\t$this->user_id = $this->User_model->Get_User_ID_By_Token($this->user_auth_id); //Just Like a call to require ID of USER\n\t\t//Did this because the user_id might be set but above function just represents auth ID and sends to model to deliver real ID\n\t\t\n\t\t$this->db->select('firstname,lastname,auth_token,program_name,level,grad_year');\n\t\t$this->db->from('users');\n\t\t$this->db->join('programs', 'programs.program_id = users.program_id');\n\t\t$this->db->join('students', 'students.user_id = users.user_id');\n\t\t$this->db->where('users.user_id', $this->user_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\t$results = $query->result_array();\n\t\t\n\t\treturn $results[0];\n\t}",
"public function index()\n {\n $user_id = Auth::id();\n $user_info = Profile::where('user_id', $user_id)->get();\n\n return $user_info;\n }",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->api('/me'); \r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t} \r\n\r\n\t\t// if the provider identifier is not recived, we assume the auth has failed\r\n\t\tif ( ! isset( $data[\"id\"] ) )\r\n\t\t{ \r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\r\n\t\t}\r\n\r\n\t\t# store the user profile. \r\n\t\t$this->user->profile->identifier = @ $data['id'];\r\n\t\t$this->user->profile->displayName = @ $data['name'];\r\n\t\t$this->user->profile->firstName = @ $data['first_name'];\r\n\t\t$this->user->profile->lastName \t= @ $data['last_name'];\r\n\t\t$this->user->profile->photoURL = \"https://graph.facebook.com/\" . $this->user->profile->identifier . \"/picture\";\r\n\t\t$this->user->profile->profileURL \t= @ $data['link']; \r\n\t\t$this->user->profile->webSiteURL \t= @ $data['website']; \r\n\t\t$this->user->profile->gender \t= @ $data['gender'];\r\n\t\t$this->user->profile->description \t= @ $data['bio'];\r\n\t\t$this->user->profile->email \t= @ $data['email'];\r\n\t\t$this->user->profile->region \t= @ $data['hometown'][\"name\"];\r\n\r\n\t\tif( isset( $data['birthday'] ) ) {\r\n\t\t\tlist($birthday_month, $birthday_day, $birthday_year) = @ explode('/', $data['birthday'] );\r\n\r\n\t\t\t$this->user->profile->birthDay = $birthday_day;\r\n\t\t\t$this->user->profile->birthMonth = $birthday_month;\r\n\t\t\t$this->user->profile->birthYear = $birthday_year;\r\n\t\t}\r\n\r\n\t\treturn $this->user->profile;\r\n \t}",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"function paces_get_users_all_details( $user_id ){\n return get_metadata( 'user', $user_id );\n}",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function woo_slg_get_linkedin_user_data() {\n\t\t\t\n\t\t\t$user_profile_data = '';\n\t\t\t\n\t\t\t$user_profile_data = \\WSL\\Persistent\\WOOSLGPersistent::get('woo_slg_linkedin_user_cache');\n\t\t\t\n\t\t\t\\WSL\\Persistent\\WOOSLGPersistent::delete('woo_slg_linkedin_user_cache');\n\n\t\t\treturn $user_profile_data;\n\t\t}",
"function info()\n\t{\n\t\tif (get_forum_type()!='ocf') return NULL;\n\t\tif (($GLOBALS['FORUM_DB']->query_value('f_members','COUNT(*)')<=3) && (get_param('id','')!='ocf_members') && (get_param_integer('search_ocf_members',0)!=1)) return NULL;\n\n\t\trequire_lang('ocf');\n\n\t\t$info=array();\n\t\t$info['lang']=do_lang_tempcode('MEMBERS');\n\t\t$info['default']=false;\n\t\t$info['special_on']=array();\n\t\t$info['special_off']=array();\n\t\t$info['user_label']=do_lang_tempcode('USERNAME');\n\t\t$info['days_label']=do_lang_tempcode('JOINED_AGO');\n\n\t\t$extra_sort_fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\trequire_code('ocf_members');\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\t$extra_sort_fields['field_'.strval($row['id'])]=$row['trans_name'];\n\t\t\t}\n\t\t}\n\t\t$info['extra_sort_fields']=$extra_sort_fields;\n\n\t\treturn $info;\n\t}",
"function Pico_GetProfileFieldData($profile_id, $values = array())\n{\n\tglobal $db;\n\t$profile_fields = DB_PREFIX . 'user_profile_fields';\n\t\n\t$fields = $db->force_multi_assoc('SELECT * FROM `'.$profile_fields.'` WHERE `profile_id`=? AND `display`=? ORDER BY `position` ASC', $profile_id, 1);\n\t$return = array();\n\t\n\tif (is_array($fields))\n\t{\n\t\tforeach ($fields as $f)\n\t\t{\n\t\t\t$item = array();\n\t\t\t$item['name'] = $f['name'];\n\t\t\t$item['pattern'] = $f['pattern'];\n\t\t\t$item['required'] = $f['required'];\n\t\t\t$item['options'] = $f['options'];\n\t\t\t$item['caption'] = $f['caption'];\n\t\t\t$item['type'] = $f['type'];\n\t\t\t$item['id'] = $f['field_id'];\n\t\t\t\n\t\t\t$f_id = $f['field_id'];\n\t\t\t\n\t\t\t$value = $values['field_' . $f_id];\n\t\t\t\n\t\t\tswitch($f['type'])\n\t\t\t{\n\t\t\t\tcase 'text':\n\t\t\t\t\t$html = '<input type=\"text\" name=\"field_'.$f_id.'\" class=\"text\" value=\"'.$value.'\" />';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'radio':\n\t\t\t\t\t$html = '';\n\t\t\t\t\t$options = explode(\"\\n\", trim($f['options']));\n\t\t\t\t\tif (sizeof($options) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($options as $o)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$value = str_replace('\"', '\\\"', $value);\n\t\t\t\t\t\t\t$o_value = str_replace('\"', '\\\"', $o);\n\t\t\t\t\t\t\t$checked = ($value == $o_value) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$html .= '<input type=\"radio\" name=\"field_'.$f_id.'\" value=\"'.$o.'\" '.$checked.' /> ' . $o;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'dropdown':\n\t\t\t\t\t$html = '<div class=\"select_bg\"><select name=\"field_'.$f_id.'\">';\n\t\t\t\t\t$options = explode(\"\\n\", trim($f['options']));\n\t\t\t\t\tif (sizeof($options) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($options as $o)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$value = str_replace('\"', '\\\"', $value);\n\t\t\t\t\t\t\t$o_value = str_replace('\"', '\\\"', $o);\n\t\t\t\t\t\t\t$selected = ($value == $o_value) ? 'selected=\"selected\"' : '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$html .= '<option value=\"'.$o_value.'\" '.$selected.'>'.$o.'</option>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$html .= '</select></div>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\t$checked = ($value == 1) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t$html = '<input type=\"checkbox\" class=\"checkbox\" name=\"field_'.$f_id.'\" value=\"1\" '.$checked.' />';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'check_list':\n\t\t\t\t\tif (!is_array($value)) { $value = unserialize($value); }\n\t\t\t\t\tif (!is_array($value)) { $value = array(); }\n\t\t\t\t\t$html = '';\n\t\t\t\t\t$options = explode(\"\\n\", trim($f['options']));\n\t\t\t\t\t\n\t\t\t\t\tif (sizeof($value) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($value as $k => $v)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$value[$k] = stripslashes($v);\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//echo '<pre>'.print_r($value, true).'</pre>';\n\t\t\t\t\t\n\t\t\t\t\tif (sizeof($options) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($options as $o)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$o_value = str_replace('\"', '\\\"', $o);\n\t\t\t\t\t\t\t$checked = (in_array($o, $value)) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$html .= '<input type=\"checkbox\" class=\"checklist\" name=\"field_'.$f_id.'[]\" value=\"'.$o_value.'\" '.$checked.' /> ' . $o . '<br />';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'terms':\n\t\t\t\t\t$checked = ($value == 1) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t$html = '<textarea class=\"terms\" readonly=\"readonly\">'.$f['options'].'</textarea><br />';\n\t\t\t\t\t$html .= '<input type=\"checkbox\" name=\"field_'.$f_id.'\" value=\"1\" '.$checked.' /> ' . $f['caption'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'lg_text':\n\t\t\t\t\t$html = '<textarea class=\"text\" class=\"textarea\" name=\"field_'.$f_id.'\">'.$value.'</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\tif ( (!is_array($value)) and (is_numeric($value)) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$v = $value;\n\t\t\t\t\t\t$value = array();\n\t\t\t\t\t\t$value['month'] = date('m', $v);\n\t\t\t\t\t\t$value['day'] = date('d', $v);\n\t\t\t\t\t\t$value['year'] = date('Y', $v);\n\t\t\t\t\t}\n\t\t\t\t\t$html = 'Month: <input type=\"text\" class=\"text_month\" name=\"field_'.$f_id.'[month]\" size=\"2\" maxlength=\"2\" value=\"'.$value['month'].'\" /> ';\n\t\t\t\t\t$html .= 'Day: <input type=\"text\" class=\"text_day\" name=\"field_'.$f_id.'[day]\" size=\"2\" maxlength=\"2\" value=\"'.$value['day'].'\" /> ';\n\t\t\t\t\t$html .= 'Year: <input type=\"text\" class=\"text_year\" name=\"field_'.$f_id.'[year]\" size=\"4\" maxlength=\"4\" value=\"'.$value['year'].'\" />';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'info':\n\t\t\t\t\t$html = ''; // blank\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$item['html'] = $html;\n\t\t\t$return[] = $item;\n\t\t}\n\t}\n\treturn $return;\n}",
"public static function getInfo($selected_uid) {\n\t$sql=<<<EOM\n\t select username, profile_fields as image\n\t from users\n\t where id = '$selected_uid'\n\t limit 1;\nEOM;\n $query = DB::query($sql);\n $result = $query->execute();\n return $result[0];\n }",
"public function getFieldInfo($fieldName)\n\t{\n\t\tif (empty($fieldName))\n\t\t\treturn null;\n\t\t\n\t\t// Get the whole profile info.\n\t\t$profileValues = $this->get($this->_objectType . $this->_objectId, array($fieldName));\n\t\t// Return null if the profile of the given object cannot be found.\n\t\tif (empty($profileValues))\n\t\t{\n\t\t\tif (isset($this->_fields[$fieldName]))\n\t\t\t\tunset($this->_fields[$fieldName]);\n\t\t\treturn null;\n\t\t}\n\t\t$this->_fields[$fieldName] = $profileValues[$fieldName];\n\t\treturn $profileValues[$fieldName];\n\t}",
"public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}",
"public function getUserInfo() {}",
"public function profile()\n { \n $user = Auth::user();\n $profile = $user->student;\n return $user;\n \n }",
"public function getCustomProfileFields()\n {\n list($response) = $this->getCustomProfileFieldsWithHttpInfo();\n return $response;\n }",
"abstract function getUserProfileProperty($user, $property_name);",
"public function get_user_property_info($post_data){\n $userId = $post_data['userId'];\n $shortlistedId = $post_data['shortlistedId'];\n\n $sql = \"SELECT u.firstName,s.* FROM users u ,shortlistedproperty s WHERE u.userId = $userId AND s.shortlistedId = $shortlistedId AND s.deleteFlag !=1\";\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->result_array();\n } \n }",
"public static function get_user_lookup_fields() {\n\t\t$fields = array( 'login', 'email' );\n\n\t\tif ( ITSEC_Modules::is_active( 'wordpress-tweaks' ) ) {\n\t\t\tif ( 'email' === ITSEC_Modules::get_setting( 'wordpress-tweaks', 'valid_user_login_type' ) ) {\n\t\t\t\t$fields = array( 'email' );\n\t\t\t} elseif ( 'username' === ITSEC_Modules::get_setting( 'wordpress-tweaks', 'valid_user_login_type' ) ) {\n\t\t\t\t$fields = array( 'login' );\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}",
"function prototyper_profile_get_config_fields($hook, $type, $return, $params) {\n\n\t$user = hypePrototyper()->entityFactory->build(['type' => 'user']);\n\t$fields = hypePrototyper()->prototype->fields($user, 'profile/edit');\n\n\tforeach ($fields as $field) {\n\t\t/* @var $field \\hypeJunction\\Prototyper\\Elements\\Field */\n\n\t\tif ($field->getDataType() !== 'metadata') {\n\t\t\t// only add metadata fields\n\t\t\tcontinue;\n\t\t}\n\n\t\t$shortname = $field->getShortname();\n\t\tif (!array_key_exists($shortname, $return)) {\n\t\t\t$return[$shortname] = $field->getType();\n\t\t}\n\t}\n\n\treturn $return;\n}",
"function kino_user_fields( $kino_userid, $kino_fields ) {\n\t\n\tif ( empty( $kino_userid ) ) {\n\t\t$kino_userid = bp_loggedin_user_id();\n\t}\n\t\n\tif ( empty( $kino_fields ) ) {\n\t\t$kino_fields = kino_test_fields();\n\t}\n\t\n\t$kino_userdata = array();\n\t\n\t$kino_userdata['participation'] = kino_user_participation( \n\t\t$kino_userid, \n\t\t$kino_fields\n\t);\n\t\n\t// Define our fields\n\t// Ville, Pays\n\t\n\t$kino_userdata[\"ville\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields[\"ville\"],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\t$kino_userdata[\"pays\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields[\"pays\"],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\t$kino_userdata[\"birthday\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields[\"birthday\"],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\t$kino_userdata[\"tel\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields[\"tel\"],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\t\n\t// Method to find age in years...\n\t // Simple method:\n\t $kino_birthyear = substr($kino_userdata[\"birthday\"], -4);\n\t $kino_userdata[\"userage\"] = 2015 - $kino_birthyear;\n\t\n\t// Sessions\n\t\n\t$kino_userdata[\"sessions\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['session-attribuee'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t // Disponibilité\n\t \n\t $kino_userdata[\"dispo\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['dispo'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t $kino_userdata[\"dispo-partiel\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['dispo-partiel'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t // Présentation\n\t \n\t $kino_userdata[\"presentation\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['id-presentation'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t $kino_userdata[\"photo\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['id-photo'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t // Role Technicien ??\n\t if ( in_array( \"technicien-kab\", $kino_userdata[\"participation\"] )) {\n\t \n\t\t\t\t\t\t $kino_userdata[\"role-tech\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['role-kabaret-tech'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t \n\t\t\t\t\t\t $kino_userdata[\"comp-production\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-production'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-scenario\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-scenario'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-realisation\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-realisation'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-image\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-image'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-postprod-image\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-postprod-image'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-son\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-son'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-postprod-son\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-postprod-son'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-direction-artistique\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-direction-artistique'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-hmc\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-hmc'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-autres-liste\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-autres-liste'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"comp-autres-champ\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['comp-autres-champ'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"equipement\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['equipement'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t\t\t\t\t\t $kino_userdata[\"equipement-spec\"] = bp_get_profile_field_data( array(\n\t\t\t\t\t\t \t\t'field' => $kino_fields['equipement-spec'],\n\t\t\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t\t\t ) );\n\t }\n\t \n\t // Role Comédien ??\n\t if ( in_array( \"comedien-kab\", $kino_userdata[\"participation\"] )) {\n\t \n\t\t\t\t $kino_userdata[\"role-comed\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['role-kabaret-comed'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"age-camera-min\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['age-camera-min'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"age-camera-max\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['age-camera-max'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"langue-mat\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['langue-mat'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"langue-mat-autre\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['langue-mat-autre'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"langues-parlees\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['langues-parlees'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"langues-parlees-autre\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['langues-parlees-autre'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"langues-jouees\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['langues-jouees'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"langues-jouees-autre\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['langues-jouees-autre'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"talents\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['talents'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t $kino_userdata[\"talents-autre\"] = bp_get_profile_field_data( array(\n\t\t\t\t \t\t'field' => $kino_fields['talents-autre'],\n\t\t\t\t \t\t'user_id' => $kino_userid\n\t\t\t\t ) );\n\t\t\t\t \n\t\t}\n\t \n\t // Role Réalisateur ??\n\t \n\t $kino_userdata[\"role-real\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['role-kabaret-real'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t // Is Staff ?? \n\t $kino_userdata[\"fonctions-staff\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['fonctions-staff'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\t // Véhicule\n\t \n\t $kino_userdata[\"vehicule\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['vehicule'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t $kino_userdata[\"vehicule-remarque\"] = bp_get_profile_field_data( array(\n\t \t\t'field' => $kino_fields['vehicule-remarque'],\n\t \t\t'user_id' => $kino_userid\n\t ) );\n\t \n\treturn $kino_userdata;\n\t\n}",
"public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }",
"public function getProfiles()\n {\n return $this->profiles;\n }",
"function kino_user_fields_light( $kino_userid, $kino_fields ) {\n\n\tif ( empty( $kino_userid ) ) {\n\t\t$kino_userid = bp_loggedin_user_id();\n\t}\n\t\n\tif ( empty( $kino_fields ) ) {\n\t\t$kino_fields = kino_test_fields();\n\t}\n\t\n\t$kino_userdata = array();\n\t\n\t$kino_userdata[\"ville\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields[\"ville\"],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\t$kino_userdata[\"pays\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields[\"pays\"],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\t\n\t$kino_userdata[\"presentation\"] = bp_get_profile_field_data( array(\n\t\t\t'field' => $kino_fields['id-presentation'],\n\t\t\t'user_id' => $kino_userid\n\t) );\n\n\treturn $kino_userdata;\n\n}",
"public function profile()\n {\n $id = $this->Auth->user('id');\n $user = $this->Users->get($id, [\n 'contain' => []\n ]);\n\n if ($this->request->is(['patch', 'post', 'put'])) {\n //avoid mass-assignment attack\n $options = [\n 'fieldList' => [\n 'email',\n 'username',\n 'password',\n 'first_name',\n 'last_name',\n 'address_1',\n 'address_2',\n 'suburb',\n 'state',\n 'post_code',\n 'mobile',\n 'phone',\n ]\n ];\n\n $user = $this->Users->patchEntity($user, $this->request->getData(), $options);\n if ($this->Users->save($user)) {\n\n $this->Flash->success(__('Your profile has been updated.'));\n return $this->redirect(\"/\");\n } else {\n $this->Flash->error(__('Your profile could not be updated. Please, try again.'));\n }\n }\n $this->set(compact('user'));\n $this->set('_serialize', ['user']);\n\n return null;\n }",
"public function mtii_utilities_show_extra_profile_fields($user) {\n $gender = get_the_author_meta('gender', $user->ID);\n $gender_label = $gender=='' ? 'Pick a Gender' : $gender;\n $phone_number = get_the_author_meta('phone_number', $user->ID);\n $state_city = get_the_author_meta('state_city', $user->ID);\n ?>\n <h3><?php esc_html_e('Personal Information (for Mtii Utilities User)', 'mtii-utilities-josbiz'); ?></h3>\n\n <table class=\"form-table\">\n <tr>\n <th>\n <label for=\"gender\"><?php _e( 'Gender', 'mtii-utilities-josbiz') ?></label>\n <span class=\"description\"><?php esc_html_e('(required)', 'mtii-utilities-josbiz'); ?></span>\n </th>\n <td>\n <select name=\"gender\" id=\"gender\" class=\"input\">\n <option disabled value=\"<?php _e($gender, 'mtii-utilities-josbiz'); ?>\"><?php echo $gender_label; ?></option>\n <option value=\"<?php _e('Male', 'mtii-utilities-josbiz'); ?>\">Male</option>\n <option value=\"<?php _e('Female', 'mtii-utilities-josbiz'); ?>\">Female</option>\n </select>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"phone_number\"><?php _e( 'Phone Number', 'mtii-utilities-josbiz') ?></label>\n <span class=\"description\"><?php esc_html_e('(required)', 'mtii-utilities-josbiz'); ?></span>\n </th>\n <td>\n <input\n type=\"number\" name=\"phone_number\" id=\"phone_number\" class=\"input\"\n value=\"<?php echo esc_attr(wp_unslash($phone_number)); ?>\" size=\"25\" />\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"state_city\"><?php _e( 'State/City', 'mtii-utilities-josbiz') ?></label>\n <span class=\"description\"><?php esc_html_e('(required)', 'mtii-utilities-josbiz'); ?></span>\n </th>\n <td>\n <input\n type=\"text\" name=\"state_city\" id=\"state_city\" class=\"input\"\n value=\"<?php echo esc_attr(wp_unslash($state_city)); ?>\" size=\"25\" />\n </td>\n </tr>\n </table>\n <?php\n }",
"function getProfileConfig() {\n $this->load->model('Usermodel');\n $this->Usermodel->getProfileConfiguration();\n }",
"public function show_profile(){\n\n $query = $this->db->select(\"person.fname, person.lname, person.yob, author_registration.picture_url\")\n ->from(\"person\")\n ->join(\"author_registration\", \"person.person_id = author_registration.person_id\")\n ->get();\n\n return $query;\n }",
"public function get($profileId, $optParams = array())\n {\n $params = array('profileId' => $profileId);\n $params = array_merge($params, $optParams);\n return $this->call('get', array($params), \"Google_Service_Dfareporting_UserProfile\");\n }",
"public function profile() {\n $user = auth('api')->user();\n $query = DB::table('users')\n ->join('positions', 'positions.id', '=', 'users.id_jafung')\n ->join('units', 'units.id', '=', 'users.id_unit')\n ->where('users.id', '=', $user->id )\n ->select('users.id', 'users.photo', 'users.nickname', 'users.fullname', 'users.jenis_peg',\n 'users.gol', 'users.tmt', 'users.gender', 'users.agama', 'users.tpt_lahir', 'users.tgl_lahir', 'users.photo',\n 'users.nip', 'users.nik', 'users.gol', 'users.email', 'positions.jabatan',\n 'positions.kategori AS katjab', 'users.id_unit', 'units.nama_unit AS unit', 'units.bagian')\n ->get();\n return $query;\n }",
"protected function getUserProfile() {\n $profile = (new FacebookRequest(\n $this->fbSession, 'GET', '/me'\n ))->execute()->getGraphObject(GraphUser::className());\n //return\n return $profile;\n }",
"protected function getReturnFields()\n {\n return array(\n 'user_id',\n 'name',\n 'username',\n 'pic_url',\n 'oauth_user_id',\n 'secret'\n );\n }"
] | [
"0.76904273",
"0.7676826",
"0.75186956",
"0.7189752",
"0.711803",
"0.69145244",
"0.6889209",
"0.67853636",
"0.66062826",
"0.6600881",
"0.6552911",
"0.6533339",
"0.6508206",
"0.64770323",
"0.6473083",
"0.6392423",
"0.6363981",
"0.6363373",
"0.6332004",
"0.63207716",
"0.63207716",
"0.63207716",
"0.6320767",
"0.63077164",
"0.62678874",
"0.6266028",
"0.62340355",
"0.6229942",
"0.62194496",
"0.62059534",
"0.61923695",
"0.61783564",
"0.61661947",
"0.61458284",
"0.6126237",
"0.61175513",
"0.6109711",
"0.61007065",
"0.60820776",
"0.60538775",
"0.60474133",
"0.60395867",
"0.60363334",
"0.60164213",
"0.60153013",
"0.5993377",
"0.59771794",
"0.59753495",
"0.59734285",
"0.59703124",
"0.59659266",
"0.59651077",
"0.59486455",
"0.59454566",
"0.59366816",
"0.59354556",
"0.5927706",
"0.5924575",
"0.5922875",
"0.5913404",
"0.5909536",
"0.5909297",
"0.58963954",
"0.58949757",
"0.5886329",
"0.5885378",
"0.58759964",
"0.58596486",
"0.58423233",
"0.58343077",
"0.5834072",
"0.5829004",
"0.58282775",
"0.58254546",
"0.5817459",
"0.58086485",
"0.57963836",
"0.57956326",
"0.5795491",
"0.57859254",
"0.5778602",
"0.57765156",
"0.5776403",
"0.5771274",
"0.5767687",
"0.57585156",
"0.5757114",
"0.57507426",
"0.57451516",
"0.5740517",
"0.5739452",
"0.5729439",
"0.57292956",
"0.57188696",
"0.5718202",
"0.5714736",
"0.5711199",
"0.5710417",
"0.57095504",
"0.57070124"
] | 0.8419101 | 0 |
Update user folder assignment Typically called after deleting a category with local user accounts. These users will be assigned to the global user folder. | public static function _updateUserFolderAssignment($a_old_id,$a_new_id)
{
global $ilDB;
$query = "UPDATE usr_data SET time_limit_owner = ".$ilDB->quote($a_new_id, "integer")." ".
"WHERE time_limit_owner = ".$ilDB->quote($a_old_id, "integer")." ";
$ilDB->manipulate($query);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function updateFolder() {\n if (isset($this->params['folder_id']) && $this->params['folder_id'] > 0) {\n $folderData = $this->getFolder($this->params['folder_id']);\n $data = array(\n 'permission_mode' => $this->params['permission_mode'],\n );\n $params = array(\n 'folder_id' => $this->params['folder_id'],\n );\n if ($this->params['permission_mode'] == 'inherited') {\n $this->databaseDeleteRecord(\n $this->tableFoldersPermissions,\n 'folder_id',\n $this->params['folder_id']\n );\n }\n if ($this->databaseUpdateRecord($this->tableFolders, $data, $params)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder updated.'));\n }\n if (isset($folderData[$this->lngSelect->currentLanguageId])) {\n $dataTrans = array(\n 'folder_name' => $this->params['folder_name'],\n );\n $paramsTrans = array(\n 'folder_id' => $this->params['folder_id'],\n 'lng_id' => $this->lngSelect->currentLanguageId,\n );\n if ($this->databaseUpdateRecord($this->tableFoldersTrans, $dataTrans, $paramsTrans)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder translation updated.'));\n }\n } else {\n $dataTrans = array(\n 'folder_id' => $this->params['folder_id'],\n 'lng_id' => $this->lngSelect->currentLanguageId,\n 'folder_name' => $this->params['folder_name'],\n );\n if ($this->databaseInsertRecord($this->tableFoldersTrans, NULL, $dataTrans)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder translation added.'));\n }\n }\n } else {\n $this->addMsg(MSG_INFO, $this->_gt('No folder selected.'));\n }\n }",
"function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}",
"public function update_midrub_user_component() {\n \n // Verify if the Midrub's user component can be updated\n (new MidrubBaseAdminCollectionUpdateHelpers\\User_components)->verify();\n \n }",
"public function updateUserLinked\t(){\n\t\t\n\t\t}",
"private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }",
"protected function lstUsersAsAssessmentManager_Update() {\n\t\t\tif ($this->lstUsersAsAssessmentManager) {\n\t\t\t\t$this->objGroupAssessmentList->UnassociateAllUsersAsAssessmentManager();\n\t\t\t\t$objSelectedListItems = $this->lstUsersAsAssessmentManager->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objGroupAssessmentList->AssociateUserAsAssessmentManager(User::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"protected function updateUsersForSubshop()\n {\n $testConfig = $this->getTestConfig();\n if ($testConfig->getShopEdition() === 'EE' && $testConfig->isSubShop()) {\n #User demodata for subshop\n $aUserParams = array(\"oxshopid\" => $testConfig->getShopId());\n $aUsers = oxDb::getDb(oxDb::FETCH_MODE_NUM)->getAll('SELECT OXID FROM oxuser');\n foreach ($aUsers as $aUser) {\n $this->callShopSC(\"oxUser\", \"save\", $aUser[0], $aUserParams);\n }\n }\n }",
"function updateUser() {\n\t\t$rating = $this -> getTaskRating();\n\t\t$sql = \"Update Users set finishedBasic=1, userRating=userRating+\" . $rating . \" where UID= (Select t.UID from Task t WHERE t.TaskId=\" . $this -> data[0]['TaskId'] . \")\";\n\t\t$stmt = $this -> DB -> prepare($sql);\n\t\tif ($stmt -> execute()) {\n\t\t\t$this -> checkforLast();\n\t\t} else {\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('failed', 'to update user with TaskId=' . $this -> data[0]['TaskId'], $this -> id);\n\t\t}\n\t}",
"private function setSubUserPermission($user, $assigned)\n {\n if (count($assigned) > 0) {\n $user_perms = $user->permissions()->get();\n foreach ($user_perms as $row) {\n $u_perm = UserPermission::where('user_id', $user->id)->where('permission_id', $row->id)->first();\n $checked = false;\n for ($i = 0; $i < count($assigned); $i++) {\n if ($row->id == $assigned[$i]) {\n $u_perm->permission = 1;\n $u_perm->save();\n $checked = true;\n break;\n }\n }\n\n if (!$checked) {\n $u_perm->permission = 0;\n $u_perm->save();\n }\n }\n }\n }",
"public function update($user, Folder $folder): bool\n {\n return $user->id === $folder->project->user_id;\n }",
"public function updateUserPreferences()\n {\n $userList = $this->_userDao->getUserList();\n\n // loop through every user and fix it\n foreach ($userList as $user) {\n /*\n * Because we do not get all users' properties from\n * getUserList, retrieve the users' settings from scratch\n */\n $user = $this->_userDao->getUser($user['userid']);\n\n // set the users' preferences\n $this->setSettingIfNot($user['prefs'], 'perpage', 25);\n $this->setSettingIfNot($user['prefs'], 'date_formatting', 'human');\n $this->setSettingIfNot($user['prefs'], 'normal_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'mobile_template', 'mobile');\n $this->setSettingIfNot($user['prefs'], 'tablet_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'count_newspots', true);\n $this->setSettingIfNot($user['prefs'], 'mouseover_subcats', true);\n $this->setSettingIfNot($user['prefs'], 'keep_seenlist', true);\n $this->setSettingIfNot($user['prefs'], 'auto_markasread', true);\n $this->setSettingIfNot($user['prefs'], 'keep_downloadlist', true);\n $this->setSettingIfNot($user['prefs'], 'keep_watchlist', true);\n $this->setSettingIfNot($user['prefs'], 'nzb_search_engine', 'nzbindex');\n $this->setSettingIfNot($user['prefs'], 'show_filesize', true);\n $this->setSettingIfNot($user['prefs'], 'show_reportcount', true);\n $this->setSettingIfNot($user['prefs'], 'minimum_reportcount', 1);\n $this->setSettingIfNot($user['prefs'], 'show_nzbbutton', true);\n $this->setSettingIfNot($user['prefs'], 'show_multinzb', true);\n $this->setSettingIfNot($user['prefs'], 'customcss', '');\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_tag', $user['username']);\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_body', '');\n $this->setSettingIfNot($user['prefs'], 'user_language', 'en_US');\n $this->setSettingIfNot($user['prefs'], 'show_avatars', true);\n $this->setSettingIfNot($user['prefs'], 'usemailaddress_for_gravatar', true);\n\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'action', 'disable');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'local_dir', '/tmp');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'prepare_action', 'merge');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'command', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'url', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'ssl', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'timeout', 15);\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'apikey', '');\n\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'host', '');\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'password', '');\n /* Notifo and NMA are discontinued. */\n $this->unsetSetting($user['prefs']['notifications'], 'nma');\n $this->unsetSetting($user['prefs']['notifications'], 'notifo');\n $this->setSettingIfNot($user['prefs']['notifications']['prowl'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'screen_name', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token_secret', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token_secret', '');\n $notifProviders = Notifications_Factory::getActiveServices();\n foreach ($notifProviders as $notifProvider) {\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider], 'enabled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'watchlist_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'nzb_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'retriever_finished', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'report_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'spot_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'user_added', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'newspots_for_filter', false);\n } // foreach\n\n // make sure a sort preference is defined. An empty field means relevancy\n $this->setSettingIfNot($user['prefs'], 'defaultsortfield', '');\n\n // Remove deprecated preferences\n $this->unsetSetting($user['prefs'], 'search_url');\n $this->unsetSetting($user['prefs'], 'template');\n $this->unsetSetting($user['prefs']['notifications'], 'libnotify');\n\n // Make sure the user has a valid RSA key\n if ($user['userid'] > 2) {\n $rsaKey = $this->_userDao->getUserPrivateRsaKey($user['userid']);\n if (empty($rsaKey)) {\n // Creer een private en public key paar voor deze user\n $spotSigning = Services_Signing_Base::factory();\n $userKey = $spotSigning->createPrivateKey($this->_settings->get('openssl_cnf_path'));\n\n $this->_userDao->setUserRsaKeys($user['userid'], $userKey['public'], $userKey['private']);\n } // if\n } // if\n\n /*\n * In earlier versions, we always appended \"sabnzbd/\" to the URL, so we do this once\n * manually\n */\n if ($this->_settings->get('securityversion') < 0.31) {\n if (!empty($user['prefs']['nzbhandling']['sabnzbd']['url'])) {\n $user['prefs']['nzbhandling']['sabnzbd']['url'] = $user['prefs']['nzbhandling']['sabnzbd']['url'].'sabnzbd/';\n } // if\n } // if\n\n // update the user record in the database\n $this->_userDao->setUser($user);\n } // foreach\n }",
"public function testUpdateUser()\n {\n }",
"public function update(UpdateUserPermissionsRequest $request, User $user)\n {\n if (!$user->updatePermissions($request->folders)) {\n return redirect()->back()->withError('User permissions could not be updated.');\n }\n\n return redirect()->back()->withSuccess('User permissions have been updated successfully.');\n }",
"public function update()\n\t{\n\t\t$container = AssetService::getContainer($this->request->get('container'), 'local', 'Assets');\n\t\t$folder = $container->folder($this->request->get('path'));\n\t\t$folder->editFolder($this->request->get('basename'));\n\n\t\treturn [\n\t\t\t'success'\t=>\ttrue,\n\t\t\t'message'\t=> 'Folder was successfully updated',\n\t\t\t'folder'\t=> $folder->toArray()\n\t\t];\n\n\t}",
"protected function _updateUsers(Centixx_Model_Project $model)\n\t{\n\t\tif (!count($model->users)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$a = array();\n\t\tforeach ($model->users as $user ) {\n\t\t\t$a[$user->id] = $user->id;\n\t\t}\n\n\t\t$adapter = $this->getDbTable()->getAdapter()->query(\"UPDATE `users` SET `user_project` = NULL WHERE `user_project` = ?\",\n\t\t\tarray($model->id));\n\n\t\t$in = join(',', $a);\n\t\t$adapter = $this->getDbTable()->getAdapter()->query(\"UPDATE `users` SET `user_project` = ? WHERE `user_id` IN ($in)\",\n\t\t\tarray($model->id));\n\t}",
"function deleteFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'.$user_dir; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}",
"function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}",
"public function user_update($data = array())\n\t{\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_update', $data);\n\t\t\n\t\t// Update the permission cache table\n\t\t$this->CI->load->model('permissions_model');\n\t\t$this->CI->permissions_model->set_cache($data['u_id']);\n\t}",
"public function changeUserGroup()\n {\n $userId = $this->request->variable('user_id',0);\n $groupId = $this->request->variable('group_id',9999);\n\n if($userId === 0 || $groupId === 9999)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n /**\n * Group IDs\n * 5 - ADMIN\n * 4 - GLOBAL MOD\n * 2 - REGISTERED\n */\n $arrGroups = group_memberships(false, [$userId]);\n\n $arrCurrentGroupIds = [];\n\n // Get the user's current groups\n foreach($arrGroups as $group)\n {\n $arrCurrentGroupIds[$group['group_id']] = $group['group_id'];\n }\n\n // If the new group is 'registered user' we need to remove the user from\n // any admin or moderator groups they were previously in\n if($groupId < 4)\n {\n // User was an admin - remove them from the admin group\n if(in_array(5,$arrCurrentGroupIds))\n {\n group_user_del(5,[$userId]);\n }\n\n // User was a global mod - remove them from the global mod group\n if(in_array(4,$arrCurrentGroupIds))\n {\n group_user_del(4,[$userId]);\n }\n }\n\n // If the user is being made an admin, make sure they are a global mod too\n if($groupId == 5 AND !in_array(4,$arrCurrentGroupIds))\n {\n group_user_add(4, [$userId],false, false, false);\n }\n\n // User could already have the group they need if they are\n // being downgraded. Check if they have the group and\n // if not, add them. If they were, then make it the default\n if(!in_array($groupId,$arrCurrentGroupIds))\n {\n group_user_add($groupId, [$userId],false, false, true);\n }\n else\n {\n group_set_user_default($groupId,[$userId]);\n }\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user\\'s group was updated',\n 'data' => [\n 'user_id' => $userId,\n 'group_id' => $groupId\n ]\n ]);\n }",
"protected function lstUsersAsCharity_Update() {\n\t\t\tif ($this->lstUsersAsCharity) {\n\t\t\t\t$this->objCharityPartner->UnassociateAllUsersAsCharity();\n\t\t\t\t$objSelectedListItems = $this->lstUsersAsCharity->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objCharityPartner->AssociateUserAsCharity(User::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function updateUser( UserDataInf $user )\n {\n \n $userName = $user->getName();\n \n $userId = $this->getUserId( $userName );\n $passwd = Password::passwordHash( $user->getPasswd() );\n \n $sqlUser = <<<SQL\nUPDATE wbfsys_role_user\nSET\n name = '{$userName}', \n inactive = FALSE, \n non_cert_login = TRUE,\n profile = '{$user->getProfile()}',\n level = '{$user->getLevel()}',\n password = '{$passwd}'\nWHERE rowid = {$userId}\n;\nSQL;\n \n $this->db->update( $sqlUser );\n \n $personId = $this->db->select( 'SELECT id_person from wbfsys_role_user where rowid = '.$userId );\n \n \n $sqlPerson = <<<SQL\nUPDATE core_person\nSET\nfirstname = '{$user->getFirstname()}', \nlastname = '{$user->getLastname()}'\nWHERE rowid = {$personId};\nSQL;\n\n $this->db->update( $sqlPerson );\n \n }",
"protected function removeGenomeUpdates() {\n // Retrieves genome uploads main folder (before users' folders)\n $rootDir = new Folder(WWW_ROOT . DS . 'files' . DS . 'genome_updates', false);\n\n // Checks if folder exists\n if(!$rootDir->Path) {\n $this->error('no-updates-root', 'Updates root folder has not been found');\n }\n\n // Loops users' folders\n foreach($rootDir->find() as $userId) {\n // Instances folder\n $userDir = new Folder($rootDir->pwd() . DS . $userId, false);\n // Checks if folder exists\n if($userDir->path) {\n // Searches user\n $user = $this->findUser($userId);\n // Case folder is not bound to any user\n if(!$user) {\n // Removes folder\n $userDir->remove();\n }\n // Case folder ha an user bound to istelf\n else {\n // Makes a list of files which should be stored into current user's directory\n $updates = array();\n foreach($user['configs'] as $config) {\n $updates = array_merge($updates, $config['updates']);\n }\n\n // Lists files into directory\n $folders = $userDir->find();\n // Loops every folder (should be named as update id)\n foreach($folders as $folder) {\n // Checks if name is present into uploads array\n if (!isset($updates[$folder]) || !$updates[$folder]) {\n $folder = new Folder($userDir->pwd() . DS . $folder, false);\n if($folder->path) {\n $folder->delete();\n }\n }\n }\n }\n }\n }\n }",
"function crushftp_update_ftp_folder_form_submit($form, &$form_state) {\n global $user;\n $path=\"/var/www/html/vsi-online-hr/ftp\";\n $ar=getDirectorySize($path); \n if ($handle = opendir('/var/www/html/vsi-online-hr/ftp')) {\n //echo \"Directory handle: $handle\\n\";\n //echo \"Entries:\\n\";\n // This is the correct way to loop over the directory. \n while (false !== ($entry = readdir($handle))) {\n //echo \"$entry :\";\n $path=\"/var/www/html/vsi-online-hr/ftp/$entry\"; \n $ar=getDirectorySize($path); \n $values = array('size' => sizeFormat($ar['size']));\n $return_value = NULL;\n // store crushftp details in crushftp databse in users table\n db_set_active('crushftp');\n try {\n $return_value = db_update('USERS')\n ->condition('username', $entry)\n ->fields ($values)\n ->execute();\n drupal_set_message(t('The FTP Folders are updated'));\n watchdog('crushftp', 'New crushftp user added (@user)', array('@user' => $user->uid), WATCHDOG_INFO);\n }\n catch (Exception $e) {\n drupal_set_message(t('db_insert failed. Message = %message, query= %query',\n array('%message' => $e->getMessage(), '%query' => $e->query_string)), 'error');\n } \n // Connecting to default drupal database.\n db_set_active();\n }\n closedir($handle);\n } \n}",
"function transferOwnership($oldUserId, $newUserId) {\n\t\t$submissionFiles =& $this->_getInternally(null, null, null, null, null, null, null, $oldUserId, null, null);\n\t\tforeach ($submissionFiles as $file) {\n\t\t\t$daoDelegate =& $this->_getDaoDelegateForObject($file);\n\t\t\t$file->setUploaderUserId($newUserId);\n\t\t\t$daoDelegate->updateObject($file, $file); // nothing else changes\n\t\t}\n\t}",
"function _update_userdata($userdata){\r\n $userdata = (array)$userdata;\r\n $userdata2['user_email'] = server(get_sso_option('user_email'));\r\n $nickname = server(get_option('sso_user_nickname'));\r\n if($nickname !== FALSE AND $nickname !== $userdata['nickname']) $userdata2['nickname'] = $nickname;\r\n $firstname = server(get_option('sso_user_firstname'));\r\n if($firstname !== FALSE AND $firstname !== $userdata['firstname']) $userdata2['first_name'] = $firstname;\r\n $lastname = server(get_option('sso_user_lastname'));\r\n if($lastname !== FALSE AND $lastname !== $userdata['lastname']) $userdata2['last_name'] = $lastname;\r\n\r\n update_user($userdata['ID'], (array)$userdata2);\r\n //require_once(WPINC . DIRECTORY_SEPARATOR . 'registration.php');\r\n //wp_update_user((array)$userdata);\r\n \r\n set_user_groups();\r\n}",
"function rename_folder()\n\t{\n\t\t$this->db->set('name', $this->input->post('edit_folder_name'));\n\t\t$this->db->where('id_folder', $this->input->post('id_folder'));\n\t\t$this->db->update('user_folders');\n\t}",
"public function changeOwner($path, $group = null, $user = null);",
"public function update(User $user, PortfolioCategory $portfolioCategory)\n {\n //\n }",
"protected function update_user_is () {\n\t\t$this->is_guest = $this->user_id == User::GUEST_ID;\n\t\t$this->is_user = false;\n\t\t$this->is_admin = false;\n\t\tif ($this->is_guest) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * Checking of user type\n\t\t */\n\t\t$groups = User::instance()->get_groups($this->user_id) ?: [];\n\t\tif (in_array(User::ADMIN_GROUP_ID, $groups)) {\n\t\t\t$this->is_admin = true;\n\t\t\t$this->is_user = true;\n\t\t} elseif (in_array(User::USER_GROUP_ID, $groups)) {\n\t\t\t$this->is_user = true;\n\t\t}\n\t}",
"public function updateUser(array $config = []);",
"public function refreshUserACLs() {\r\n if ($this->modx->getUser()) {\r\n $this->modx->user->getAttributes(array(), '', true);\r\n }\r\n }",
"public function chgUsers($args) {\n if (!SecurityUtil::checkPermission('IWagendas::', '::', ACCESS_ADMIN)) {\n throw new Zikula_Exception_Fatal($this->__('Sorry! No authorization to access this module.'));\n }\n\n $gid = $this->request->getPost()->get('gid', '');\n if (!$gid) {\n throw new Zikula_Exception_Fatal($this->__('no group id'));\n }\n\n // get group members\n $sv = ModUtil::func('IWmain', 'user', 'genSecurityValue');\n $groupMembers = ModUtil::func('IWmain', 'user', 'getMembersGroup', array('sv' => $sv,\n 'gid' => $gid));\n if ($groupMembers)\n asort($groupMembers);\n\n if (empty($groupMembers))\n throw new Zikula_Exception_Fatal($this->__('unable to get group members or group is empty for gid=') . DataUtil::formatForDisplay($gid));\n\n Zikula_AbstractController::configureView();\n $this->view->assign('groupMembers', $groupMembers);\n $this->view->assign('action', 'chgUsers');\n $content = $this->view->fetch('IWagendas_admin_ajax.htm');\n return new Zikula_Response_Ajax(array('content' => $content,\n ));\n }",
"public function updateUserContext(UserContext $context);",
"public function updateUser( $groupID, $user) {\n\t\t $sql = sprintf(\"UPDATE felhasznalok SET csoport=%d WHERE id='%d'\", $groupID, $user);\n\t\t\n\t\t $query = $this->db->query($sql);\n\n\t}",
"public function updateUserAgencyCount() {\n\t\t$dummyUserCount = array();\n\t\t$dummyUserCount['dummy_user_count'] = 1;\n $dummyUserCount['agency_size'] = 1;\n\t\n\t\t$conditions = array();\n\t\t$conditions['id'] = $this->id;\n\n\t\t$success = ConnectionFactory::updateTableRowRelativeBasic(\"users\", $dummyUserCount, $conditions);\n\t\tif ($success) {\n\t\t\t$this-> dummy_user_count = $this->dummy_user_count + 1;\n $this-> agency_size = $this-> agency_size + 1;\n\t\t}\n\t\treturn $success;\n\t}",
"function update_user_option($user_id, $option_name, $newvalue, $is_global = \\false)\n {\n }",
"public function update(UpdateUserRequest $request, $id)\n {\n $categories = Category::all();\n $user = User::findOrFail($id);\n $user->name = $request->name;\n $user->email = $request->email;\n $user->linkedin = $request->linkedin;\n $user->github = $request->github;\n $user->other = $request->other;\n \n if ($request->password != null) {\n $user->password = bcrypt($request->password);\n }\n \n \n if ($request->hasFile('avatar')) { \n $avatar = $request->file('avatar');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save(public_path('/uploads/avatars/' . $filename));\n $user->avatar = $filename;\n $user->save();\n }\n\n if (auth()->user()->hasPermissionTo('adminpermission')) {\n $user->syncRoles($request->role);\n $user->save();\n\n if ($request->role == 'user')\n {$user->role = 1;}\n elseif ($request->role == 'professional')\n {$user->role = 2;}\n else {$user->role = 3;}\n $user->save();\n\n if ($user->role == '3') {\n return redirect()->route('users.adminIndex', [\n 'categories' => $categories\n ]); }\n elseif ($user->role == '1') {\n return redirect()->route('users.index');\n\n } elseif ($user->role == '2') {\n return redirect()->route('professionals.index');\n }\n\n } \n \n elseif (auth()->user()->role==1) {\n $user->save();\n return redirect()->route('user.show', [\n 'user' => $user,\n 'categories' => $categories\n ]);\n } elseif (auth()->user()->role==2) {\n return redirect()->route('professional.show', [\n 'user' => $user,\n 'categories' => $categories\n ]);\n }\n }",
"public function ajax_updateperm() {\n\t\t\t\n\t\t\tif( !isset($_GET['usergroup']) || !isset($_GET['key']) || !isset($_GET['value']) )\n\t\t\t\tdie( \"error\" );\n\t\t\t\t\n\t\t\t$Usergroup = $this->usergroup_model->GetByID( intval( $this->input->get('usergroup') ) );\n\t\t\tif( $Usergroup == false ) die( \"error\" );\n\t\t\t\n\t\t\tif( $_GET[ \"key\" ] == \"name\" ) {\n\t\t\t\t$NewName = $this->db->escape( $_GET[ \"value\" ] );\n\t\t\t\tget_instance()->db->query( \"UPDATE `usergroups` SET `Name` = {$NewName} WHERE `ID` = {$Usergroup->ID};\" );\n\t\t\t\tdie( \"success\" );\n\t\t\t}\n\t\t\t\n\t\t\tif( $_GET[ \"value\" ] == \"enable_cat\" || $_GET[ \"value\" ] == \"disable_cat\" ) {\n\t\t\t\t$CatID = intval( $_GET['key'] );\n\t\t\t\t\n\t\t\t\tif( $_GET[ \"value\" ] == \"enable_cat\" ) {\n\t\t\t\t\t$Usergroup->AddTicketCat( $CatID );\n\t\t\t\t}else{\n\t\t\t\t\t$Usergroup->RemoveTicketCat( $CatID );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdie( \"success\" );\n\t\t\t}\n\t\t\t\n\t\t\t$Permission = Permissions::GetByKey( $this->input->get('key') );\n\t\t\tif( $Permission == false ) die( \"error\" );\n\t\t\t\n\t\t\tif( intval( $_GET['value'] ) == 1 ) {\n\t\t\t\t$Usergroup->GivePermission( $Permission->ID );\n\t\t\t}else{\n\t\t\t\t$Usergroup->RemovePermission( $Permission->ID );\n\t\t\t}\n\t\t\t\n\t\t\tdie( \"success\" );\n\t\t}",
"public function updateUser($data) {\n\t\t\n\t}",
"function updateUser()\r\n {\r\n return $this->UD->user_update($_GET['uid']);\r\n }",
"function updateUsers(){\n\t\t$text='';\n//TODO: clean this up\n\t\tforeach ($this->users as $name => $schedule) {\n\t\t\t$text = $text.\"\\n\".$name.'^';\n\t\t\tforeach ($schedule as $cell) {\n\t\t\t\t$text = $text.$cell.'|';\n\t\t\t}\n\t\t}\n\n\t\t$returnCode = $this->fileHandler->writeToFile('users.txt',$text);\n\t\tif($returnCode == NO_LOCK) $this->logMsg(WARNING,'User file is locked, try again later');\n\t\telse $this->logMsg(SUCCESS, 'schedule updated, and uploaded');\n\n\t}",
"public function update_user_profile_fields($user_id) {\n\n // get user data\n $user = get_userdata($user_id);\n\n // update phpbb username\n if ( $user->display_name ){\n\n $name = $this->_db->_real_escape($user->display_name);\n $this->_db->query(\"UPDATE `\" . self::PHPBB3_TABLE_PREFIX . \"users` SET `username` = '{$name}', `username_clean` = '{$name}' WHERE `user_id` = {$user_id}\");\n }\n\n // @TODO: to improve it!\n // delete existing rights\n $this->_db->query(\"SELECT * FROM `\" . self::PHPBB3_TABLE_PREFIX . \"user_group` WHERE (`group_id` = 4 OR `group_id` = 5) and `user_id` = {$user_id}\");\n\n if ( $this->_db->num_rows > 0 ){\n\n $this->_db->query(\"DELETE FROM `\" . self::PHPBB3_TABLE_PREFIX . \"user_group` WHERE (`group_id` = 4 OR `group_id` = 5) and `user_id` = {$user_id}\");\n $this->_db->query(\"UPDATE `\" . self::PHPBB3_TABLE_PREFIX . \"users` SET `user_permissions` = '' WHERE `user_id` = {$user_id}\");\n }\n\n // check user level\n $group = $user->user_level == 7 ? 4 : ($user->user_level == 10 ? 5 : 2);\n\n // if a moderator or an administrator\n if ( $group == 4 || $group == 5 ){\n\n $this->_db->query(\"INSERT INTO `\" . self::PHPBB3_TABLE_PREFIX . \"user_group` (`group_id`, `user_id`, `user_pending`) VALUES ({$group}, {$user_id}, 0)\");\n\n }\n\n // update user group\n $this->_db->query(\"UPDATE `\" . self::PHPBB3_TABLE_PREFIX . \"users` SET `group_id` = {$group} WHERE `user_id` = {$user_id}\");\n }",
"public function processUser(){\n \n $this->setCurrentUser();\n $this->setUsersAttributes();\n }",
"public function assignuserAction()\n {\n $id = $this->request->getPost('id', 'int');\n $npfOffice = NpfOffices::findFirstById($id);\n if (!$npfOffice) {\n $this->flash->error(\"Office Type was not found\");\n return $this->dispatcher->forward(array('action' => 'index'));\n }\n\n if ($this->request->isPost()) {\n //todo: check first if the user is already assigned to the office\n\n $npfUserOffice = new NpfOfficeUsers();\n $npfUserOffice->assign(array(\n 'user_id' => $this->request->getPost('user_id', 'striptags'),\n 'office_id' => $id,\n ));\n\n if (!$npfUserOffice->save()) {\n $this->flash->error($npfOffice->getMessages());\n } else {\n\n $this->flash->success(\"Office User was updated successfully\");\n return $this->response->redirect('offices/edit/'.$id);\n }\n\n }\n $this->view->office = $npfOffice;\n $this->view->form = new NpfOfficesForm($npfOffice, array('edit' => true));\n }",
"public function updateUser($request)\n {\n $this->name = $request[\"name\"];\n $this->email = trim($request[\"email\"]);\n $this->enabled = $request[\"enabled\"];\n\n if (array_key_exists(\"password\", $request)) {\n $this->password = $this->passwordHash($request[\"password\"]);\n }\n\n if ($request[\"reset-password\"]) {\n $this->password = $this->passwordHash($this->generatePassword(12));\n }\n\n if (Auth::user()->isAdministrator()) {\n $this->access_level = $request[\"access_level\"];\n $this->group_id = $request[\"group_id\"];\n }\n $this->update();\n }",
"public function UpdateUserCollection($userProfileform,$oldUserObj){\n try {\n $userCollectionModel=new UserCollection();\n// if(isset($userProfileform['country']) && $oldUserObj['country']!=$userProfileform['country'])\n// {\n// $NetworkId= Network::model()->getNeworkId($userProfileform['country']);\n// (isset($NetworkId) && $NetworkId!='error')?'':$NetworkId=1; \n// $userProfileform['network']=$NetworkId;\n// }\n $result=User::model()->updateUser($userProfileform,$oldUserObj[\"UserId\"]); \n if($result=='success'){ \n $userId= (int)$oldUserObj[\"UserId\"];\n $userCollectionModel->UserId=$userId;\n $userCollectionModel->DisplayName=$userProfileform['firstName'].\" \".$userProfileform['lastName'];\n $userCollectionModel->State=$userProfileform['state'];\n $userCollectionModel->CountryId=$userProfileform['country'];\n $userCollectionModel->AboutMe=$userProfileform['aboutMe'];\n // $userCollectionModel->NetworkId=(int)$NetworkId;\n $displayName = trim($userCollectionModel->DisplayName);\n $uniqueHandle=\"\";\n if(strlen($displayName)>0){\n $uniqueHandle = $this->generateUniqueHandleForUser($userProfileform['firstName'],$userProfileform['lastName']);\n }else{\n $emailPref = explode(\"@\", $userProfileform['email']);\n $displayName = $emailPref[0];\n $uniqueHandle = $this->generateUniqueHandleForUser($displayName,\"\");\n }\n $userCollectionModel->uniqueHandle=$uniqueHandle;\n \n UserCollection::model()->updateUserCollection($userCollectionModel); \n }\n /**********saving the availability in userAchievementsCollection************/\n $userDetails=UserCollection::model()->getTinyUserCollection($userId); \n $userAchievementsInputBean = new UserAchievementsInputBean();\n $userAchievementsInputBean->UserId = $userId;\n $userAchievementsInputBean->UserClassification = $userDetails->UserClassification;\n $userAchievementsInputBean->OpportunityType = \"\";\n $userAchievementsInputBean->SegmentId = $userDetails->SegmentId;\n $userAchievementsInputBean->NetworkId = $userDetails->NetworkId;\n\n Yii::app()->amqp->achievements(json_encode($userAchievementsInputBean));\n } catch (Exception $ex) {\n Yii::log(\"SkiptaUserService:UpdateUserCollection::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n error_log(\"Exception Occurred in SkiptaUserService->UpdateUserCollection### \".$ex->getMessage());\n }\n }",
"public function updateUserProfile()\n { \n $user = $this->session->userdata(\"loggedIn\")['id'];\n $this->User_Model->updateUserProfile($this->input->post());\n $data= $this->User_Model->getUserData($user);\n $data = $data['profile_picture'];\n $data = str_replace(base_url(),\"\",$data);\n unlink($data);\n $path = 'uploadFolders/user_' . $user;\n $profilePictureFolderPath = $path.\"/profilePicture\";\n $profilePicture =$profilePictureFolderPath.\"/\".$_FILES['newProfilePicture']['name'];\n // $pathOfPicture = 'uploadFolders/user_'.$user.\"/profilePicture/\";\n if($_FILES['newProfilePicture'])\n {\n $newFile = $_FILES['newProfilePicture']['tmp_name'];\n move_uploaded_file($newFile,$profilePicture);\n $updatedProfilePicture = base_url().$profilePicture;\n $this->User_Model->setProfilePicture($user,$updatedProfilePicture);\n }\n \n }",
"public function update_user(Request $request){\n Session::put('menu_item_parent', 'users');\n Session::put('menu_item_child', '');\n Session::put('menu_item_child_child', '');\n $user = User::where('userIdx', $request->userIdx)->get()->first();\n\n if($user){\n $data = array();\n $data['firstname'] = $request->firstname;\n $data['lastname'] = $request->lastname;\n $data['email'] = $request->email;\n $data['jobTitle'] = $request->jobTitle;\n if($request->businessName2 == \"Other industry\") {\n $data['businessName'] = $request->businessName;\n } else {\n $data['businessName'] = $request->businessName2;\n }\n if($request->role2 == \"Other\") {\n $data['role'] = $request->role;\n } else {\n $data['role'] = $request->role2;\n }\n User::where('userIdx', $request->userIdx)->update($data);\n\n $logDetail = 'Updated: UserID- '.$request->userIdx.', Email- '.$data['email'].', Firstname- '.$data['firstname'].', Lastname- '.$data['lastname'];\n SiteHelper::logActivity('USER', $logDetail, 'admin');\n\n Session::flash('flash_success', 'User detail has been updated successfully');\n echo \"success\";\n }else \n echo \"fail\";\n }",
"function _update_user()\n {\n //pr_db($post_total);\n $tbl = 'user';\n $list = model($tbl)->get_list();\n foreach ($list as $row) {\n $post_total = model('product')->filter_get_total(['user_id' => $row->id]);\n $post_is_publish = model('product')->filter_get_total(['user_id' => $row->id, 'status' => 1]);\n $post_is_draft = model('product')->filter_get_total(['user_id' => $row->id, 'is_draft' => 1]);\n $post_is_deleted = model('product')->filter_get_total(['user_id' => $row->id, 'deleted' => 1]);\n\n $follow_total = model('user_storage')->filter_get_total(['user_id' => $row->id,'action'=>'subscribe']);\n $follow_by_total = model('user_storage')->filter_get_total(['table_id' => $row->id,'action'=>'subscribe']);\n model($tbl)->update($row->id,\n [\n 'post_total' => $post_total,\n 'post_is_publish' => $post_is_publish,\n 'post_is_draft' => $post_is_draft,\n 'post_is_deleted' => $post_is_deleted,\n\n 'follow_total' => $follow_total,\n 'follow_by_total' => $follow_by_total,\n ]\n );\n echo '<br>--';\n pr_db(0, 0);\n }\n }",
"public function updateSettings(User $user, array $data);",
"function kt_update_user_meta($user_id) {\r\r\n\r\r\n $user_info = get_userdata( $user_id );\r\r\n $user_registered = $user_info->user_registered;\r\r\n // $value = strtotime($user_registered);\r\r\n\t$db_directory_type\t = get_user_meta( $user_id, 'directory_type', true);\r\r\n $terms = get_the_terms($db_directory_type, 'group_label');\r\r\n $list_terms = array();\r\r\n foreach ($terms as $key => $value) {\r\r\n $list_terms[] = $value->slug;\r\r\n }\r\r\n $current_group_label_slug = $terms[0]->slug;\r\r\n if( in_array('company', $list_terms) ||\r\r\n in_array('medical-centre', $list_terms) ||\r\r\n in_array('hospital-type', $list_terms) ||\r\r\n in_array('scans-testing', $list_terms)\r\r\n ) {\r\r\n\t\t$val = get_option('company_trial_premium_days', true );\r\r\n }else {\r\r\n\t\t$val = get_option('trial_premium_days', true );\r\r\n }\r\r\n\r\r\n\t$membership_date\t= strtotime(\"+\".$val.\" days\", strtotime($user_registered));\r\r\n\t$membership_date\t= date('Y-m-d H:i:s', $membership_date);\r\r\n\r\r\n\tupdate_user_meta($user_id, 'user_featured', strtotime($membership_date));\r\r\n\tupdate_user_meta($user_id, 'user_premium', 'free_trial');\r\r\n\r\r\n\tupdate_user_meta($user_id, 'currency', 'HKD');\r\r\n\tupdate_user_meta($user_id, 'currency_symbol', '$');\r\r\n\t\r\r\n\tupdate_user_meta( $user_id, 'show_admin_bar_front', 'false' );\r\r\n\r\r\n\t$default_booking_services = array(\r\r\n\t\t'consultation' => array(\r\r\n\t\t\t'title' => 'Consultation',\r\r\n\t\t\t'price' => '100',\r\r\n\t\t)\r\r\n\t);\r\r\n\tupdate_user_meta( $user_id, 'booking_services', $default_booking_services );\r\r\n\r\r\n}",
"public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}",
"public function update($id = null) {\n\t\t$attributes = \\Input::all();\n\t\t$oauthToken = OauthToken::find(\\Input::get('access_token'));\n\t\t$user = $oauthToken->user()->first();\n $society_id = $oauthToken->society_id;\n \n $adminFolder = AdminFolder::where('id','=',$id)\n\t\t\t\t->firstOrFail();\n if (!$adminFolder)\n\t\t\treturn ['error'=>'Folder not found with id: '.$id,'success'=>false];\n \n $sql = 'select count(*) as total from admin_folder where society_id = :society_id and name = :folder_name and deleted_at IS NULL and id != :id';\n $result = \\DB::selectOne($sql,['society_id'=>$society_id,'folder_name'=>$attributes['name'],'id'=>$id]);\n if($result->total){\n return ['success'=>false,'msg'=>'This folder already exists'];\n }\n \n\t\t$adminFolder->fill($attributes);\n\t\t$adminFolder->save();\n\t\t\n return ['msg'=>'Folder updated successfully','success'=>true];\n\t}",
"function updateUsers($newUser,$action){\n if($action == \"add\"){\n array_push($this->names,$newUser);\n }\n elseif($action == \"remove\"){\n $index = array_search($newUser,$this->names);\n array_splice($this->names,$index,1);\n }\n }",
"function update_group_memberships()\n {\n if (! is_null($this->group_id))\n {\n $group_users_arr = $this->viewer->get_group_users($this->group_id);\n $group_users = array();\n \n foreach ($group_users_arr as $user)\n {\n $group_users[$user->get_id()] = $user->get_id();\n }\n \n $values = $this->exportValue(Manager::PARAM_GROUP_USERS);\n \n foreach ($values as $type => $elements)\n {\n foreach ($elements as $id)\n {\n if ($type == self::PARAM_USER)\n {\n // type = user\n if (! in_array($id, $group_users))\n {\n if (! $this->viewer->user_is_enrolled_in_group($id))\n {\n $this->viewer->add_user_to_group($id, $this->group_id); // user can be enrolled in one\n // PA-group/publication\n }\n else\n {\n $user = \\Chamilo\\Core\\User\\Storage\\DataManager::retrieve_by_id(\n \\Chamilo\\Core\\User\\Storage\\DataClass\\User::class_name(), \n $id);\n $already_enrolled[] = $user->get_firstname() . ' ' . $user->get_lastname();\n }\n }\n else\n {\n unset($group_users[$id]);\n }\n }\n // type = group\n elseif ($type == self::PARAM_GROUP)\n {\n $context_group_users = $this->viewer->get_context_group_users($id);\n \n foreach ($context_group_users as $user)\n {\n if (! in_array($user->get_id(), $group_users))\n {\n if (! $this->viewer->user_is_enrolled_in_group($user->get_id()))\n {\n $this->viewer->add_user_to_group($user->get_id(), $this->group_id); // user can be\n // enrolled in\n // one\n // PA-group/publication\n }\n else\n {\n $already_enrolled[] = $user->get_firstname() . ' ' . $user->get_lastname();\n }\n }\n else\n {\n unset($group_users[$id]);\n }\n }\n }\n }\n }\n \n // remove remaining users\n foreach ($group_users as $user_id)\n {\n $this->viewer->remove_user_from_group($user_id, $this->group_id);\n }\n }\n \n if (count($already_enrolled) > 0)\n $this->enroll_errors = implode(',', $already_enrolled) . ' ' . Translation::get('AlreadyEnrolled');\n }",
"function fm_update_folders_cats($catid) {\r\n\t// Changes all associated links to deleted cat to 0\r\n\tif ($linkcats = get_records('fmanager_folders', \"category\", $catid)) {\r\n\t\tforeach ($linkcats as $lc) {\t\t\r\n\t\t\t$lc->category = 0;\r\n\t\t\tif (!update_record('fmanager_folders', $lc)) {\r\n\t\t\t\terror(get_string(\"errnoupdate\",'block_file_manager'));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}",
"public function download_user_component_update() {\n \n // Download Update\n (new MidrubBaseAdminCollectionUpdateHelpers\\User_components)->download_update();\n \n }",
"public function postUserupdate(){\n \n $uid = Input::get('user_id');\n $user = User::find($uid);\n if($user != ''){\n $user->email = Input::get('useremail');\n $user->fullname = Input::get('fullname');\n $user->category = Input::get('category');\n $user->language = Input::get('language');\n $user->enable = Input::get('enable');\n $user->save();\n return Redirect::to('admin/edituser/'.$uid)\n ->with('message', 'User data updated!');\n }else{\n return Redirect::to('admin/edituser/'.$uid)\n ->with('message', 'No such user!');\n }\n\n }",
"function sync_roles( $user ) {\n\t\tif ( array_key_exists( $this->auth_host_index, $this->config->roles) ) {\n $role_id = $this->config->roles[$this->auth_host_index];\n if ( $role_id != 0 ) {\n $systemcontext = get_context_instance( CONTEXT_SYSTEM );\n role_assign( $role_id, $user->id, $systemcontext->id, 'auth_imap_plus' );\n }\n }\n\t}",
"public function updatePermissions(Request $request, User $user)\n {\n // dd($request);\n // dd($user->id);\n\n //\n // Updates the Detail Table (Synchronizing)\n //\n $profileInfo = $user->profile;\n // dd($profileInfo);\n // dd($request->input('permissionsAssigned')); // list of the permissions to be assigned\n\n // $profileInfo->roles()->sync($request->input('rolesAssigned'));\n $this->syncPermissions($profileInfo, $request->input('permissionsAssigned'));\n\n // @todo: Update log updated_by / updated timestamp\n\n return back()->with('success', __('Permissions Updated') );\n }",
"function updateUser(&$user) {\r\n\t\t$wpuser=get_userdatabylogin($user->mName);\r\n\t\tif(!$wpuser)\r\n\t\t\treturn false;\r\n\t\t$user->setEmail($wpuser->user_email);\r\n\t\t$user->setRealName($wpuser->user_nicename);\r\n\t\t$user->saveSettings();\r\n\t\treturn true;\r\n\t}",
"function updateUser (){\n\t\t$params = array(\n\t\t\t':idusuarios' => $_SESSION['idusuarios'],\n\t\t\t':nombres' => $_POST['nombres'],\n\t\t\t':apellidos' => $_POST['apellidos'],\n\t\t\t':direccion' => $_POST['direccion'],\n\t\t\t':foto' => $_POST['foto'],\n\t\t\t':email' => $_POST['email'],\n\t\t\t':usuario' => $_POST['usuario'],\n\t\t\t':contrasena' => $_POST['contrasena'],\n\t\t);\n\n\t\t/* Preparamos el query apartir del array $params*/\n\t\t$query ='UPDATE usuarios SET\n\t\t\t\t\tnombres = :nombres,\n\t\t\t\t\tapellidos = :apellidos,\n\t\t\t\t\tdireccion = :direccion,\n\t\t\t\t\tfoto = :foto,\n\t\t\t\t\temail = :email,\n\t\t\t\t\tusuario = :usuario,\n\t\t\t\t\tcontrasena = :contrasena \n\t\t\t\t WHERE idusuarios = :idusuarios;\n\t\t\t\t';\n\n\t\t$result = excuteQuery(\"blogs\", \"\", $query, $params);\n\t\tif ($result > 0){\n\t\t\tunset($_SESSION['idusuarios']);\n\t\t\t$_SESSION['idusuarios'] = NULL;\n\t\t\theader('Location: viewUsers.php?result=true');\n\t\t}else{\n\t\t\theader('Location: editUser.php?result=false');\n\t\t}\n\t}",
"public function updateUserInfo($allowNewUser = true, $level = null)\n\t{\n \n\t\t$state = $this->getStateVariables();\n\t\t$user = JFactory::getUser();\n \n if($user->guest) {\n \n $user->id = 0;\n }\n \n \n \n \n\t\t$user = $this->getState('user', $user);\n \n \n \n\n\t\tif(($user->id == 0) && !$allowNewUser) {\n\t\t\t// New user creation is not allowed. Sorry.\n\t\t\treturn false;\n\t\t}\n\n\t\tif($user->id == 0) {\n\t\t\t// Check for an existing, blocked, unactivated user with the same\n\t\t\t// username or email address.\n\t\t\t$user1 = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t\t->username($state->username)\n\t\t\t\t->block(1)\n\t\t\t\t->getFirstItem();\n \n\t\t\t$user2 = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t\t->email($state->email)\n\t\t\t\t->block(1)\n\t\t\t\t->getFirstItem();\n\t\t\t$id1 = $user1->id;\n\t\t\t$id2 = $user2->id;\n \n \n\t\t\t// Do we have a match?\n\t\t\tif($id1 || $id2) {\n\t\t\t\tif($id1 == $id2) {\n\t\t\t\t\t// Username and email match with the blocked user; reuse that\n\t\t\t\t\t// user, please.\n\t\t\t\t\t$user = JFactory::getUser($user1->id);\n\t\t\t\t} elseif($id1 && $id2) {\n\t\t\t\t\t// We have both the same username and same email, but in two\n\t\t\t\t\t// different users. In order to avoid confusion we will remove\n\t\t\t\t\t// user 2 and change user 1's email into the email address provided\n\n\t\t\t\t\t// Remove the last subscription for $user2 (it will be an unpaid one)\n\t\t\t\t\t$submodel = FOFModel::getTmpInstance('Subscriptions','AkeebasubsModel');\n\t\t\t\t\t$substodelete = $submodel\n\t\t\t\t\t\t->user_id($id2)\n\t\t\t\t\t\t->getList();\n\t\t\t\t\tif(!empty($substodelete)) foreach($substodelete as $subtodelete) {\n\t\t\t\t\t\t$subtable = $submodel->getTable();\n\t\t\t\t\t\t$subtable->delete($subtodelete->akeebasubs_subscription_id);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove $user2 and set $user to $user1 so that it gets updated\n\t\t\t\t\t$user2->delete($id2);\n\t\t\t\t\t$user = JFactory::getUser($user1->id);\n\t\t\t\t\t$user->email = $state->email;\n\t\t\t\t\t$user->save(true);\n\t\t\t\t} elseif(!$id1 && $id2) {\n\t\t\t\t\t// We have a user with the same email, but the wrong username.\n\t\t\t\t\t// Use this user (the username is updated later on)\n\t\t\t\t\t$user = JFactory::getUser($user2->id);\n\t\t\t\t} elseif($id1 && !$id2) {\n\t\t\t\t\t// We have a user with the same username, but the wrong email.\n\t\t\t\t\t// Use this user (the email is updated later on)\n\t\t\t\t\t$user = JFactory::getUser($user1->id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(is_null($user->id) || ($user->id == 0)) {\n\t\t\t// CREATE A NEW USER\n\t\t\t$params = array(\n\t\t\t\t'name'\t\t\t=> $state->name,\n\t\t\t\t'username'\t\t=> $state->username,\n\t\t\t\t'email'\t\t\t=> $state->email,\n\t\t\t\t'password'\t\t=> $state->password,\n\t\t\t\t'password2'\t\t=> $state->password2\n\t\t\t);\n\n\t\t\t$user = JFactory::getUser(0);\n\n\t\t\tJLoader::import('joomla.application.component.helper');\n\t\t\t$usersConfig = JComponentHelper::getParams( 'com_users' );\n\t\t\t$newUsertype = $usersConfig->get( 'new_usertype' );\n\n\t\t\tif(version_compare(JVERSION, '1.6.0', 'ge')) {\n\t\t\t\t// get the New User Group from com_users' settings\n\t\t\t\tif(empty($newUsertype)) $newUsertype = 2;\n\t\t\t\t$params['groups'] = array($newUsertype);\n\t\t\t} else {\n\t\t\t\tif (!$newUsertype) {\n\t\t\t\t\t$newUsertype = 'Registered';\n\t\t\t\t}\n\t\t\t\t$acl = JFactory::getACL();\n\t\t\t\t$params['gid'] = $acl->get_group_id( '', $newUsertype, 'ARO' );\n\t\t\t}\n\n\t\t\t$params['sendEmail'] = 0;\n\n\t\t\t// Set the user's default language to whatever the site's current language is\n\t\t\tif(version_compare(JVERSION, '3.0', 'ge')) {\n\t\t\t\t$params['params'] = array(\n\t\t\t\t\t'language'\t=> JFactory::getConfig()->get('language')\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$params['params'] = array(\n\t\t\t\t\t'language'\t=> JFactory::getConfig()->getValue('config.language')\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// We always block the user, so that only a successful payment or\n\t\t\t// clicking on the email link activates his account. This is to\n\t\t\t// prevent spam registrations when the subscription form is abused.\n\t\t\tJLoader::import('joomla.user.helper');\n\t\t\t$params['block'] = 1;\n\t\t\t$params['activation'] = JFactory::getApplication()->getHash( JUserHelper::genRandomPassword() );\n\n\t\t\t$userIsSaved = false;\n\t\t\t$user->bind($params);\n\t\t\t$userIsSaved = $user->save();\n\t\t} else {\n\t\t\t// UPDATE EXISTING USER\n\n\t\t\t// Remove unpaid subscriptions on the same level for this user\n\t\t\t$unpaidSubs = FOFModel::getTmpInstance('Subscriptions','AkeebasubsModel')\n\t\t\t\t->user_id($user->id)\n\t\t\t\t->paystate('N','X')\n\t\t\t\t->getItemList();\n\t\t\tif(!empty($unpaidSubs)) foreach($unpaidSubs as $unpaidSub) {\n\t\t\t\t$table = FOFModel::getTmpInstance('Subscriptions','AkeebasubsModel')->getTable();\n\t\t\t\t$table->delete($unpaidSub->akeebasubs_subscription_id);\n\t\t\t}\n\n\t\t\t// Update existing user's details\n\t\t\t$userRecord = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t\t->setId($user->id)\n\t\t\t\t->getItem();\n\n\t\t\t$updates = array(\n\t\t\t\t'name'\t\t\t=> $state->name,\n\t\t\t\t'email'\t\t\t=> $state->email\n\t\t\t);\n\t\t\tif(!empty($state->password) && ($state->password = $state->password2)) {\n\t\t\t\tJLoader::import('joomla.user.helper');\n\t\t\t\t$salt = JUserHelper::genRandomPassword(32);\n\t\t\t\t$pass = JUserHelper::getCryptedPassword($state->password, $salt);\n\t\t\t\t$updates['password'] = $pass.':'.$salt;\n\t\t\t}\n\t\t\tif(!empty($state->username)) {\n\t\t\t\t$updates['username'] = $state->username;\n\t\t\t}\n\t\t\t$userIsSaved = $userRecord->save($updates);\n\t\t}\n\n\t\t// Send activation email for free subscriptions if confirmfree is enabled\n\t\tif($user->block && ($level->price < 0.01)) {\n\t\t\tif(!class_exists('AkeebasubsHelperCparams')) {\n\t\t\t\trequire_once JPATH_ADMINISTRATOR.'/components/com_akeebasubs/helpers/cparams.php';\n\t\t\t}\n\t\t\t$confirmfree = AkeebasubsHelperCparams::getParam('confirmfree', 0);\n\t\t\tif($confirmfree) {\n\t\t\t\t// Send the activation email\n\t\t\t\tif(!isset($params)) $params = array();\n\t\t\t\t$this->sendActivationEmail($user, $params);\n\t\t\t}\n\t\t}\n\n\t\tif(!$userIsSaved) {\n\t\t\tJError::raiseWarning('', JText::_( $user->getError())); // ...raise a Warning\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$this->setState('user', $user);\n\t\t}\n\n\t\treturn $userIsSaved;\n\t}",
"public function changeOwner($files, $user, $recursive = false);",
"public function setAcl($folder, $user, $acl)\n {\n Horde_Kolab_Storage_Exception_Pear::catchError(\n $this->getBackend()->setACL($this->encodePath($folder), $user, $acl)\n );\n }",
"public function updateUserOffline()\n {\n $this->is_online = 0;\n $this->save();\n }",
"public static function updateUserLocation() {\r\n $debug = \\Drupal::config('smart_ip.settings')->get('debug_mode');\r\n if (!$debug) {\r\n $ip = \\Drupal::request()->getClientIp();\r\n $smartIpSession = self::getSession('smart_ip');\r\n if (!isset($smartIpSession['location']['ipAddress']) || $smartIpSession['location']['ipAddress'] != $ip) {\r\n $result = self::query();\r\n self::userLocationFallback($result);\r\n /** @var \\Drupal\\smart_ip\\SmartIpLocation $location */\r\n $location = \\Drupal::service('smart_ip.smart_ip_location');\r\n $location->setData($result);\r\n $location->save();\r\n }\r\n }\r\n }",
"public function actionSetTypeUsers()\n {\n if (count($_GET) > 0) {\n foreach ($_GET as $userID => $typeValue) {\n $userID = intval($userID);\n\n //check input data\n if ($userID == 0 || !isset($this->userTypes[$typeValue])) {\n $this->redirect('/admin?tab=user_type_mgmt');\n die;\n }\n\n $typeValue = $this->userTypes[$typeValue];\n\n // get user\n $user = Users::model()->findByPk($userID);\n\n\n if ($typeValue == 'DB Admin') {\n //we need to check it\n\n //if current user is\n if (Yii::app()->user->id == 'admin') {\n Yii::app()->user->setFlash('error', \"Admin can't change his user type to 'DBAdmin'\");\n } else {\n $user->User_Type = $typeValue;\n $user->save();\n Yii::app()->user->setFlash('success', \"Users' types have been successfully updated!\");\n }\n } else {\n $user->User_Type = $typeValue;\n $user->save();\n Yii::app()->user->setFlash('success', \"Users' types have been successfully updated!\");\n }\n\n\n\n\n }\n\n\n } else {\n Yii::app()->user->setFlash('success', \"You don't choose the users!\");\n }\n $this->redirect('/admin?tab=user_type_mgmt');\n }",
"public function updateUser(UserInterface $user);",
"function updateUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"PUT\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['user_name']) && isset($_POST['password']) && isset($_POST['_id'])){\n\t\t\t\t\t$user_id = $_POST['_id'];\n\t\t\t\t\t$array['user_name'] = $_POST['user_name'];\n\t\t\t\t\t$array['password'] = $_POST['password'];\n\t\t\t\t\t$result = $this->model->setUser($array, \"_id='\".$user_id.\"'\");\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record updated.';\n\t\t\t\t\t\t$update = $this->model->getUser('*',\"_id = \".\"'\".$user_id.\"'\");\n\t\t\t\t\t\t$response_array['data']=$update;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='no record updated';\n\t\t\t\t\t\t$response_array['data']='';\n\t\t\t\t\t\t$this->rest->response($response_array, 304);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public function update($user)\n {\n }",
"function updateUser( &$user ){\n $user->setName($this->getFasUsername());\n $user->mEmail = strtolower($user->getName()).\"@fedoraproject.org\";\n //error_log(\"FAS [updateUser]: \" . $user->getName() . \", \" . $this->getFasUsername(), 0);\n return true;\n }",
"public function update($user_id)\n\t{\n\t\t//\n\t}",
"public function update($userID)\n\t{\n\t\n\t\t$this->data['page'] = \"users\";\n\t\t\n\t\t//get all users\n\t\t$this->data['users'] = $this->usermodel->getAll();\n\t\t\n\t\t//get roles\n\t\t$this->data['roles'] = $this->rolemodel->getAll();\n\t\t\n\t\t$this->data['theUser'] = $this->usermodel->getUser($userID);\n\t\t\n\t\t$this->form_validation->set_rules('firstname', 'First name', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('lastname', 'Last name', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('group', 'User role', 'trim|required|xss_clean');\n\t\t\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\n\t\t\t$this->load->view('users/users', $this->data);\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\t$data = array(\n\t\t\t\t'first_name' => $_POST['firstname'],\n\t\t\t\t'last_name' => $_POST['lastname'],\n\t\t\t\t'company' => $_POST['company'],\n\t\t\t\t'phone' => $_POST['phone']\n\t\t\t);\n\t\t\t\n\t\t\t$this->ion_auth->update($userID, $data);\n\t\t\n\t\t\t//update user role/group\n\t\t\t$data = array(\n\t\t\t\t'group_id' => $_POST['group']\n\t\t\t);\n\t\t\t\n\t\t\t$this->db->where('user_id', $userID);\n\t\t\t$this->db->update('dbapp_users_groups', $data);\n\t\t\t\n\t\t\t//if the new role is Adminisiatrtor, we'll need to take of the MySQL site of things\n\t\t\t\n\t\t\tif( $_POST['group'] == 1 ) {\n\t\t\t\t\t\t\n\t\t\t\t$this->usermodel->makeAdmin($userID);\n\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t//setup the permissions for the new user\n\t\t\t\t\n\t\t\t\t$temp = $this->db->from('dbapp_groups')->where('id', $_POST['group'])->get()->result();\n\t\t\t\t\n\t\t\t\t$permissions = json_decode( $temp[0]->permissions, true );\n\t\t\t\t\n\t\t\t\t$this->rolemodel->applyPermissions($permissions, $mysqlUser = $this->ion_auth->user($userID)->row()->mysql_user);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$this->session->set_flashdata('success_message', $this->lang->line('users_update_success'));\n\t\t\t\n\t\t\tredirect(\"/users/\".$userID, \"refresh\");\n\t\t\t\n\t\t}\n\t\n\t}",
"private function updateUser(){\n\t\t$data['datosUsuario'] = $this->users->get($_REQUEST[\"idusuario\"]);\n\t\t$data['tipoUsuario'] = Seguridad::getTipo(); \n\t\tView::show(\"user/updateForm\", $data);\n\t}",
"function update ($encoded_key_string, $name_values_array, $update_session = FALSE)\r\n {\r\n $this->_log->trace(\"update user (encoded_key_string=\".$encoded_key_string.\")\");\r\n\r\n if (array_key_exists(USER_PW_FIELD_NAME, $name_values_array) == TRUE)\r\n {\r\n $password_str = $name_values_array[USER_PW_FIELD_NAME];\r\n if (strlen($password_str) > 0)\r\n {\r\n $this->_log->debug(\"found a password\");\r\n $name_values_array[USER_PW_FIELD_NAME] = md5($password_str);\r\n }\r\n else\r\n {\r\n $this->_log->debug(\"found an empty password\");\r\n unset($name_values_array[USER_PW_FIELD_NAME]);\r\n }\r\n }\r\n\r\n # if user is admin then user must also be able to create lists and users\r\n if (array_key_exists(USER_IS_ADMIN_FIELD_NAME, $name_values_array) == TRUE)\r\n {\r\n if ($name_values_array[USER_IS_ADMIN_FIELD_NAME] == 1)\r\n {\r\n $name_values_array[USER_CAN_CREATE_LIST_FIELD_NAME] = 1;\r\n $name_values_array[USER_CAN_CREATE_USER_FIELD_NAME] = 1;\r\n }\r\n }\r\n\r\n # if user is able to create users then user must also be able to create lists\r\n if (array_key_exists(USER_CAN_CREATE_USER_FIELD_NAME, $name_values_array) == TRUE)\r\n {\r\n if ($name_values_array[USER_CAN_CREATE_USER_FIELD_NAME] == 1)\r\n {\r\n $name_values_array[USER_CAN_CREATE_LIST_FIELD_NAME] = 1;\r\n }\r\n }\r\n\r\n # update user name in user_list_permissions\r\n if (array_key_exists(USER_NAME_FIELD_NAME, $name_values_array) == TRUE)\r\n {\r\n # select something from user_list_permissions to check if database table exists\r\n if ($this->_user_list_permissions->select(USERLISTTABLEPERMISSIONS_USER_NAME_FIELD_NAME, 1) == TRUE)\r\n {\r\n # database table user_list_permissions exists\r\n # first get the current user name\r\n $user_array = $this->select_record($encoded_key_string);\r\n if (count($user_array) == 0)\r\n return FALSE;\r\n\r\n $current_user_name = $user_array[USER_NAME_FIELD_NAME];\r\n\r\n # create key string for user_list_permissions\r\n $permission_key_string = USERLISTTABLEPERMISSIONS_USER_NAME_FIELD_NAME.\"='\".$current_user_name.\"'\";\r\n\r\n # create array with new title\r\n $new_title_array = array();\r\n $new_title_array[USERLISTTABLEPERMISSIONS_USER_NAME_FIELD_NAME] = $name_values_array[USER_NAME_FIELD_NAME];\r\n\r\n if ($this->_user_list_permissions->update($permission_key_string, $new_title_array) == FALSE)\r\n {\r\n # copy error strings from user_list_permissions\r\n $this->error_message_str = $this->_user_list_permissions->get_error_message_str();\r\n $this->error_log_str = $this->_user_list_permissions->get_error_log_str();\r\n $this->error_str = $this->_user_list_permissions->get_error_str();\r\n\r\n return FALSE;\r\n }\r\n }\r\n }\r\n\r\n if (parent::update($encoded_key_string, $name_values_array) == FALSE)\r\n return FALSE;\r\n\r\n # set session parameters (only for fields that can be changed in UserSettings page)\r\n if ($update_session == TRUE)\r\n {\r\n $this->set_name($name_values_array[USER_NAME_FIELD_NAME]);\r\n $this->set_lang($name_values_array[USER_LANG_FIELD_NAME]);\r\n $this->set_date_format($name_values_array[USER_DATE_FORMAT_FIELD_NAME]);\r\n $this->set_decimal_mark($name_values_array[USER_DECIMAL_MARK_FIELD_NAME]);\r\n $this->set_lines_per_page($name_values_array[USER_LINES_PER_PAGE_FIELD_NAME]);\r\n $this->set_theme($name_values_array[USER_THEME_FIELD_NAME]);\r\n }\r\n\r\n $this->_log->info(\"user updated (encoded_key_string=\".$encoded_key_string.\")\");\r\n\r\n return TRUE;\r\n }",
"function assign_user()\n\t{\n\t\tglobal $current_user;\n\t\t$ass_user = $this->column_fields[\"assigned_user_id\"];\t\t\n\t\tif( $ass_user != $current_user->id)\n\t\t{\n\t\t\t$result = $this->db->query(\"select id from ec_users where user_name = '\".$ass_user.\"' or last_name = '\".$ass_user.\"'\");\n\t\t\tif($this->db->num_rows($result) != 1)\n\t\t\t{\n\t\t\t\t$this->column_fields[\"assigned_user_id\"] = $current_user->id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t$row = $this->db->fetchByAssoc($result, -1, false);\n\t\t\t\tif (isset($row['id']) && $row['id'] != -1)\n \t {\n\t\t\t\t\t$this->column_fields[\"assigned_user_id\"] = $row['id'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->column_fields[\"assigned_user_id\"] = $current_user->id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function extract_user_component_update() {\n \n // Extract User Component Update\n (new MidrubBaseAdminCollectionUpdateHelpers\\User_components)->extract_update();\n \n }",
"public function update(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::update(): Attempt to update a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\t//Update the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\t\t\r\n\t\t\t$sql = \"UPDATE \".TABLENAME_GROUPS.\" SET name=:name, caption=:caption, adminId=:adminId, per2Id=:per2Id, per3Id=:per3Id, icon_link=:icon_link, status=:status WHERE id = :id\";\r\n\t\t\t$st = $conn->prepare( $sql );\r\n\t\t\t$st->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":caption\", $this->caption, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":adminId\", $this->adminId, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":per2Id\", $this->per2Id, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":per3Id\", $this->per3Id, PDO::PARAM_INT );\r\n\t\t\t$st->bindValue( \":icon_link\", $this->icon_link, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":status\", $this->status, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\techo \"<br>\";\r\n\t\t\t$st->execute();\r\n\t\t//\tprint_r($st->errorInfo());\r\n\t\t\t$conn = null;\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}",
"public function update ($aData)\n {\n try {\n\n $oAppFolder = $this->retrieveByPK ($aData['FOLDER_UID']);\n if ( $oAppFolder !== false )\n {\n if ( $oAppFolder->validate () )\n {\n if ( isset ($aData['FOLDER_NAME']) )\n {\n $oAppFolder->setFolderName ($aData['FOLDER_NAME']);\n }\n\n if ( isset ($aData['FOLDER_UID']) )\n {\n $oAppFolder->setFolderUid ($aData['FOLDER_UID']);\n }\n\n if ( isset ($aData['FOLDER_UPDATE_DATE']) )\n {\n $oAppFolder->setFolderUpdateDate ($aData['FOLDER_UPDATE_DATE']);\n }\n\n $iResult = $oAppFolder->save ();\n\n return $iResult;\n }\n else\n {\n $sMessage = '';\n $aValidationFailures = $oAppFolder->getValidationFailures ();\n\n foreach ($aValidationFailures as $oValidationFailure) {\n $sMessage .= $oValidationFailure . '<br />';\n }\n\n throw (new Exception ('The registry cannot be updated!<br />' . $sMessage));\n }\n }\n else\n {\n throw (new Exception ('This row doesn\\'t exist!'));\n }\n } catch (Exception $oError) {\n throw ($oError);\n }\n }",
"public function testUpdateNetworkMerakiAuthUser()\n {\n }",
"public function update(UserInterface $user, Requests\\UserRequest $request)\n\t{\n $data = $request->all();\n\n // If no one checkbox was checked we need to set 'roleCheck' as empty array to avoid error\n if (!array_key_exists('roleCheck', $data)) $data['roleCheck'] = [];\n\n if ($user->update($data)) {\n $user->roles()->sync($data['roleCheck']);\n }\n \\Session::flash('message', 'Пользователь обновлен');\n return redirect()->route('admin.user.index');\n\t}",
"private function processUpdateUser(){\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->updateUser($_REQUEST[\"idusuario\"], $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif($_REQUEST[\"nombre_foto\"] != \"\")\n\t\t\t\t\t\tunlink(Config::$userDirImage.$_REQUEST[\"nombre_foto\"]);\n\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}",
"public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n\n// $model = $this->findModel($id);\n//\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('update', [\n// 'model' => $model,\n// ]);\n// }\n }",
"private function onAutoFolder()\n\t{\n\t\t$user = GWF_Session::getUser();\n\t\t$userid = GWF_Session::getUserID();\n\t\t\n\t\tif (false === ($pmo = GWF_PMOptions::getPMOptions($user))) {\n\t\t\treturn GWF_HTML::err('ERR_DATABASE', array( __FILE__, __LINE__));\n\t\t}\n\t\tif (0 >= ($peak = $pmo->getAutoFolderValue())) {\n\t\t\treturn $this->module->message('msg_auto_folder_off');\n\t\t}\n\t\t\n\t\t$del = GWF_PM::OWNER_DELETED;\n\t\t# count pm from and to user.\n\t\t$conditions = \"(pm_owner=$userid AND pm_options&$del=0)\";\n\t\t$db = gdo_db();\n\t\t$pms = GDO::table('GWF_PM');\n\t\t$sorted = array();\n\t\tif (false === ($result = $pms->select('*', $conditions))) {\n\t\t\treturn GWF_HTML::err('ERR_DATABASE', array( __FILE__, __LINE__));\n\t\t}\n\t\t\n\t\t# Sort By UID\n\t\twhile (false !== ($row = $db->fetchAssoc($result)))\n\t\t{\n\t\t\t$pm = new GWF_PM($row);\n\t\t\t$other_user = $pm->getOtherUser($user);\n\t\t\t$other_uid = $other_user->getID();\n\t\t\t\n\t\t\tif (!(isset($sorted[$other_uid]))) {\n\t\t\t\t$sorted[$other_uid] = array();\n\t\t\t}\n\t\t\t$sorted[$other_uid][] = $pm;\n\t\t}\n\t\t$db->free($result);\n\t\t\n\t\t$back = '';\n\t\tforeach ($sorted as $uid => $pms)\n\t\t{\n\t\t\tif (count($pms) < $peak) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$other_user = $pms[0]->getOtherUser($user);\n\t\t\t$foldername = $other_user->getVar('user_name');\n\n\t\t\t# Create the folder if not exists.\n\t\t\tif (false === ($folder = GWF_PMFolder::getByName($foldername, $user))) {\n\t\t\t\t$folder = GWF_PMFolder::fakeFolder($user->getID(), $foldername);\n\t\t\t\tif (false === ($folder->insert())) {\n\t\t\t\t\treturn GWF_HTML::err('ERR_DATABASE', array( __FILE__, __LINE__));\n\t\t\t\t}\n\t\t\t\t$back .= $this->module->message('msg_auto_folder_created', array($other_user->displayUsername()));\n\t\t\t}\n\t\t\t\n\t\t\t$moved = 0;\n\t\t\tforeach ($pms as $pm)\n\t\t\t{\n\t\t\t\tif (false !== $pm->move($user, $folder))\n\t\t\t\t{\n\t\t\t\t\t$moved++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($moved > 0) {\n\t\t\t\t$back .= $this->module->message('msg_auto_folder_moved', array($moved, $other_user->displayUsername()));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $back.$this->module->message('msg_auto_folder_done');\n\t}",
"public function updateUser($user_id){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-update.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Get the target user\n $target_user = UserLoader::fetch($user_id);\n \n // Get the target user's groups\n $groups = $target_user->getGroups();\n \n /*\n // Access control for entire page\n if (!$this->_app->user->checkAccess('uri_update_user')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n */\n \n // Only the master account can edit the master account!\n if (($target_user->id == $this->_app->config('user_id_master')) && $this->_app->user->id != $this->_app->config('user_id_master')) {\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n \n // Remove csrf_token\n unset($post['csrf_token']);\n \n // Check authorization for submitted fields, if the value has been changed\n foreach ($post as $name => $value) {\n if ($name == \"groups\" || (isset($target_user->$name) && $post[$name] != $target_user->$name)){\n // Check authorization\n if (!$this->_app->user->checkAccess('update_account_setting', ['user' => $target_user, 'property' => $name])){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n } else if (!isset($target_user->$name)) {\n $ms->addMessageTranslated(\"danger\", \"NO_DATA\");\n $this->_app->halt(400);\n }\n }\n\n // Check that we are not disabling the master account\n if (($target_user->id == $this->_app->config('user_id_master')) && isset($post['enabled']) && $post['enabled'] == \"0\"){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_DISABLE_MASTER\");\n $this->_app->halt(403);\n }\n\n if (isset($post['email']) && $post['email'] != $target_user->email && UserLoader::exists($post['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $post);\n $this->_app->halt(400);\n }\n \n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n if (!$rf->validate()) {\n $this->_app->halt(400);\n } \n \n // Get the filtered data\n $data = $rf->data();\n \n // Update user groups\n if (isset($data['groups'])){\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\" && !isset($groups[$group_id])){\n $target_user->addGroup($group_id);\n } else if ($is_member == \"0\" && isset($groups[$group_id])){\n $target_user->removeGroup($group_id);\n }\n }\n unset($data['groups']);\n }\n \n // Update the user and generate success messages\n foreach ($data as $name => $value){\n if ($value != $target_user->$name){\n $target_user->$name = $value;\n // Custom success messages (optional)\n if ($name == \"enabled\") {\n if ($value == \"1\")\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_ENABLE_SUCCESSFUL\", [\"user_name\" => $target_user->user_name]);\n else\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_DISABLE_SUCCESSFUL\", [\"user_name\" => $target_user->user_name]);\n }\n if ($name == \"active\") {\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_MANUALLY_ACTIVATED\", [\"user_name\" => $target_user->user_name]);\n }\n }\n }\n \n $ms->addMessageTranslated(\"success\", \"ACCOUNT_DETAILS_UPDATED\", [\"user_name\" => $target_user->user_name]);\n $target_user->store(); \n \n }",
"public function UpdateFolder($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }",
"public function update(User $user, MainModel $mainModel)\n {\n //\n }",
"public function update()\n { if (is_null($this->id))\n trigger_error(\"User::update(): Attempt to update a User object that does not have its ID property set.\", E_USER_ERROR);\n \n // Update the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE users SET user_name=:user_name, user_password_hash=:user_password_hash, user_email=:user_email, orcid=:orcid, orcid_code=:orcid_code, orcid_access_token=:orcid_access_token WHERE user_id = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":user_name\", $this->userName, PDO::PARAM_STR);\n $st->bindValue(\":user_password_hash\", $this->userPasswordHash, PDO::PARAM_STR);\n\t$st->bindValue(\":user_email\", $this->userEmail, PDO::PARAM_STR);\n $st->bindValue(\":orcid\", $this->orcid, PDO::PARAM_STR);\n $st->bindValue(\":orcid_code\", $this->orcidCode, PDO::PARAM_STR);\n $st->bindValue(\":orcid_access_token\", $this->orcidAccessToken, PDO::PARAM_STR);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }",
"public function update($id, Request $request)\n {\n $user = User::findOrFail($id);\n if($user->role != 'admin'){\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'email' => 'required|max:255',\n 'contact' => 'max:255',\n 'address' => 'max:255',\n 'role' => 'required',\n 'user_id' => 'required',\n 'branch_id' => 'required'\n ]);\n $user->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'contact' => $request->contact,\n 'address' => $request->address,\n 'department' => $request->department,\n 'designation' => $request->designation,\n 'pin' => $request->pin,\n 'office' => $request->office,\n 'officeaddress' => $request->officeaddress,\n 'role' => $request->role,\n 'status' => 'active',\n 'branch_id' => $request->branch_id,\n 'user_id' => $request->user_id,\n ]);\n\n\n Session::flash('flash_success_msg', 'User updated!');\n\n return redirect('settings/user');\n }\n\n elseif($user->role != 'superadmin'){\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'email' => 'required|max:255',\n 'contact' => 'max:255',\n 'address' => 'max:255',\n 'role' => 'required',\n 'user_id' => 'required',\n 'branch_id' => 'required'\n ]);\n $user->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'contact' => $request->contact,\n 'address' => $request->address,\n 'department' => $request->department,\n 'designation' => $request->designation,\n 'pin' => $request->pin,\n 'office' => $request->office,\n 'officeaddress' => $request->officeaddress,\n 'role' => $request->role,\n 'status' => 'active',\n 'branch_id' => $request->branch_id,\n 'user_id' => $request->user_id,\n ]);\n\n\n Session::flash('flash_success_msg', 'User updated!');\n\n return redirect('settings/user');\n }\n\n else{\n return redirect('settings/user');\n }\n }",
"public function enroll_user_to_group(){\n\t\t $users = array();\n\t\t\t$all_checked_request = $_REQUEST['request_id'];\n\t\t\t$group_id = $_REQUEST['group_id'];\n\t\t\t$group_user_limit = get_post_meta($group_id, 'wdm_group_users_limit_'.$group_id, true);\n\t\t\tif($group_user_limit > 0){\n\t\t\t\tforeach($all_checked_request as $request_id){\n\t\t\t\t\t$request_id = (int)$request_id;\n\t\t\t\t\t$request_info = $this->course_request_by_id($request_id);\n\t\t\t\t\t$user_id = (int)$request_info[0]->user_id;\n\t\t\t\t\tld_update_group_access($user_id, $group_id);\n\t\t\t\t\tupdate_user_meta( $user_id, 'learndash_group_users_'.$group_id.'', $group_id );\n\t\t\t\t\t$this->update_course_request($request_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function update(Request $request, User $user)\n {\n $user->roles()->sync($request->input('role_id'));\n return redirect()->route('level.index');\n }",
"public function setUserRights(\\SplFileInfo $targetDir)\n {\n // we don't do anything under Windows\n if ($this->getOsIdentifier() === 'WIN') {\n return;\n }\n\n // we don't have a directory to change the user/group permissions for\n if ($targetDir->isDir() === false) {\n return;\n }\n\n // Get our system configuration as it contains the user and group to set\n $systemConfiguration = $this->getInitialContext()->getSystemConfiguration();\n\n // get all the files recursively\n $files = $this->globDir($targetDir . '/*');\n\n // Check for the existence of a user\n $user = $systemConfiguration->getParam('user');\n if (!empty($user)) {\n // Change the rights of everything within the defined dirs\n foreach ($files as $file) {\n chown($file, $user);\n }\n chown($targetDir, $user);\n }\n\n // Check for the existence of a group\n $group = $systemConfiguration->getParam('group');\n if (!empty($group)) {\n // Change the rights of everything within the defined dirs\n foreach ($files as $file) {\n chgrp($file, $group);\n }\n chgrp($targetDir, $group);\n }\n }",
"public function test_udpate_user() {\n global $CFG;\n require_once($CFG->dirroot.'/'.$CFG->admin.'/tool/uploadusercli/locallib.php');\n\n $this->resetAfterTest();\n set_config('passwordpolicy', 0);\n $this->setAdminUser();\n\n $course = $this->getDataGenerator()->create_course(['fullname' => 'Maths', 'shortname' => 'math102']);\n $g1 = $this->getDataGenerator()->create_group(['courseid' => $course->id, 'name' => 'Section 1', 'idnumber' => 'S1']);\n $g2 = $this->getDataGenerator()->create_group(['courseid' => $course->id, 'name' => 'Section 3', 'idnumber' => 'S3']);\n\n // Create a user with username jonest.\n $this->getDataGenerator()->create_user(['username' => 'jonest',\n 'email' => '[email protected]', 'firstname' => 'OLDNAME']);\n\n $filepath = $CFG->dirroot.'/lib/tests/fixtures/upload_users.csv';\n\n $clihelper = $this->construct_helper([\"--file=$filepath\", '--uutype='.UU_USER_UPDATE,\n '--uuupdatetype='.UU_UPDATE_FILEOVERRIDE]);\n ob_start();\n $clihelper->process();\n $output = ob_get_contents();\n ob_end_clean();\n\n // CLI output suggests that 1 user was created and 1 skipped.\n $stats = $clihelper->get_stats();\n $this->assertEquals(0, preg_match_all('/New user/', $output));\n $this->assertEquals('Users updated: 1', $stats[0]);\n $this->assertEquals('Users skipped: 1', $stats[1]);\n\n // Tom Jones is enrolled into the course.\n $enrols = array_values(enrol_get_course_users($course->id));\n $this->assertEqualsCanonicalizing(['jonest'], [$enrols[0]->username]);\n // User reznor is not created.\n $this->assertFalse(core_user::get_user_by_username('reznor'));\n // User jonest is updated, new first name is Tom.\n $this->assertEquals('Tom', core_user::get_user_by_username('jonest')->firstname);\n }",
"public function doremoveusers() {\r\n \tif (isset($_SESSION['userid'])) {\r\n \t\tif (isset($_POST['userid']) && isset($_POST['projectid'])){\r\n \t\t\tforeach ($_POST['userid'] as $userid) {\r\n \t\t\t\t$this->model->deleteuserproject($userid, $_POST['projectid']);\r\n \t\t\t}\r\n \t\t}\r\n \t\t$this->redirect('?v=userproject&a=show&p='.$_POST['projectid']);\r\n \t} else {\r\n \t\t$this->redirect('?v=index&a=show');\r\n \t}\r\n }",
"function updatePermissionsForUser($request, $user)\n{\n $userPermissionModel = new UserPermission;\n $userpermissions =\n $userPermissionModel->where([\n 'user_id' => $user->id\n ])->get();\n\n // store the permission IDs for the user in an array\n $permissionids = [];\n foreach ($userpermissions as $userpermission) {\n $permissionids[] = $userpermission->permission_id;\n }\n\n // check if the permissions $_POST array is empty and if it is make it an empty array\n if (!empty($request['permissions'])) {\n $permissions = $request['permissions'];\n } else {\n $permissions = [];\n }\n\n // delete permissions which were in tcp_user_permissions but have not been selected\n foreach ($permissionids as $userpermissionId) {\n if (!in_array($userpermissionId, $permissions)) {\n $userPermissionModel->where([\n 'permission_id' => $userpermissionId,\n 'user_id' => $user->id\n ])->delete();\n }\n }\n\n // add permissions which were not in tcp_user_permissions but have been selected\n foreach ($permissions as $permission) {\n if (!in_array($permission, $permissionids)) {\n $userPermissionModel->create([\n 'permission_id' => $permission,\n 'user_id' => $user->id\n ]);\n }\n }\n}",
"public function assignToUser($data){\r\n $client_id = $data['client_id'];\r\n $user_id = $data['user_id'];\r\n $sql = \"UPDATE clients SET assigned_to_user = '$user_id' WHERE id = '$client_id'\";\r\n\r\n return $this->db->query($sql);\r\n }",
"public function updateUserCounterCache() {\n\t\t$list = $this->User->find('list');\n\t\t$users = array_keys($list);\n\t\t$this->out('<warning>Updating ' . count($users) . ' user project counts...</warning>', 0);\n\t\tif (!count($users)) {\n\t\t\t$this->out('nothing to do.');\n\t\t\treturn;\n\t\t}\n\t\tif ($this->params['dry-run']) {\n\t\t\t$this->out('dry-run.. skipping.');\n\t\t\treturn;\n\t\t}\n\t\tforeach ($users as $userId) {\n\t\t\t$this->User->id = $userId;\n\t\t\t$allCount = $this->Project->find('count', array('conditions' => array('Project.user_id' => $userId)));\n\t\t\t$publicCount = $this->Project->find('count', array('conditions' => array('Project.user_id' => $userId, 'Project.public' => Project::PROJ_PUBLIC)));\n\t\t\t$user = array(\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => $userId,\n\t\t\t\t\t'project_count' => $allCount,\n\t\t\t\t\t'public_count' => $publicCount,\n\t\t\t\t\t'modified' => false,\n\t\t\t\t)\n\t\t\t);\n\t\t\tif (!$this->User->save($user)) {\n\t\t\t\t$this->out('<error>Error saving count.</error>');\n\t\t\t\tdie();\n\t\t\t} else {\n\t\t\t\t$this->out('.', 0);\n\t\t\t}\n\t\t\tunset($user);\n\t\t}\n\t\t$this->out('done.');\n\t}",
"public function update()\n {\n $category = CategoryService::load(\\Request::input('id'))->update(\\Request::all());\n \\Msg::success($category->name . ' has been <strong>updated</strong>');\n return redir('account/categories');\n }",
"function update_user_group($update_user_group, $update_other_user_id) {\n $this->db->where('user_id', $update_other_user_id);\n $this->db->update('users_groups', $update_user_group);\n //echo $this->db->last_query();\n }"
] | [
"0.57592154",
"0.5544456",
"0.5530402",
"0.5491209",
"0.5377705",
"0.5372368",
"0.5371325",
"0.5353898",
"0.53189975",
"0.5292237",
"0.5277547",
"0.5261769",
"0.5208596",
"0.5164006",
"0.5154794",
"0.5138336",
"0.5127323",
"0.5094131",
"0.5090181",
"0.5084386",
"0.50835055",
"0.5081844",
"0.50790316",
"0.5075722",
"0.50703925",
"0.5062282",
"0.5055635",
"0.5055424",
"0.5045114",
"0.5039881",
"0.5037338",
"0.5035611",
"0.503457",
"0.501879",
"0.4992553",
"0.4985525",
"0.49842656",
"0.49667144",
"0.49640876",
"0.4949749",
"0.49466437",
"0.49416372",
"0.49349606",
"0.4926342",
"0.49156302",
"0.49121705",
"0.4901486",
"0.4899425",
"0.48950893",
"0.4886585",
"0.48719147",
"0.48603892",
"0.4855344",
"0.48513386",
"0.4851051",
"0.48459584",
"0.48426682",
"0.4842005",
"0.4838858",
"0.4835029",
"0.48329955",
"0.48284236",
"0.48265532",
"0.4819834",
"0.4807223",
"0.48049563",
"0.4801988",
"0.47910634",
"0.47875053",
"0.4783763",
"0.47817028",
"0.47788882",
"0.47755393",
"0.47751588",
"0.4772483",
"0.4772079",
"0.47576863",
"0.47562385",
"0.47561926",
"0.47558925",
"0.47554675",
"0.4754496",
"0.4740977",
"0.47370645",
"0.47304204",
"0.4728531",
"0.47277117",
"0.4725985",
"0.47256264",
"0.47181693",
"0.47171664",
"0.47073862",
"0.4701907",
"0.47018456",
"0.47010332",
"0.46971962",
"0.4692746",
"0.469043",
"0.46895683",
"0.46886423"
] | 0.6122778 | 0 |
Run the database seeds. | public function run()
{
$title = Str::random(10);
DB::table('channels')->insert([
'title' => $title,
'slug' => Str::of($title)->slug(),
'description' => Str::random(100)
]);
} | {
"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(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 // $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 // \\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 // $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 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(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 \\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 // $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\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\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 // $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 //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.80140394",
"0.7980541",
"0.79775697",
"0.79547316",
"0.79514134",
"0.79500794",
"0.79444957",
"0.794259",
"0.79382807",
"0.7937482",
"0.7934376",
"0.7892533",
"0.7881253",
"0.78794724",
"0.7879101",
"0.7875628",
"0.787215",
"0.7870168",
"0.78515327",
"0.7850979",
"0.7841958",
"0.7834691",
"0.78279406",
"0.78198457",
"0.78093415",
"0.78030044",
"0.7802443",
"0.7801398",
"0.7798975",
"0.77957946",
"0.77905124",
"0.7789201",
"0.77866685",
"0.77786297",
"0.7777914",
"0.7764813",
"0.7762958",
"0.7762118",
"0.77620417",
"0.77614594",
"0.7760672",
"0.77599436",
"0.77577287",
"0.7753593",
"0.7749794",
"0.7749715",
"0.77473587",
"0.77301705",
"0.77296484",
"0.77280766",
"0.77165425",
"0.77143145",
"0.7714117",
"0.77136046",
"0.7712814",
"0.7712705",
"0.7711485",
"0.7711305",
"0.77110684",
"0.77102643",
"0.7705902",
"0.77048075",
"0.77041686",
"0.77038115",
"0.7703085",
"0.7702133",
"0.77009964",
"0.7698874",
"0.769864",
"0.76973957",
"0.7696364",
"0.7694127",
"0.7692633",
"0.76910555",
"0.7690765",
"0.7688756",
"0.76879585",
"0.76873547",
"0.76871854",
"0.7685407",
"0.7683626",
"0.76794547",
"0.7678361",
"0.7678022",
"0.7676884",
"0.7672536",
"0.76717764",
"0.7669418",
"0.76692647",
"0.76690245",
"0.76667875",
"0.76628584",
"0.76624",
"0.76618767",
"0.7660002",
"0.76567614",
"0.76542175",
"0.76541024",
"0.7652618",
"0.76524657",
"0.7651689"
] | 0.0 | -1 |
Create a new middleware instance. The guard instance is used to check if a user is authenticated | public function __construct(Guard $guard)
{
$this->guard = $guard;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n\t{\n\t\treturn $this->middleware('auth');\n\t}",
"public function __construct()\n {\n return $this->middleware('auth');\n }",
"public function __construct()\n {\n return $this->middleware('auth');\n }",
"public function __construct()\n {\n return $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware(function ($request, $next) {\n $loginUser = Auth::guard('web')->user();\n if(is_object($loginUser)){\n return $next($request);\n }\n return Redirect::to('/');\n });\n }",
"public function __construct() {\n $this->middleware(function ($request, $next) {\n $loginUser = Auth::guard('web')->user();\n if(is_object($loginUser)){\n return $next($request);\n }\n return Redirect::to('/');\n });\n }",
"public function __construct() {\n $this->middleware(function ($request, $next) {\n $loginUser = Auth::guard('web')->user();\n if(is_object($loginUser)){\n return $next($request);\n }\n return Redirect::to('/');\n });\n }",
"public function __construct() {\n $this->middleware( 'auth' );\n }",
"public function __construct() {\n $this->middleware( 'auth' );\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('verified');\n $this->middleware('checkrole');\n }",
"public function __construct()\n {\n $this->middleware('isadmin');\n $this->middleware('auth');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('hasPermission:user-and-role-administration');\n }",
"public function __construct ()\n {\n $this->middleware( 'auth' );\n }",
"public function __construct()\n {\n $this->middleware( 'auth' );\n }",
"public function __construct()\n {\n $this->middleware('auth');\n // Check if user has Administrator role.\n $this->middleware('role:1000');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('checkRole:admin');\n }",
"public function __construct()\n {\n $this->middleware(['isAuth']);\n }",
"public function __construct()\n {\n // check the authentication\n $this->middleware('auth');\n // check the user_type\n $this->middleware('setter');\n }",
"public function __construct()\n {\n $this->middleware(\"login\");\n }",
"function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware(\"auth\");\n }",
"public function __contruct()\n {\n $this->middleware('auth');\n }",
"public function __construct()\n {\n $this->middleware('auth:guardian');\n }",
"public function __construct()\n {\n $this->middleware('auth:guardian');\n }",
"public function __construct()\n {\n $this->middleware(Authenticate::class);\n }",
"public function __construct(){\n\t\t$this->middleware( 'auth' );\n\t}",
"public function __construct()\n {\n $this->middleware(function ($request, $next) {\n $this->user = Auth::user();\n\n return $next($request);\n });\n }",
"public function __construct()\n\t{\n\t\t$this->middleware('auth');\n\t\t$this->middleware('lock');\n\t\t//$this->middleware('is_admin');\n\t}",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('role:app');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('user');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('user');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('user');\n }",
"public function __construct() {\n $this->middleware('auth');\n $this->middleware('isAdmin');\n }",
"public function __construct() {\n $this->middleware('auth');\n $this->middleware('verified');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n // $this->middleware('active_user');\n }",
"public function __construct()\n {\n $this->middleware(function($request, $next){\n if($this->guard()->check()){\n return redirect($this->redirectPath());\n }\n return $next($request);\n })->except('logout');\n }",
"public function __construct() {\n\n\t\t$this->middleware( 'auth' );\n\n\t}",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('verified');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('verified');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"function __construct()\n {\n $this->middleware('auth');\n }",
"public function __construct()\n {\n $this->middleware('checkauth', ['only' => ['getUser', 'setname', 'setemail', 'setpassword']]);\n// $this->middleware('checkuser', ['only' => ['setname', 'setemail', 'setpassword']]);\n }",
"public function __construct()\n\t{\n\t\t$this->middleware('auth');\n\t\t$this->middleware('verified');\n\t}",
"public function _construct()\n {\n $this->middleware('auth');\n }",
"public function __construct()\n {\n $middlewareGroup = new MiddlewareGroup();\n $middlewareGroup->user();\n $middlewareGroup->handle();\n }",
"public function __construct()\n {\n $this->middleware(\"auth\");\n }",
"public function __construct()\n {\n $this->middleware(\"auth\");\n }",
"public\n\n\tfunction __construct() {\n\t\t$this->middleware( 'auth' );\n\t}",
"public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }",
"public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }",
"public function __construct() {\n $this->middleware(function ($request, $next) {\n $adminUser = Auth::guard('admin')->user();\n if(is_object($adminUser)){\n if($adminUser->hasRole('admin')){\n return $next($request);\n }\n }\n return Redirect::to('admin/home');\n });\n }",
"public function __construct()\n {\n $this->middleware(array('auth', 'student'));\n }",
"public function __construct()\n {\n $this->middleware(\"acl:admin|moderator\");\n }",
"public function __construct()\n {\n $this->middleware(RedirectIfAuthenticated::class);\n }",
"public function __construct() {\n\t\t$this->middleware ( 'auth' );\n\t}",
"public function __construct()\n {\n $this->middleware('authenticate');\n }",
"public function __construct() {\n $this->middleware('admin');\n $this->middleware('acl:user_add', ['only' => ['create', 'store']]);\n $this->middleware('acl:user_edit', ['only' => ['edit', 'update']]);\n $this->middleware('acl:user_delete', ['only' => ['destroy']]);\n $this->middleware('acl:user_list', ['only' => ['index']]);\n }",
"public function __construct()\n {\n $this->middleware(function($request, $next) {\n $this->user = (Auth::user() === NULL) ? new Guest() : Auth::user();\n\n return $next($request);\n });\n }",
"public function __construct()\n\t{\n\t\t$this->middleware('auth');\n\t\t$this->middleware('active');\n\t}",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('role');\n }",
"public function __construct()\n\t{\n\t\t$this->middleware('auth');\n\t\t$this->middleware('role');\n\t}",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('checkUserType:teacher');\n }",
"public function __construct() {\n\t\t$this->middleware('auth');\n\t}",
"public function __construct()\n {\n $this -> middleware('auth');\n $this -> middleware('check_block');\n }",
"public function __construct() {\n $this->middleware('jwt.auth', ['only' => ['check_auth']]);\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n // $this->middleware('auth');\n // $this->middleware('verified');\n $this->middleware(['auth', 'verified']);\n }",
"public function __construct() {\n\n $this->middleware('auth');\n }",
"public function __construct() {\n\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware( TokenAuth::class );\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('administrator');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n // $this->middleware('role:user'); because we already use the auth in route\n }",
"public function __construct()\n {\n \n $this->middleware('auth');\n }",
"public function __construct()\n {\n// $this->middleware('auth');\n\n $this->middleware(function ($request, $next) {\n\n if (Auth::check()){\n\n return $next($request);\n\n\n }else{\n\n return redirect('/');\n }\n\n\n });\n }",
"public function __construct() {\n $this->middleware('auth');\n $this->middleware('role:admin');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('role:user');\n }",
"public function __construct()\n {\n $this->middleware('user');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n // $this->middleware('user');\n }",
"public function __construct()\n {\n $this->middleware('auth');\n // $this->middleware('user');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }",
"public function __construct() {\n $this->middleware('auth');\n }"
] | [
"0.7289842",
"0.7189362",
"0.7189362",
"0.7189362",
"0.7024287",
"0.7024287",
"0.7024287",
"0.70035505",
"0.70035505",
"0.69610375",
"0.69133663",
"0.6910622",
"0.6907369",
"0.6895478",
"0.68921906",
"0.6888729",
"0.68884206",
"0.68799824",
"0.68718266",
"0.68654084",
"0.6864194",
"0.68612105",
"0.6848275",
"0.6848275",
"0.6846119",
"0.6845664",
"0.6845398",
"0.68345666",
"0.68312556",
"0.68295705",
"0.68295705",
"0.68295705",
"0.68136233",
"0.6795687",
"0.67914987",
"0.6785734",
"0.6777047",
"0.6776795",
"0.6776795",
"0.6776602",
"0.6776602",
"0.6776602",
"0.6776602",
"0.6776602",
"0.6776602",
"0.6776602",
"0.6772362",
"0.67710507",
"0.67709166",
"0.6770864",
"0.67694664",
"0.67694664",
"0.67690057",
"0.67650324",
"0.67650324",
"0.67650324",
"0.676335",
"0.676273",
"0.67615324",
"0.67610043",
"0.6759713",
"0.6757135",
"0.6755494",
"0.6751715",
"0.6744191",
"0.674253",
"0.6736741",
"0.67334837",
"0.67320323",
"0.6718705",
"0.6715134",
"0.67145926",
"0.67132705",
"0.67132705",
"0.6711811",
"0.6711025",
"0.67106146",
"0.67070794",
"0.6706594",
"0.6705425",
"0.6704613",
"0.6698",
"0.6695891",
"0.6695891",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291",
"0.6695291"
] | 0.0 | -1 |
Handle an incoming request. | public function handle(Request $request, Closure $next) : Response
{
if ($this->guard->check()) {
return $next($request);
}
return ($request->ajax())
? response('Unauthorized.', 401)
: redirect()->guest('login');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function handle_request();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"protected abstract function handleRequest();",
"abstract public function handleRequest($request);",
"abstract public function handleRequest(Request $request);",
"public function handle($request);",
"public function handleRequest() {}",
"function handleRequest() ;",
"public function handle(Request $request);",
"protected function handle(Request $request) {}",
"public function handle(array $request);",
"public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }",
"public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }",
"abstract protected function process(Request $request);",
"public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }",
"abstract function handle(Request $request, $parameters);",
"protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }",
"public function handle(ServerRequestInterface $request);",
"public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }",
"function handle(Request $request = null, Response $response = null);",
"public function processRequest();",
"public abstract function processRequest();",
"public function handleRequest(Request $request, Response $response);",
"abstract public function processRequest();",
"public function handle(array $request = []);",
"public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }",
"public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }",
"protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }",
"public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }",
"public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }",
"public function process(Request $request, Response $response, RequestHandlerInterface $handler);",
"public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }",
"public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function handle(Request $request): Response;",
"public static function process_http_request()\n {\n }",
"public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }",
"abstract public function handle(ServerRequestInterface $request): ResponseInterface;",
"public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}",
"public function handle($request, $next);",
"public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }",
"public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }",
"public function process($path, Request $request);",
"public function handle(string $query, ServerRequestInterface $request);",
"public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}",
"private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}",
"public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}",
"public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }",
"public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }",
"public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }",
"final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }",
"public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}",
"function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }",
"public function handle(RequestInterface $request): ResponseInterface;",
"public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }",
"public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );",
"protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}",
"public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}",
"public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}",
"public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }",
"public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }",
"public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }",
"public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);",
"public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}",
"public function serve_request()\n {\n }",
"public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}",
"function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }",
"public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}",
"private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }",
"function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }",
"public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}",
"public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }",
"public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}",
"public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }",
"final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }",
"public function RouteRequest ();",
"public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;",
"public function DispatchRequest ();",
"protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}",
"public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}",
"abstract public function request();",
"public function run() {\r\n $this->routeRequest(new Request());\r\n }",
"public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }",
"public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }",
"public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);",
"public function handle(Request $request, Closure $next);",
"public function handleGetRequest($id);",
"abstract function doExecute($request);",
"public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }",
"abstract public function mapRequest($request);",
"public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }",
"abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);",
"private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }",
"public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}",
"protected function handle(Request $request)\n {\n return 1;\n }",
"public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }",
"public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }",
"public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }"
] | [
"0.8299201",
"0.8147294",
"0.8147294",
"0.8147294",
"0.8127764",
"0.7993589",
"0.7927201",
"0.7912899",
"0.7899075",
"0.76317674",
"0.75089735",
"0.7485808",
"0.74074036",
"0.7377414",
"0.736802",
"0.7294553",
"0.72389543",
"0.7230166",
"0.72108",
"0.71808434",
"0.7170364",
"0.71463037",
"0.7126907",
"0.7122795",
"0.71225274",
"0.7116879",
"0.70607233",
"0.6981947",
"0.6966695",
"0.69393975",
"0.6912079",
"0.68985975",
"0.6887614",
"0.68774897",
"0.6806274",
"0.67969805",
"0.67778915",
"0.6762979",
"0.67565143",
"0.67533374",
"0.67192745",
"0.6683243",
"0.66487724",
"0.66395754",
"0.6634629",
"0.66283566",
"0.6617558",
"0.6610097",
"0.6610011",
"0.6544976",
"0.653806",
"0.6512757",
"0.64682734",
"0.64381886",
"0.6416964",
"0.63373476",
"0.63359964",
"0.6334543",
"0.63308066",
"0.6321675",
"0.63176167",
"0.631661",
"0.6310991",
"0.63108873",
"0.6295945",
"0.6279438",
"0.62778515",
"0.62508965",
"0.62422955",
"0.62321424",
"0.62237644",
"0.6203428",
"0.61954546",
"0.6191255",
"0.61774665",
"0.61682004",
"0.6151806",
"0.61271876",
"0.61257905",
"0.6116093",
"0.61126447",
"0.6112368",
"0.6101652",
"0.60893977",
"0.60871464",
"0.60862815",
"0.60734737",
"0.60535145",
"0.6028341",
"0.60250086",
"0.60224646",
"0.6011745",
"0.6011483",
"0.60106593",
"0.5998867",
"0.5997086",
"0.5991233",
"0.59844923",
"0.59668386",
"0.5961315",
"0.5954762"
] | 0.0 | -1 |
Gets the public 'doctrine.dbal.default_connection' shared service. | protected function getDoctrine_Dbal_DefaultConnectionService()
{
$a = new \Doctrine\DBAL\Logging\LoggerChain();
$a->addLogger(new \Symfony\Bridge\Doctrine\Logger\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \Symfony\Component\HttpKernel\Log\Logger()) && false ?: '_'}, NULL));
$a->addLogger(new \Doctrine\DBAL\Logging\DebugStack());
$b = new \Doctrine\DBAL\Configuration();
$b->setSQLLogger($a);
$c = new \Symfony\Bridge\Doctrine\ContainerAwareEventManager($this);
$c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \Doctrine\ORM\Tools\AttachEntityListenersListener()) && false ?: '_'});
return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \Doctrine\Bundle\DoctrineBundle\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDefaultConnection()\n {\n return $this->getConnection('default');\n }",
"public function getDefaultConnection()\n {\n return $this->resolver->getDefaultConnection();\n }",
"public static function getConnection() {\n return self::$defaultConnection;\n }",
"public function getDefaultConnection(): Connection\n {\n return $this->getConnection($this->default);\n }",
"public function getDefaultConnection()\n {\n return $this->default;\n }",
"public static function getDefaultConnection(){\n return self::get_dba('default');\n\t}",
"public function getDefaultConnection()\n {\n return config::get('database.default');\n }",
"public function getDefaultConnection(): string;",
"public function getDefaultConnection(): string\n {\n return $this->app['config']['manticore.defaultConnection'];\n }",
"function getDefaultConnection()\n{\n\tglobal $cman;\n\treturn $cman->getDefault();\n}",
"public function getDefaultConnection(): string\n {\n return $this->default ?? '';\n }",
"protected function getDefaultConnection()\n {\n return $this->app['config']['quickbooks_manager.default_connection'];\n }",
"protected function getConnection()\n {\n return $this->createDefaultDBConnection($this->createPdo(), static::NAME);\n }",
"public function getDefaultConnectionName()\n {\n return $this->defaultConnection;\n }",
"public static function getDefaultConnection()\n {\n }",
"protected function getConnection()\n {\n $pdo = new PDO(DB_DSN, DB_USER, DB_PASS);\n return new DefaultConnection($pdo, DB_NAME);\n }",
"public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }",
"public function getDefaultConnection()\n {\n if (null === $this->defaultConnectionName) {\n throw new \\RuntimeException('There is not default connection name.');\n }\n\n if (!isset($this->connections[$this->defaultConnectionName])) {\n throw new \\RuntimeException(sprintf('The default connection \"%s\" does not exists.', $this->defaultConnectionName));\n }\n\n return $this->connections[$this->defaultConnectionName];\n }",
"function connection()\n\t{\n\t\tif (isset($this->conn_name)) {\n\t\t\treturn Db::getConnection($this->conn_name);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function getDefaultConnectionName(): string\n {\n return $this->default;\n }",
"public function getDefaultConnectionName()\n {\n return 'default';\n }",
"public function getDefaultConnection()\n {\n if (null !== $this->defaultConnectionName) {\n if (!isset($this->connections[$this->defaultConnectionName])) {\n throw new \\RuntimeException(sprintf('The default connection \"%s\" does not exists.', $this->defaultConnectionName));\n }\n\n $connection = $this->connections[$this->defaultConnectionName];\n } elseif (!$connection = reset($this->connections)) {\n throw new \\RuntimeException('There is not connections.');\n }\n\n return $connection;\n }",
"public function getConnection()\n\t{\n\t\treturn empty($this->db_conn) ? Db::getConnection($this->getConnectionName()) : $this->db_conn;\n\t}",
"public function getDefaultConnectionName()\n {\n return $this->defaultConnectionName;\n }",
"public function getDefaultConnectionName()\n {\n return $this->defaultConnectionName;\n }",
"public function getConnection()\n {\n $this->connection = db($this->connectionName);\n\n return $this->connection;\n }",
"public function getDoctrineConnection()\n {\n $driver = $this->getDoctrineDriver ();\n $data = array (\n 'pdo' => $this->pdo,\n 'dbname' => $this->getConfig ( 'database' )\n );\n return new \\Doctrine\\DBAL\\Connection ( $data, $driver );\n }",
"public static function defaultConnectionName()\n {\n return 'default';\n }",
"public function getDoctrineConnection()\n {\n if(self::$doctrine_connection === null) {\n \n $config = new \\Doctrine\\DBAL\\Configuration();\n \n $connectionParams = array(\n 'dbname' => $GLOBALS['DB_DBNAME'],\n 'user' => $GLOBALS['DB_USER'],\n 'password' => $GLOBALS['DB_PASSWD'],\n 'host' => 'localhost',\n 'driver' => 'pdo_mysql',\n );\n \n self::$doctrine_connection = \\Doctrine\\DBAL\\DriverManager::getConnection($connectionParams, $config);\n }\n \n return self::$doctrine_connection;\n \n }",
"protected function getDatabaseConnection( )\n {\n if( sfConfig::get('sf_use_database') )\n {\n try\n {\n return Doctrine_Manager::connection();\n }\n catch( Doctrine_Connection_Exception $e )\n {\n new sfDatabaseManager(sfContext::getInstance()->getConfiguration());\n return Doctrine_Manager::connection();\n }\n }\n\n return null;\n }",
"protected function getConnection()\n {\n return $this->createDefaultDBConnection(\\DB::connection()->getPdo(), env('DB_DATABASE'));\n }",
"private function getDefaultConnection()\n {\n # get the selected adapter to be our basis\n $selected_adapter = config()->app->db_adapter;\n\n # here, check selected adapter if empty, then\n # disable this provider\n if (strlen($selected_adapter) == 0 || $selected_adapter === false) {\n return $this;\n }\n\n return $this->connection($selected_adapter);\n }",
"protected function getConnection()\n {\n return Model::getConnectionResolver()->connection();\n }",
"public function getDefaultConnectionName();",
"public function getDefaultConnectionModel()\n {\n return ConnectionModel::default();\n }",
"final protected function getConnection(): Connection\n {\n return $this->em->getConnection();\n }",
"public function getDefaultPdo()\n {\n return $this->getPdo($this->defaultPdoName);\n }",
"public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }",
"public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }",
"public function get_connection()\n {\n return $this->connection();\n }",
"public function getConnectionName()\n {\n return config('google-ads-api.database.connection') ?? $this->connection;\n }",
"public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }",
"public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }",
"public static function getDoctrineConnection()\n {\n }",
"protected function getConnection()\n\t{\n\t\treturn $this->createDefaultDBConnection(TEST_DB_PDO(), TEST_GET_DB_INFO()->ldb_name);\n\t}",
"public function getConnectionName()\n {\n return config('yotpo.database.connection') ?? $this->connection;\n }",
"private function connection()\n {\n return Database::connection($this->connectionName);\n }",
"public static function getInstance(){\n if(empty(static::$default_database))\n static::initDB();\n \n return static::$default_database;\n }",
"public function GetConn() {\n\n return $this->\n config['dbconn'];\n }",
"protected function getDbal_ConnService()\n {\n return $this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this);\n }",
"protected function connection () : string {\n return 'default';\n }",
"public function getDbalConnection();",
"final public function getConnection()\n {\n if ($this->conn === null) {\n if (self::$pdo == null) {\n \t$dsn = $this->CI->db->dbdriver.':dbname='.$this->CI->db->database.';host='.$this->CI->db->hostname;\n self::$pdo = new PDO($dsn,$this->CI->db->username, $this->CI->db->password);\n }\n $this->conn = $this->createDefaultDBConnection(self::$pdo, $this->CI->db->database);\n }\n\n return $this->conn;\n }",
"public function getConnection()\n {\n return $this->resolver->connection();\n }",
"public static function getDefaultAdapter(): ?DbAdapterInterface {\r\n return self::$defaultAdapter;\r\n }",
"public function connectDefault() {\n\t\t\treturn $this->connect(Config::DB_SERVER, Config::DB_NAME, Config::DB_USERNAME, Config::DB_PASSWORD);\n\t\t}",
"public function getConnection()\n {\n return Database::getConnection($this->connection);\n }",
"public static function database() : ConnectionInterface\n\t{\n\t\treturn Propel::getWriteConnection('default');\n\t}",
"public function getConnection() {\n return Database::instance();\n }",
"protected function getDatabaseConnection()\n\t{\n\t\t$connection = $this->royalcms['config']['cache.connection'];\n\n\t\treturn $this->royalcms['db']->connection($connection);\n\t}",
"public function _get_db_connection() {\n if (!$this->connection) {\n $target = $key = '';\n $parts = explode(':', $this->get_id());\n // One of the predefined databases (set in settings.php)\n if ($parts[0] == 'db') {\n $key = empty($parts[1]) ? 'default' : $parts[1];\n $target = empty($parts[2]) ? 'default' : $parts[2];\n }\n // Another db url.\n else {\n // If the url is specified build it into a connection info array.\n if (!empty($this->dest_url)) {\n $info = array(\n 'driver' => empty($this->dest_url['scheme']) ? NULL : $this->dest_url['scheme'],\n 'host' => empty($this->dest_url['host']) ? NULL : $this->dest_url['host'],\n 'port' => empty($this->dest_url['port']) ? NULL : $this->dest_url['port'],\n 'username' => empty($this->dest_url['user']) ? NULL : $this->dest_url['user'],\n 'password' => empty($this->dest_url['pass']) ? NULL : $this->dest_url['pass'],\n 'database' => empty($this->dest_url['path']) ? NULL : $this->dest_url['path'],\n );\n $key = uniqid('backup_migrate_tmp_');\n $target = 'default';\n Database::addConnectionInfo($key, $target, $info);\n }\n // No database selected. Assume the default.\n else {\n $key = $target = 'default';\n }\n }\n if ($target && $key) {\n $this->connection = Database::getConnection($target, $key);\n }\n }\n return $this->connection;\n }",
"public function getConnection($name = null)\n {\n return $this->entityManager->getConnection();\n }",
"public function getDbConnection()\n\t{\n\t\treturn parent::getDbConnection();\n\t}",
"protected function connection()\n {\n return Eloquent::getConnectionResolver()->connection();\n }",
"protected function connection()\n {\n return Eloquent::getConnectionResolver()->connection();\n }",
"protected function connection()\n {\n return Eloquent::getConnectionResolver()->connection();\n }",
"public static function get_connection() {\n if (static::$instance === null) {\n static::$instance = new Database;\n }\n return static::$instance->db_handle;\n\t}",
"public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }",
"public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }",
"public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }",
"public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }",
"public static function defaultConnectionName(): string\n {\n return 'product_backend';\n }",
"public function getConnection() {\n if ($this->client) {\n return $this->client->getConnection();\n }\n return null;\n }",
"public static function conn()\n {\n return (static::inst())::$_db;\n }",
"public static function connection($connectionName = 'default')\n {\n return self::getGlobal()->getConnection($connectionName);\n }",
"static function getDbConnection() {\n\n if (empty(static::$db)) {\n $pdo = Service::get('pdo');\n static::$db = new \\PDO($pdo['dns'], $pdo['user'], $pdo['password']);\n }\n return static::$db;\n }",
"protected function getConnection()\n {\n $pdo = new PDO($GLOBALS['DB_DSN'],\n $GLOBALS['DB_USER'],\n $GLOBALS['DB_PASSWORD']);\n return $this->createDefaultDBConnection($pdo, $GLOBALS['DB_NAME']);\n }",
"public static function getConnection(): \\PDO {\r\n return self::getInstance()::$connection;\r\n }",
"public function getConnection()\n {\n return $this->db;\n }",
"public function getConnection(){\n return $this->dbConnection;\n }",
"protected static function getDatabaseConnection() {}",
"protected static function getDatabaseConnection() {}",
"protected static function getDatabaseConnection() {}",
"public function getConnection()\n {\n $connection = DB::connection($this->poolName);\n\n if (isset($this->database)) {\n $connectionDatabase = $connection->getSelectDb() ?: $connection->getDb();\n if ($this->database !== $connectionDatabase) {\n $connection->db($this->database);\n }\n }\n\n return $connection;\n }",
"public function getConnection()\n {\n if($this->connection === null) {\n $this->connect();\n }\n return parent::getConnection();\n }",
"public function getConnection()\n {\n return parent::getConnection();\n }",
"public static function getConnection()\n {\n return self::$pdo;\n }",
"protected function getConnection()\n {\n return $this->_connection;\n }",
"public function get_connection()\n {\n return $this->connection;\n }",
"protected function getConnection()\n {\n return $this->connection;\n }",
"protected function getConnection()\n {\n return $this->connection;\n }",
"public static function getConnection(){\n return static::$db;\n }",
"public static function getConnection()\n {\n if (!isset(self::$_primary))\n {\n self::$_primary = self::_getConnection('primary');\n }\n\n return self::$_primary;\n }",
"public static function getConnection()\n {\n return static::getInstance();\n }",
"protected function getConnection()\n {\n return $this->pdo;\n }",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}"
] | [
"0.81350857",
"0.79463524",
"0.7825295",
"0.77760863",
"0.7753064",
"0.77185494",
"0.7701747",
"0.74805605",
"0.7440557",
"0.7440329",
"0.7239404",
"0.723882",
"0.7122834",
"0.70731086",
"0.70431226",
"0.70157063",
"0.6971493",
"0.6964537",
"0.6956631",
"0.6914261",
"0.68930346",
"0.6853388",
"0.6835133",
"0.6834074",
"0.6834074",
"0.68243164",
"0.6791901",
"0.6766311",
"0.675814",
"0.6733641",
"0.6724807",
"0.67190146",
"0.667775",
"0.66514564",
"0.66395193",
"0.66363674",
"0.66286504",
"0.659805",
"0.659805",
"0.6591628",
"0.65726477",
"0.6555499",
"0.6555499",
"0.6548993",
"0.6533775",
"0.6529993",
"0.6529301",
"0.6524103",
"0.65234053",
"0.6523115",
"0.65055895",
"0.6496389",
"0.64950085",
"0.64845294",
"0.6478862",
"0.64641833",
"0.64606327",
"0.64450103",
"0.6418542",
"0.6417398",
"0.64031005",
"0.63805825",
"0.6367586",
"0.6366743",
"0.6366743",
"0.6366743",
"0.6361475",
"0.6355916",
"0.6355916",
"0.6355916",
"0.6355916",
"0.6355916",
"0.63482666",
"0.6335017",
"0.6330004",
"0.63242143",
"0.63023204",
"0.6298572",
"0.62922883",
"0.627642",
"0.6274168",
"0.62729853",
"0.62729853",
"0.6272881",
"0.6270784",
"0.6261398",
"0.6247862",
"0.62397957",
"0.62391746",
"0.6235386",
"0.6235386",
"0.6233816",
"0.6230138",
"0.622651",
"0.622203",
"0.6218519",
"0.6218519",
"0.6218519",
"0.6218342",
"0.6218342"
] | 0.8255185 | 0 |
Gets the public 'doctrine.orm.default_entity_manager' shared service. | protected function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)
{
$a = new \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain();
$a->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, array(0 => ($this->targetDirs[3].'/src/Entity'))), 'App\\Entity');
$b = new \Doctrine\ORM\Configuration();
$b->setEntityNamespaces(array('App' => 'App\\Entity'));
$b->setMetadataCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] : $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()) && false ?: '_'});
$b->setQueryCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_query_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] : $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()) && false ?: '_'});
$b->setResultCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_result_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] : $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()) && false ?: '_'});
$b->setMetadataDriverImpl($a);
$b->setProxyDir(($this->targetDirs[0].'/doctrine/orm/Proxies'));
$b->setProxyNamespace('Proxies');
$b->setAutoGenerateProxyClasses(true);
$b->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
$b->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
$b->setNamingStrategy(new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy());
$b->setQuoteStrategy(new \Doctrine\ORM\Mapping\DefaultQuoteStrategy());
$b->setEntityListenerResolver(${($_ = isset($this->services['doctrine.orm.default_entity_listener_resolver']) ? $this->services['doctrine.orm.default_entity_listener_resolver'] : $this->services['doctrine.orm.default_entity_listener_resolver'] = new \Doctrine\Bundle\DoctrineBundle\Mapping\ContainerAwareEntityListenerResolver($this)) && false ?: '_'});
$b->setRepositoryFactory(new \Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory(new \Symfony\Component\DependencyInjection\ServiceLocator(array('App\\Repository\\TestRepository' => function () {
return ${($_ = isset($this->services['App\Repository\TestRepository']) ? $this->services['App\Repository\TestRepository'] : $this->load('getTestRepositoryService.php')) && false ?: '_'};
}))));
$this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create(${($_ = isset($this->services['doctrine.dbal.default_connection']) ? $this->services['doctrine.dbal.default_connection'] : $this->getDoctrine_Dbal_DefaultConnectionService()) && false ?: '_'}, $b);
${($_ = isset($this->services['doctrine.orm.default_manager_configurator']) ? $this->services['doctrine.orm.default_manager_configurator'] : $this->services['doctrine.orm.default_manager_configurator'] = new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator(array(), array())) && false ?: '_'}->configure($instance);
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }",
"public function getEntityManager()\n {\n if (null === $this->em) {\n $this->em = $this->getServiceLocator()\n ->get('doctrine.entitymanager.orm_default');\n }\n return $this->em;\n }",
"public function getDefaultManagerName()\n {\n return $this->entityManager;\n }",
"public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}",
"public function getDefaultEntityManagerName()\n {\n // TODO: Implement getDefaultEntityManagerName() method.\n }",
"public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}",
"public function getEntityManager()\r\n {\r\n if (null === $this->em) {\r\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager') ;\r\n }\r\n return $this->em;\r\n }",
"protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine.orm.entity_manager');\n }",
"public static function getEntityManager() {\n if (!self::$_entityManager) {\n global $kernel;\n self::$_entityManager = $kernel->getContainer()->get('doctrine')->getManager();\n }\n return self::$_entityManager;\n }",
"private function getEntityManager()\n {\n if ($this->em === null) {\n $this->em = $this->container->get('doctrine')->getManager();\n }\n return $this->em;\n }",
"protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine')->getManager();\n }",
"public static function getEntityManager()\n {\n $factory = new \\Source44\\Doctrine\\Factory();\n return $factory->createEntityManager();\n }",
"public function getEntityManager()\n {\n return $this->container->get('doctrine')->getManager($this->emName);\n }",
"public function getEntityManager()\n {\n return $this\n ->container\n ->get('doctrine')\n ->getManager();\n }",
"public function getEntityManager()\n {\n return $this['orm.em'];\n }",
"public function getEntityManager()\n {\n if (null === $this->em)\n {\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n return $this->em;\n }",
"private function getManagerServiceId()\n {\n return 'doctrine.orm.entity_manager';\n }",
"protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\n }\n return $this->entityManager;\n }",
"public function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n return $this->entityManager;\n }",
"protected function getEM() {\n return $this->getDoctrine()->getEntityManager();\n }",
"public function getEntityManager($emName = null);",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"public function getEntityManager()\n {\n if (null === $this->entityManager)\n $this->setEntityManager($this->getServiceManager()->get('Doctrine\\ORM\\EntityManager'));\n return $this->entityManager;\n }",
"public function getManager() {\n return $this->em;\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"protected function getEntityManager()\n {\n return $this->entityManager;\n }",
"public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }",
"public function getEntityManager()\n {\n return $this->entityManager;\n }",
"public function getEntityManager()\n {\n return $this->entityManager;\n }",
"public static function entityManager($name = 'default')\n {\n if (isset(self::$entityManagers[$name])) {\n return self::$entityManagers[$name];\n }\n $databaseConnection = self::connection($name)->getDbalConnection();\n\n if (Configuration::get('app.env') == 'development') {\n $cache = new ArrayCache();\n } else { // @codeCoverageIgnore\n $cache = new FilesystemCache(Configuration::get('app.cache')); // @codeCoverageIgnore\n }\n\n $config = new \\Doctrine\\ORM\\Configuration();\n $config->setMetadataCacheImpl($cache);\n $driver = $config->newDefaultAnnotationDriver([APPPATH . 'Entity'], false);\n\n $config->setMetadataDriverImpl($driver);\n $config->setQueryCacheImpl($cache);\n\n $proxyDir = APPPATH . 'Proxy';\n $proxyNamespace = 'App\\Proxy';\n\n $config->setProxyDir($proxyDir);\n $config->setProxyNamespace($proxyNamespace);\n Autoloader::register($proxyDir, $proxyNamespace);\n\n $loggerChain = new LoggerChain();\n if (Configuration::get('app.env') == 'development') {\n $config->setAutoGenerateProxyClasses(true);\n\n $loggerChain->addLogger(new DoctrineLogBridge(\\Logger::getInstance()->getMonologInstance()));\n $loggerChain->addLogger(DebugBarHelper::getInstance()->getDebugStack());\n } else { // @codeCoverageIgnore\n $config->setAutoGenerateProxyClasses(false); // @codeCoverageIgnore\n }\n $em = EntityManager::create($databaseConnection, $config);\n\n $em->getConnection()->getConfiguration()->setSQLLogger($loggerChain);\n $em->getConfiguration()->setSQLLogger($loggerChain);\n\n self::$entityManagers[$name] = $em;\n return $em;\n }",
"public function getManager($name = null)\n {\n return $this->entityManager;\n }",
"public function getEntityManager($name = null)\n {\n $name = $name ? $name : 'doctrine.orm.entity_manager';\n return $this->get($name);\n }",
"public function getEntityManager()\n {\n return $this->em;\n }",
"public function getObjectManager()\n {\n return $this->entityManager;\n }",
"protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = clone self::$container->get('doctrine.orm.entity_manager');\n }\n return $this->entityManager;\n }",
"protected function getEntityManager()\n {\n return $this->em;\n }",
"public function getEntityManager()\n {\n $this->entityManager = $this->refreshEntityManager($this->entityManager);\n\n return $this->entityManager;\n }",
"public function getEntityManager()\n {\n if (!isset($this->entityManager)) {\n $this->recreateEntityManager();\n }\n return $this->entityManager;\n }",
"public function getORM(): EntityManager\n {\n return $this->orm;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"public function getEm()\n {\n if( null === $this->em )\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n\n return $this->em;\n\n }",
"public function getEntityManager(){\n return $this->entityManager;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"public function getEntityManager($name = null) {\r\n\t\treturn $this->context->getState('entityManager');\r\n\t}",
"public function getDefaultEntityManagerBaseDirectory()\n {\n $directory = __DIR__ . '/../Entity/' . self::DEFAULT_ENTITY_MANAGER_SANITIZED_NAME . '/';\n\n return $directory;\n }",
"public function getEntityManager($name = null)\n {\n return $this->controller->getEntityManager($name);\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('Default_Model_Doctrine_Service');\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"public function getEntityManager()\n\t{\n\t\treturn $this->em;\n\t}",
"public function getEntityManager();",
"protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }",
"public function getEntityManager($name = null)\n {\n return $this->getDoctrine()->getManager($name);\n }",
"public function getObjectManager(){\n return $this->entityManager;\n }",
"public function getObjectManager(): mixed\n {\n return $this->objectManager;\n }",
"protected function getEm()\n {\n return $this->entityManager;\n }",
"protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }",
"public function entity()\n {\n return Manager::class;\n }",
"public function getManager()\n {\n return $this->manager;\n }",
"public function getManager()\n {\n return $this->manager;\n }",
"public function getManager()\n {\n return $this->manager;\n }",
"public function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n if ($lazyLoad) {\n\n return $this->services['doctrine.orm.default_entity_manager'] = DoctrineORMEntityManager_00000000428690af0000000049de23ef3bf08b917554782eb259376febf5d820::staticProxyConstructor(\n function (&$wrappedInstance, \\ProxyManager\\Proxy\\LazyLoadingInterface $proxy) {\n $wrappedInstance = $this->getDoctrine_Orm_DefaultEntityManagerService(false);\n\n $proxy->setProxyInitializer(null);\n\n return true;\n }\n );\n }\n\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/AnalyticsBundle/Entity'), 1 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Entity'), 2 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Entity'), 3 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Entity'), 4 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Entity'), 5 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Entity'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Entity'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Entity'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Entity'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/QueryBundle/Entity'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Entity'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Entity'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle/Entity'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Entity'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Entity'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetMapBundle/Entity')));\n\n $c = new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/config/doctrine-mapping') => 'FOS\\\\UserBundle\\\\Model'), '.orm.xml')), 'FOS\\\\UserBundle\\\\Model');\n\n $d = new \\Doctrine\\ORM\\Configuration();\n $d->setEntityNamespaces(array('VictoireAnalyticsBundle' => 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity', 'VictoireBlogBundle' => 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity', 'VictoireBusinessEntityBundle' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity', 'VictoireBusinessPageBundle' => 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity', 'VictoireCoreBundle' => 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity', 'VictoireCriteriaBundle' => 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity', 'VictoireI18nBundle' => 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity', 'VictoireMediaBundle' => 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity', 'VictoirePageBundle' => 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity', 'VictoireQueryBundle' => 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity', 'VictoireSeoBundle' => 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity', 'VictoireTemplateBundle' => 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity', 'VictoireTwigBundle' => 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity', 'VictoireUserBundle' => 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity', 'VictoireWidgetBundle' => 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity', 'VictoireWidgetMapBundle' => 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity'));\n $d->setMetadataCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_metadata_cache'));\n $d->setQueryCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_query_cache'));\n $d->setResultCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_result_cache'));\n $d->setMetadataDriverImpl($c);\n $d->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $d->setProxyNamespace('Proxies');\n $d->setAutoGenerateProxyClasses(false);\n $d->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $d->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $d->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy());\n $d->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $d->setEntityListenerResolver($this->get('doctrine.orm.default_entity_listener_resolver'));\n\n $instance = \\Doctrine\\ORM\\EntityManager::create($this->get('doctrine.dbal.default_connection'), $d);\n\n $this->get('doctrine.orm.default_manager_configurator')->configure($instance);\n\n return $instance;\n }",
"public function getEntityManager($name = null)\n {\n // TODO: Implement getEntityManager() method.\n }",
"public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}",
"protected function getManager()\n {\n return $this->manager;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"public function getManager() {\n return $this->manager;\n }",
"public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager');\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"public function getObjectManager()\r\n {\r\n return $this->objectManager;\r\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"protected static function getFacadeAccessor() {\n\t\t\treturn 'Doctrine\\ORM\\EntityManager';\n\t\t}",
"public function getConnection()\n {\n $eManager = $this->getServiceLocator();\n $entityManager = $eManager->get('doctObjMngr');\n return $entityManager;\n }",
"protected function getObjectManager()\n {\n return $this->objectManager;\n }",
"protected function getObjectManager()\n {\n return $this->_objectManager;\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"public function getSharedManager();",
"public function createDefaultAnnotationManager()\n {\n $annotationManager = new AnnotationManager;\n $parser = new GenericAnnotationParser();\n $parser->registerAnnotation(new Annotation\\Inject());\n $annotationManager->attach($parser);\n\n return $annotationManager;\n }",
"public final function getModuleDoctrineService(): DoctrineService\n {\n return $this->moduleDoctrineService;\n }",
"public static function getManager($entityClass) {\n\t\tif (!isset(self::$managers[$entityClass])) {\n\t\t\tself::$managers[$entityClass] = new EntityManager($entityClass);\n\t\t}\n\t\treturn self::$managers[$entityClass];\n\t}",
"public function getDefaultManagerName()\n {\n // TODO: Implement getDefaultManagerName() method.\n }",
"public function getDefaultGrammarManager(): Manager|null;",
"protected function getIntentionManager()\n {\n return $this->get('intention.execution_manager');\n }",
"function analogue()\n {\n return Manager::getInstance();\n }",
"public function getDatabaseManager(): DatabaseManager\n {\n return $this->manager;\n }",
"public function getDocumentManager()\n {\n return $this->getObjectManager();\n }",
"public function getEntityManager($name = self::DEFAULT_ENTITYMANAGER_NAME) {\n\t\t\n\t\tif (empty($name)) {\n\t\t\tthrow new Exception(\"Entity Manager alias name should be set\");\n\t\t} elseif (isset($this->_entityManagers[$name])) {\n\t\t\tthrow new Exception(\"Entity Manager '{$name}' is not set\");\n\t\t}\n\t\t\n\t\treturn $this;\n\t}",
"public function getManagerForClass($class)\n {\n return $this->entityManager;\n }",
"static protected function getConfigurationManager()\n\t{\n\t\tif (!is_null(static::$configurationManager)) {\n\t\t\treturn static::$configurationManager;\n\t\t}\n\t\t$objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n\t\t$configurationManager = $objectManager->get(ConfigurationManagerInterface::class);\n\t\tstatic::$configurationManager = $configurationManager;\n\t\treturn $configurationManager;\n\t}",
"public function getEntityManager()\n {\n if (!$this->entityManager) {\n throw new \\Exception('Repository requires entity manager to persist data');\n }\n return $this->entityManager;\n }",
"protected function em()\n {\n return $this->getDoctrine()->getManager();\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Gedmo\\Tree\\TreeListener();\n $b->setAnnotationReader($a);\n\n $c = new \\Knp\\DoctrineBehaviors\\Reflection\\ClassAnalyzer();\n\n $d = new \\Gedmo\\Sluggable\\SluggableListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($b);\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sluggable\\SluggableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sluggable\\\\Sluggable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\TranslatableSubscriber($c, new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\CurrentLocaleCallable($this), new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\DefaultLocaleCallable('en'), 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translatable', 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translation', 'LAZY', 'LAZY'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggableSubscriber($c, true, new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggerCallable($this->get('logger'))));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Geocodable\\GeocodableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Geocodable\\\\Geocodable', NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sortable\\SortableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sortable\\\\Sortable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\BlameableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Blameable\\\\Blameable', new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\UserCallable($this), NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Tree\\TreeSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Tree\\\\Node'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Timestampable\\TimestampableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Timestampable\\\\Timestampable', 'datetime'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\SoftDeletable\\SoftDeletableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\SoftDeletable\\\\SoftDeletable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber($this->get('victoire_view_reference.event_subscriber'));\n $f->addEventSubscriber($this->get('victoire_core.widget_discriminator_map.subscriber'));\n $f->addEventSubscriber(new \\FOS\\UserBundle\\Doctrine\\UserListener(${($_ = isset($this->services['fos_user.util.password_updater']) ? $this->services['fos_user.util.password_updater'] : $this->getFosUser_Util_PasswordUpdaterService()) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.canonical_fields_updater']) ? $this->services['fos_user.util.canonical_fields_updater'] : $this->getFosUser_Util_CanonicalFieldsUpdaterService()) && false ?: '_'}));\n $f->addEventSubscriber($this->get('victoire_core.widget_subscriber'));\n $f->addEventSubscriber($this->get('victoire_business_entity.business_entity_subscriber'));\n $f->addEventSubscriber($this->get('victoire_analytics.browser_event.subscriber'));\n $f->addEventSubscriber($this->get('page.subscriber'));\n $f->addEventSubscriber($this->get('victoire_blog.article.subscriber'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('victoire_core.entity_proxy.subscriber'));\n $f->addEventListener(array(0 => 'prePersist', 1 => 'preUpdate', 2 => 'postPersist', 3 => 'postUpdate', 4 => 'preRemove'), $this->get('victoire_media.listener.doctrine'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.default_listeners.attach_entity_listeners'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'db', 'port' => NULL, 'dbname' => 'victoire', 'user' => 'victoire', 'password' => 'victoire', 'charset' => 'UTF8', 'driverOptions' => array(), 'defaultTableOptions' => array()), new \\Doctrine\\DBAL\\Configuration(), $f, array());\n }"
] | [
"0.78133297",
"0.73285985",
"0.73075217",
"0.72936225",
"0.6995809",
"0.6995809",
"0.6857994",
"0.6844832",
"0.67233014",
"0.6634966",
"0.66219455",
"0.6621674",
"0.66114146",
"0.6610785",
"0.6606717",
"0.6572906",
"0.65723026",
"0.65720654",
"0.65678066",
"0.65587914",
"0.6549515",
"0.6537925",
"0.65021324",
"0.64794356",
"0.6478666",
"0.6478666",
"0.64457875",
"0.6443853",
"0.6432297",
"0.6414772",
"0.6395465",
"0.63817346",
"0.63817346",
"0.63582134",
"0.6351475",
"0.6299453",
"0.629532",
"0.62908345",
"0.6289422",
"0.6281447",
"0.6272886",
"0.6265823",
"0.6251929",
"0.62465453",
"0.6225314",
"0.6224587",
"0.6221951",
"0.6221775",
"0.62152165",
"0.6210567",
"0.62105304",
"0.6208991",
"0.6184813",
"0.61728334",
"0.6142014",
"0.61396456",
"0.6080372",
"0.6061921",
"0.6003033",
"0.6002692",
"0.59717053",
"0.5955433",
"0.59245074",
"0.59245074",
"0.59245074",
"0.5899714",
"0.5898691",
"0.5881853",
"0.5876153",
"0.58717245",
"0.5870218",
"0.58517647",
"0.58219475",
"0.58048254",
"0.57561004",
"0.57561004",
"0.57561004",
"0.57561004",
"0.5742375",
"0.5740524",
"0.57346296",
"0.5727219",
"0.57125616",
"0.57125616",
"0.5705079",
"0.5681344",
"0.5651059",
"0.56253856",
"0.56219316",
"0.5621152",
"0.5620891",
"0.561513",
"0.5606814",
"0.55772334",
"0.55545795",
"0.55310494",
"0.5526961",
"0.5512877",
"0.5500362",
"0.5454704"
] | 0.59983355 | 60 |
Gets the public 'doctrine_cache.providers.doctrine.orm.default_metadata_cache' shared service. | protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()
{
$this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \Doctrine\Common\Cache\ArrayCache();
$instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function defaultCache() : Repository\n {\n return Cache::store();\n }",
"public static function getDefaultCache()\n {\n return self::$_defaultCache;\n }",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('Default_Model_Doctrine_Service');\n }",
"public function getDefaultCacheStore(): Store|null;",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function defaultShareProvider() {\n\t\tif ($this->defaultProvider === null) {\n\t\t\t$this->defaultProvider = new DefaultShareProvider(\n\t\t\t\t$this->serverContainer->getDatabaseConnection(),\n\t\t\t\t$this->serverContainer->getUserManager(),\n\t\t\t\t$this->serverContainer->getGroupManager(),\n\t\t\t\t$this->serverContainer->getLazyRootFolder(),\n\t\t\t\t$this->serverContainer->getMailer(),\n\t\t\t\t$this->serverContainer->query(Defaults::class),\n\t\t\t\t$this->serverContainer->getL10NFactory(),\n\t\t\t\t$this->serverContainer->getURLGenerator(),\n\t\t\t\t$this->serverContainer->getConfig()\n\t\t\t);\n\t\t}\n\n\t\treturn $this->defaultProvider;\n\t}",
"public function getDefaultCacheFactory(): ?Factory\n {\n return Cache::getFacadeRoot();\n }",
"protected function getLiipImagine_Cache_Resolver_DefaultService()\n {\n return $this->services['liip_imagine.cache.resolver.default'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Resolver\\WebPathResolver($this->get('filesystem'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ($this->targetDirs[3].'/app/../web'), 'media/cache');\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }",
"public function getDefaultDriver()\n {\n return Arr::get($this->container['config']['cache'], 'default');\n }",
"public function getDefaultManagerName()\n {\n return $this->entityManager;\n }",
"protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('o2NSV3WKIW', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n $a = new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n $a->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, array(0 => ($this->targetDirs[3].'/src/Entity'))), 'App\\\\Entity');\n\n $b = new \\Doctrine\\ORM\\Configuration();\n $b->setEntityNamespaces(array('App' => 'App\\\\Entity'));\n $b->setMetadataCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] : $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()) && false ?: '_'});\n $b->setQueryCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_query_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] : $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()) && false ?: '_'});\n $b->setResultCacheImpl(${($_ = isset($this->services['doctrine_cache.providers.doctrine.orm.default_result_cache']) ? $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] : $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()) && false ?: '_'});\n $b->setMetadataDriverImpl($a);\n $b->setProxyDir(($this->targetDirs[0].'/doctrine/orm/Proxies'));\n $b->setProxyNamespace('Proxies');\n $b->setAutoGenerateProxyClasses(true);\n $b->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $b->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $b->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy());\n $b->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $b->setEntityListenerResolver(${($_ = isset($this->services['doctrine.orm.default_entity_listener_resolver']) ? $this->services['doctrine.orm.default_entity_listener_resolver'] : $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this)) && false ?: '_'});\n $b->setRepositoryFactory(new \\Doctrine\\Bundle\\DoctrineBundle\\Repository\\ContainerRepositoryFactory(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('App\\\\Repository\\\\TestRepository' => function () {\n return ${($_ = isset($this->services['App\\Repository\\TestRepository']) ? $this->services['App\\Repository\\TestRepository'] : $this->load('getTestRepositoryService.php')) && false ?: '_'};\n }))));\n\n $this->services['doctrine.orm.default_entity_manager'] = $instance = \\Doctrine\\ORM\\EntityManager::create(${($_ = isset($this->services['doctrine.dbal.default_connection']) ? $this->services['doctrine.dbal.default_connection'] : $this->getDoctrine_Dbal_DefaultConnectionService()) && false ?: '_'}, $b);\n\n ${($_ = isset($this->services['doctrine.orm.default_manager_configurator']) ? $this->services['doctrine.orm.default_manager_configurator'] : $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array())) && false ?: '_'}->configure($instance);\n\n return $instance;\n }",
"public function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n if ($lazyLoad) {\n\n return $this->services['doctrine.orm.default_entity_manager'] = DoctrineORMEntityManager_00000000428690af0000000049de23ef3bf08b917554782eb259376febf5d820::staticProxyConstructor(\n function (&$wrappedInstance, \\ProxyManager\\Proxy\\LazyLoadingInterface $proxy) {\n $wrappedInstance = $this->getDoctrine_Orm_DefaultEntityManagerService(false);\n\n $proxy->setProxyInitializer(null);\n\n return true;\n }\n );\n }\n\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/AnalyticsBundle/Entity'), 1 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Entity'), 2 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Entity'), 3 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Entity'), 4 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Entity'), 5 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Entity'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Entity'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Entity'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Entity'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/QueryBundle/Entity'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Entity'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Entity'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle/Entity'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Entity'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Entity'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetMapBundle/Entity')));\n\n $c = new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/config/doctrine-mapping') => 'FOS\\\\UserBundle\\\\Model'), '.orm.xml')), 'FOS\\\\UserBundle\\\\Model');\n\n $d = new \\Doctrine\\ORM\\Configuration();\n $d->setEntityNamespaces(array('VictoireAnalyticsBundle' => 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity', 'VictoireBlogBundle' => 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity', 'VictoireBusinessEntityBundle' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity', 'VictoireBusinessPageBundle' => 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity', 'VictoireCoreBundle' => 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity', 'VictoireCriteriaBundle' => 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity', 'VictoireI18nBundle' => 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity', 'VictoireMediaBundle' => 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity', 'VictoirePageBundle' => 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity', 'VictoireQueryBundle' => 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity', 'VictoireSeoBundle' => 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity', 'VictoireTemplateBundle' => 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity', 'VictoireTwigBundle' => 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity', 'VictoireUserBundle' => 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity', 'VictoireWidgetBundle' => 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity', 'VictoireWidgetMapBundle' => 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity'));\n $d->setMetadataCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_metadata_cache'));\n $d->setQueryCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_query_cache'));\n $d->setResultCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_result_cache'));\n $d->setMetadataDriverImpl($c);\n $d->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $d->setProxyNamespace('Proxies');\n $d->setAutoGenerateProxyClasses(false);\n $d->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $d->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $d->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy());\n $d->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $d->setEntityListenerResolver($this->get('doctrine.orm.default_entity_listener_resolver'));\n\n $instance = \\Doctrine\\ORM\\EntityManager::create($this->get('doctrine.dbal.default_connection'), $d);\n\n $this->get('doctrine.orm.default_manager_configurator')->configure($instance);\n\n return $instance;\n }",
"public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }",
"protected function getCache_DefaultClearerService()\n {\n $this->services['cache.default_clearer'] = $instance = new \\Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer();\n\n $instance->addPool($this->get('cache.app'));\n $instance->addPool($this->get('cache.system'));\n $instance->addPool(${($_ = isset($this->services['cache.validator']) ? $this->services['cache.validator'] : $this->getCache_ValidatorService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.serializer']) ? $this->services['cache.serializer'] : $this->getCache_SerializerService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'});\n\n return $instance;\n }",
"protected function _getMetadataModel()\n\t{\n\t\treturn $this->getModelFromCache('Brivium_MetadataEssential_Model_Metadata');\n\t}",
"private static function get_default_cache_tag()\n {\n return CacheableConfig::is_running_test() ? CACHEABLE_STORE_TAG_DEFAULT_TEST : CACHEABLE_STORE_TAG_DEFAULT;\n }",
"public static function getCache() {\n\t\treturn null;\n\t}",
"protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }",
"protected function getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService()\n {\n return $this->services['doctrine.orm.default_entity_manager.property_info_extractor'] = new \\Symfony\\Bridge\\Doctrine\\PropertyInfo\\DoctrineExtractor($this->get('doctrine.orm.default_entity_manager')->getMetadataFactory());\n }",
"public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}",
"public function getManagedCache()\r\n\t{\r\n\t\tif ($this->managedCache == null)\r\n\t\t\t$this->managedCache = new \\Bitrix\\Main\\Data\\ManagedCache();\r\n\t\treturn $this->managedCache;\r\n\t}",
"public function getMetadataStore()\n {\n return $this->metadata_store;\n }",
"public static function getDefaultDriver(){\n return \\Illuminate\\Cache\\CacheManager::getDefaultDriver();\n }",
"public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }",
"public function getCacheStore(): Store|null;",
"protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\service(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php');\n }",
"protected function getAdapterMetadataRepo()\n {\n return $this->em->getRepository(AdapterMetadata::class);\n }",
"public function createDefaultAnnotationManager()\n {\n $annotationManager = new AnnotationManager;\n $parser = new GenericAnnotationParser();\n $parser->registerAnnotation(new Annotation\\Inject());\n $annotationManager->attach($parser);\n\n return $annotationManager;\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"public function getDefaultEntityManagerName()\n {\n // TODO: Implement getDefaultEntityManagerName() method.\n }",
"protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }",
"protected function getSession_Storage_MetadataBagService()\n {\n return $this->services['session.storage.metadata_bag'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag('_sf2_meta', '0');\n }",
"public function getCache()\n {\n return $this->get('cache', false);\n }",
"public function getDefaultDriver()\n\t{\n\t\treturn $this->royalcms['config']['cache.default'];\n\t}",
"protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }",
"public function getCache() {\n\t\treturn $this->get('Cundd\\\\Rest\\\\Cache\\\\Cache');\n\t}",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache() {\n\n // return our instance of Cache\n return $this->oCache;\n }",
"public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }",
"public function getCacheStorage(): CacheStorageInterface\n {\n return $this->storage;\n }",
"public static function getCacheTag()\n\t{\n\t\treturn get_called_class() . '_common_cache';\n\t}",
"public static function getCacheTag()\n\t{\n\t\treturn get_called_class() . '_common_cache';\n\t}",
"public function getCache()\n {\n return $this->_cache;\n }",
"protected function getCache(): FrontendInterface\n {\n return GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_core');\n }",
"public function getSharedManager();",
"public function getCache(): Repository\n {\n return $this->cache;\n }",
"public static function getCache()\n {\n return self::$_cache;\n }",
"public function getCache()\r\n\t{\r\n\t\treturn $this->m_cache;\r\n\t}",
"protected function getCache()\n {\n return $this->cache;\n }",
"protected function getVictoireCore_EntityProxy_CacheDriverService()\n {\n return $this->services['victoire_core.entity_proxy.cache_driver'] = new \\Victoire\\Bundle\\CoreBundle\\CacheWarmer\\EntityProxyCacheDriver($this->get('annotation_reader'), __DIR__);\n }",
"public final function getModuleDoctrineService(): DoctrineService\n {\n return $this->moduleDoctrineService;\n }",
"public static function hasDefaultCache();",
"protected static function defaultInjector() {\n\t\t// static storage\n\t\tstatic $injector;\n\n\t\t// init if first time\n\t\tif ( is_null( $injector ) ) {\n\t\t\t$injector\t=\tnew Injector( array() );\n\t\t}\n\n\t\treturn $injector;\n\t}",
"public function getDefaultCacheTime()\n {\n return $this->default;\n }",
"public function getCache();",
"public function getCacheMetadata()\n {\n return $this->_cacheMetadata;\n }",
"static public function getCache(){\n return static::$cache;\n }",
"public static function getCacheProvider()\n {\n if (!self::$provider) {\n self::$provider = new ArrayCache();\n }\n\n return self::$provider;\n }",
"public function getCache()\n {\n return $this->Cache;\n }",
"public function getServiceConfiguration()\n {\n return array(\n 'aliases' => array(\n 'Doctrine\\ORM\\EntityManager' => 'doctrine.entitymanager.orm_default',\n ),\n 'factories' => array(\n 'DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder' => function($sm) {\n return new \\DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder(\n $sm->get('doctrine.entitymanager.orm_default')\n );\n },\n 'doctrine.connection.orm_default' => new CommonService\\ConnectionFactory('orm_default'),\n 'doctrine.configuration.orm_default' => new ORMService\\ConfigurationFactory('orm_default'),\n 'doctrine.driver.orm_default' => new CommonService\\DriverFactory('orm_default'),\n 'doctrine.entitymanager.orm_default' => new ORMService\\EntityManagerFactory('orm_default'),\n 'doctrine.eventmanager.orm_default' => new CommonService\\EventManagerFactory('orm_default'),\n )\n );\n }",
"public function getCache()\r\n {\r\n if ($this->exists('cache')) {\r\n return ROOT . $this->get('cache');\r\n }\r\n else\r\n return ROOT . '/cache';\r\n }",
"protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}",
"public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}",
"protected function getMetadataPool()\n {\n if (!$this->metadataPool) {\n $this->metadataPool = \\Magento\\Framework\\App\\ObjectManager::getInstance()\n ->get(\\Magento\\Framework\\EntityManager\\MetadataPool::class);\n }\n return $this->metadataPool;\n }",
"public function getCache()\n\t{\n\t\treturn $this->cache;\n\t}",
"public function getCache() {\n return $this->cache;\n }",
"function getCache() {\n return $this->cache;\n }",
"protected function cache(): CacheManager\n {\n $cache = cache();\n if ($cache->supportsTags()) {\n $cache->tags($this->tags);\n }\n\n return $cache;\n }",
"public function getCache() {\n\t\t$this->sync();\n\t\treturn $this->cache;\n\t}",
"public function getCache(): Cache\n {\n return $this->cache;\n }",
"public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }",
"protected function getObject()\n\t{\n\t\tif( !isset( $this->object ) ) {\n\t\t\t$this->object = \\Aimeos\\MAdmin\\Cache\\Manager\\Factory::createManager( $this->context )->getCache();\n\t\t}\n\n\t\treturn $this->object;\n\t}",
"public function getCacheRepository();",
"public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}",
"public static function get($key, $default = null){\n return \\Illuminate\\Cache\\Repository::get($key, $default);\n }",
"public function getCache()\n\t{\n\t\treturn CacheBot::get($this->getCacheKey(), self::$objectCacheLife);\n\t}",
"public static function getCacheManager()\n {\n return static::$cache;\n }",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('ServicioPago');\n }",
"public function getEntityManager()\n {\n if (null === $this->em) {\n $this->em = $this->getServiceLocator()\n ->get('doctrine.entitymanager.orm_default');\n }\n return $this->em;\n }",
"protected function getMonolog_Logger_CacheService()\n {\n $this->services['monolog.logger.cache'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('cache');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function getCache()\n {\n return Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache( 'frontcore' );\n }",
"public static function getCached()\n {\n return static::$cached;\n }",
"protected function getSerializer_Mapping_Cache_SymfonyService()\n {\n return $this->services['serializer.mapping.cache.symfony'] = \\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create((__DIR__.'/serialization.php'), ${($_ = isset($this->services['cache.serializer']) ? $this->services['cache.serializer'] : $this->getCache_SerializerService()) && false ?: '_'});\n }"
] | [
"0.853291",
"0.75862014",
"0.7562599",
"0.72116524",
"0.71779937",
"0.6434227",
"0.634034",
"0.609408",
"0.6056222",
"0.5939375",
"0.5939375",
"0.5705965",
"0.56817466",
"0.56808627",
"0.5647003",
"0.5617541",
"0.56172186",
"0.5580735",
"0.5568569",
"0.55595183",
"0.5544308",
"0.552706",
"0.54981244",
"0.545925",
"0.5447604",
"0.54423094",
"0.5411007",
"0.54021955",
"0.539255",
"0.5382701",
"0.53694",
"0.5356606",
"0.5334824",
"0.5320225",
"0.531738",
"0.53161687",
"0.5310109",
"0.53047323",
"0.53047323",
"0.52901673",
"0.52618426",
"0.52609956",
"0.52501416",
"0.524998",
"0.52443147",
"0.5241492",
"0.5230625",
"0.52194786",
"0.52194786",
"0.52194786",
"0.52194786",
"0.52194786",
"0.52194786",
"0.52194786",
"0.5218664",
"0.52123165",
"0.52107286",
"0.5209917",
"0.5209917",
"0.5207857",
"0.52049524",
"0.5182168",
"0.51814294",
"0.51748574",
"0.5165242",
"0.5161831",
"0.51604384",
"0.516028",
"0.515841",
"0.51575106",
"0.5157046",
"0.5156853",
"0.51493984",
"0.5145699",
"0.5134845",
"0.51243424",
"0.5107614",
"0.50986373",
"0.50933516",
"0.50913703",
"0.50907683",
"0.50906634",
"0.5087753",
"0.50840825",
"0.50838435",
"0.5082899",
"0.50716144",
"0.50688195",
"0.50679284",
"0.50596946",
"0.5055174",
"0.50543535",
"0.5048307",
"0.5044809",
"0.50400794",
"0.5034585",
"0.50340724",
"0.5026962",
"0.5024702",
"0.5021816"
] | 0.85365456 | 0 |
Gets the public 'doctrine_cache.providers.doctrine.orm.default_query_cache' shared service. | protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()
{
$this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \Doctrine\Common\Cache\ArrayCache();
$instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function defaultCache() : Repository\n {\n return Cache::store();\n }",
"public static function getDefaultCache()\n {\n return self::$_defaultCache;\n }",
"protected function getQueryCacheImpl(): CacheItemPoolInterface\n {\n return new NullAdapter();\n }",
"public function getDefaultCacheStore(): Store|null;",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('Default_Model_Doctrine_Service');\n }",
"protected function getCache_DefaultClearerService()\n {\n $this->services['cache.default_clearer'] = $instance = new \\Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer();\n\n $instance->addPool($this->get('cache.app'));\n $instance->addPool($this->get('cache.system'));\n $instance->addPool(${($_ = isset($this->services['cache.validator']) ? $this->services['cache.validator'] : $this->getCache_ValidatorService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.serializer']) ? $this->services['cache.serializer'] : $this->getCache_SerializerService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'});\n\n return $instance;\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"public function setGeneralDefaultQuery()\n {\n return $this;\n }",
"protected function getLiipImagine_Cache_Resolver_DefaultService()\n {\n return $this->services['liip_imagine.cache.resolver.default'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Resolver\\WebPathResolver($this->get('filesystem'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ($this->targetDirs[3].'/app/../web'), 'media/cache');\n }",
"public function getDefaultCacheFactory(): ?Factory\n {\n return Cache::getFacadeRoot();\n }",
"public function getDefaultDriver()\n {\n return Arr::get($this->container['config']['cache'], 'default');\n }",
"public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"public function getDefaultQuery()\n {\n return $this->model->newQuery()->where(function ($q) {\n $q->whereNull('team_id');\n $q->orWhere('team_id', app(ActiveTeam::class)->get()->id);\n });\n }",
"public static function getDefaultDriver(){\n return \\Illuminate\\Cache\\CacheManager::getDefaultDriver();\n }",
"protected function defaultShareProvider() {\n\t\tif ($this->defaultProvider === null) {\n\t\t\t$this->defaultProvider = new DefaultShareProvider(\n\t\t\t\t$this->serverContainer->getDatabaseConnection(),\n\t\t\t\t$this->serverContainer->getUserManager(),\n\t\t\t\t$this->serverContainer->getGroupManager(),\n\t\t\t\t$this->serverContainer->getLazyRootFolder(),\n\t\t\t\t$this->serverContainer->getMailer(),\n\t\t\t\t$this->serverContainer->query(Defaults::class),\n\t\t\t\t$this->serverContainer->getL10NFactory(),\n\t\t\t\t$this->serverContainer->getURLGenerator(),\n\t\t\t\t$this->serverContainer->getConfig()\n\t\t\t);\n\t\t}\n\n\t\treturn $this->defaultProvider;\n\t}",
"protected function getDefaultQueryCompiler()\n {\n return $this->withTablePrefix(new MsSQLCompiler());\n }",
"private static function get_default_cache_tag()\n {\n return CacheableConfig::is_running_test() ? CACHEABLE_STORE_TAG_DEFAULT_TEST : CACHEABLE_STORE_TAG_DEFAULT;\n }",
"protected function getQueryServiceName() {\n return 'entity.query.null';\n }",
"protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }",
"public static function hasDefaultCache();",
"public static function get($key, $default = null){\n return \\Illuminate\\Cache\\Repository::get($key, $default);\n }",
"public function getFilterCache($entity, $default=array())\n {\n $cacheId = $this->getCacheId();\n if (isset($this->filterCache[$cacheId][$entity])) {\n return $this->filterCache[$cacheId][$entity];\n }\n return $default;\n }",
"public function getDefaultManagerName()\n {\n return $this->entityManager;\n }",
"protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\service(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php');\n }",
"function getQueryCacheTableName(){\n static $table_name = '_posql_query_cache';\n return $table_name;\n }",
"public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }",
"public function GetDefaultDatabase()\r\n {\r\n $this->checkDatabaseManager();\r\n $query = \"SELECT DATABASE()\";\r\n $this->_TotalQueries++;\r\n $this->_LastQuery = $query;\r\n $startTime = microtime(true);\r\n $res = $this->_DatabaseHandler->query($query)->fetch_row()[0];\r\n $this->_LastQueryElapsedTime = microtime(true) - $startTime;\r\n $this->_TotalExecutionTime += $this->_LastQueryElapsedTime;\r\n return $res;\r\n }",
"protected function newBaseQueryBuilder()\n {\n $connection = $this->getConnection();\n\n $builder = in_array(self::class, config('autocache.models'))\n ? \\LaravelAutoCache\\Builder::class\n : \\Illuminate\\Database\\Query\\Builder::class;\n\n return new $builder($connection, $connection->getQueryGrammar(), $connection->getPostProcessor());\n }",
"protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }",
"public function getDefaultDriver()\n\t{\n\t\treturn $this->royalcms['config']['cache.default'];\n\t}",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('ServicioPago');\n }",
"public function get_static_cache( $key, $default = false ) {\n\t\t$cache = \\get_option( THE_SEO_FRAMEWORK_SITE_CACHE, [] );\n\t\treturn isset( $cache[ $key ] ) ? $cache[ $key ] : $default;\n\t}",
"public static function getCache() {\n\t\treturn null;\n\t}",
"public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }",
"public function getCacheStore(): Store|null;",
"protected function getCache(): FrontendInterface\n {\n return GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_core');\n }",
"protected static function defaultInjector() {\n\t\t// static storage\n\t\tstatic $injector;\n\n\t\t// init if first time\n\t\tif ( is_null( $injector ) ) {\n\t\t\t$injector\t=\tnew Injector( array() );\n\t\t}\n\n\t\treturn $injector;\n\t}",
"protected function get_cache_engine() {\n\n if ($this->caching && !$this->cache) {\n $rcube = rcube::get_instance();\n $ttl = $rcube->config->get('dbmail_cache_ttl', '10d');\n $this->cache = $rcube->get_cache('DBMAIL', $this->caching, $ttl);\n }\n\n return $this->cache;\n }",
"public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }",
"public static function setDefaultContext(pQryTag $defaultContext) {\n self::$context = pQry($defaultContext);\n return self::$context;\n }",
"protected function getDefaultQueryGrammar()\n {\n return $this->withTablePrefix(new QueryGrammar());\n }",
"public function createQuery()\n {\n $query = $this->persistenceManager->createQueryForType($this->objectType);\n if ($this->defaultOrderings !== []) {\n $query->setOrderings($this->defaultOrderings);\n }\n if ($this->defaultQuerySettings !== null) {\n $query->setQuerySettings(clone $this->defaultQuerySettings);\n }\n return $query;\n }",
"protected function getDefaultQueryGrammar()\n {\n return $this->withTablePrefix(new QueryGrammar);\n }",
"protected function getDefaultQueryGrammar()\n {\n return $this->withTablePrefix(new QueryGrammar);\n }",
"protected function getDefaultQueryGrammar()\n {\n return $this->withTablePrefix(new QueryGrammar);\n }",
"protected function getDefaultQueryGrammar()\n {\n return $this->withTablePrefix(new QueryGrammar);\n }",
"public static function getCache()\n\t{\n\t\tif (null === self::$_cache) {\n\t\t\tself::setCache(Zend_Cache::factory(\n\t\t\t\tnew Core_Cache_Frontend_Runtime(),\n\t\t\t\tnew Core_Cache_Backend_Runtime()\n\t\t\t));\n\t\t}\n\t\n\t\treturn self::$_cache;\n\t}",
"protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }",
"public function getManagedCache()\r\n\t{\r\n\t\tif ($this->managedCache == null)\r\n\t\t\t$this->managedCache = new \\Bitrix\\Main\\Data\\ManagedCache();\r\n\t\treturn $this->managedCache;\r\n\t}",
"protected function getSysDomainCache() {}",
"static public function getInstance() {\n return (self::$instance === NULL) ? self::$instance = new Query() : self::$instance;\n }",
"public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}",
"public function getCache()\n {\n return $this->get('cache', false);\n }",
"public function getSharedManager();",
"static public function getCache(){\n return static::$cache;\n }",
"public function getBasePublicQuery($context = null);",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"public static function getCache()\n {\n return self::$_cache;\n }",
"public function getCache() {\n\n // return our instance of Cache\n return $this->oCache;\n }",
"function App_Cache() {\n\t\t\treturn App_Cache::instance()->getAdapter();\n\t\t}",
"public function getCache();",
"protected function getRouting_ResourcesLocator_DefaultService()\n {\n return $this->services['routing.resources_locator.default'] = new \\phpbb\\routing\\resources_locator\\default_resources_locator('./../', 'production', ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }",
"public function getDefaultStore(): Store|null;",
"private function _getSessionRepository() {\r\n $cache = $this->getProvider()->prototype('cache'); /* @var $cache \\PM\\Main\\Cache */\r\n $repository = $this->getProvider()->get('PM\\Profiler\\Monitor\\Repository\\Cache');\r\n /* @var $repository \\PM\\Profiler\\Monitor\\Repository\\Cache */\r\n $repository->setCache($cache);\r\n\r\n return $repository;\r\n }",
"public function getQueryRepository()\n {\n return $this->queryRepository;\n }",
"public function getDefaultEntityManagerName()\n {\n // TODO: Implement getDefaultEntityManagerName() method.\n }",
"public function getCacheQueries()\n {\n return $this->_cacheQueries;\n }",
"public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }",
"public static function getCacheProvider()\n {\n if (!self::$provider) {\n self::$provider = new ArrayCache();\n }\n\n return self::$provider;\n }",
"public static function getCached()\n {\n return static::$cached;\n }",
"protected function retrieveOrCreateQueryInstance()\n {\n return $this->queryBuilder ?? $this->queryBuilder = new $this->model();\n }",
"protected function getCache()\n {\n return $this->cache;\n }",
"protected function getVictoireCore_EntityProxy_CacheDriverService()\n {\n return $this->services['victoire_core.entity_proxy.cache_driver'] = new \\Victoire\\Bundle\\CoreBundle\\CacheWarmer\\EntityProxyCacheDriver($this->get('annotation_reader'), __DIR__);\n }",
"public function getCache() {\n\t\t$this->sync();\n\t\treturn $this->cache;\n\t}",
"protected function baseQuery()\n {\n $model = $this->getModelNamespace();\n return App::make($model);\n }",
"public function getCacheAdapter();",
"public function getCache()\r\n\t{\r\n\t\treturn $this->m_cache;\r\n\t}",
"public function getCache()\n {\n return $this->_cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n\t{\n\t\tif( ! $this->cache_on)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(isset($this->cache_obj))\n\t\t{\n\t\t\treturn $this->cache_obj;\n\t\t}\n\t\t\n\t\t$class = 'Db_Cache_'.$this->cachedrv;\n\t\t\n\t\t$this->cache_obj = new $class($this->cacheopt);\n\t\t\n\t\treturn $this->cache_obj;\n\t}",
"public function getDefaultCacheTime()\n {\n return $this->default;\n }",
"public function getCacheStorage(): CacheStorageInterface\n {\n return $this->storage;\n }",
"protected function loadDefaultStorageEngine() {\n\t\t//Create a cache config\n\t\tCache::config($this->defaultCacheName, array(\n\t\t\t\t'engine' => 'Apc',\n\t\t\t\t'path' => CACHE,\n\t\t\t\t'prefix' => 'rate_limiter'\n\t\t));\n\t\t$this->storageEngine = new RateLimitCakeCacheAdapter($this->defaultCacheName);\n\t}",
"function wp_start_default_object_cache() {\n\tglobal $blog_id;\n\t$first_init = false;\n\tif ( ! function_exists( 'wp_cache_init' ) ) {\n\t\twp_using_ext_object_cache( false );\n\t\t$first_init = true;\n\t}\n\n\tif ( ! wp_using_ext_object_cache() )\n\t\trequire_once ABSPATH . WPINC . '/cache.php';\n\n\t// If cache supports reset, reset instead of init if already initialized.\n\t// Reset signals to the cache that global IDs have changed and it may need to update keys\n\t// and cleanup caches.\n\tif ( ! $first_init && function_exists( 'wp_cache_switch_to_blog' ) )\n\t\twp_cache_switch_to_blog( $blog_id );\n\telseif ( function_exists( 'wp_cache_init' ) )\n\t\twp_cache_init();\n\n\tif ( function_exists( 'wp_cache_add_global_groups' ) ) {\n\t\twp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'site-transient', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache' ) );\n\t\twp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) );\n\t}\n}",
"public function getMetadataQueryProviderWrapper();"
] | [
"0.86607194",
"0.76459724",
"0.76295567",
"0.73168004",
"0.7298351",
"0.6500934",
"0.6238524",
"0.59537226",
"0.5944275",
"0.58803606",
"0.58335924",
"0.5699514",
"0.5644874",
"0.5579449",
"0.5557641",
"0.5508757",
"0.54441965",
"0.5409987",
"0.5409987",
"0.5357156",
"0.5318416",
"0.53136593",
"0.53022605",
"0.5296984",
"0.52939785",
"0.52640927",
"0.5200058",
"0.51894116",
"0.51535064",
"0.5153271",
"0.5104406",
"0.50917774",
"0.507755",
"0.50706184",
"0.5069569",
"0.50695336",
"0.5064312",
"0.5060971",
"0.50553966",
"0.50486755",
"0.5034183",
"0.5031089",
"0.50116104",
"0.49998897",
"0.4996434",
"0.49824867",
"0.49776012",
"0.4964498",
"0.4962545",
"0.49591002",
"0.49580148",
"0.49580148",
"0.49580148",
"0.49580148",
"0.49502647",
"0.49438938",
"0.4936412",
"0.492908",
"0.49219495",
"0.49217388",
"0.4921172",
"0.4910167",
"0.48957655",
"0.48956612",
"0.48820022",
"0.48820022",
"0.48787642",
"0.48754263",
"0.48631832",
"0.48627058",
"0.48594767",
"0.4855434",
"0.4848758",
"0.48480773",
"0.48480192",
"0.48425898",
"0.48329958",
"0.4831918",
"0.48308098",
"0.48292696",
"0.4828983",
"0.48244295",
"0.4823257",
"0.48173907",
"0.48145247",
"0.48125935",
"0.48125896",
"0.4803702",
"0.4803702",
"0.4803702",
"0.4803702",
"0.4803702",
"0.4803702",
"0.4803702",
"0.4802785",
"0.47944915",
"0.47869715",
"0.47861937",
"0.47821894",
"0.47817582"
] | 0.8665333 | 0 |
Gets the public 'doctrine_cache.providers.doctrine.orm.default_result_cache' shared service. | protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()
{
$this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \Doctrine\Common\Cache\ArrayCache();
$instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function defaultCache() : Repository\n {\n return Cache::store();\n }",
"public static function getDefaultCache()\n {\n return self::$_defaultCache;\n }",
"protected function getLiipImagine_Cache_Resolver_DefaultService()\n {\n return $this->services['liip_imagine.cache.resolver.default'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Resolver\\WebPathResolver($this->get('filesystem'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ($this->targetDirs[3].'/app/../web'), 'media/cache');\n }",
"protected function getCache_DefaultClearerService()\n {\n $this->services['cache.default_clearer'] = $instance = new \\Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer();\n\n $instance->addPool($this->get('cache.app'));\n $instance->addPool($this->get('cache.system'));\n $instance->addPool(${($_ = isset($this->services['cache.validator']) ? $this->services['cache.validator'] : $this->getCache_ValidatorService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.serializer']) ? $this->services['cache.serializer'] : $this->getCache_SerializerService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'});\n\n return $instance;\n }",
"public function getResultService()\n {\n return $this->container->get('seip.service.result');\n }",
"public static function getInstance()\n {\n return Doctrine_Core::getTable('Default_Model_Doctrine_Service');\n }",
"protected function getQueryCacheImpl(): CacheItemPoolInterface\n {\n return new NullAdapter();\n }",
"public function getDefaultCacheFactory(): ?Factory\n {\n return Cache::getFacadeRoot();\n }",
"public function getDefaultCacheStore(): Store|null;",
"public static function get($key, $default = null){\n return \\Illuminate\\Cache\\Repository::get($key, $default);\n }",
"public function getDefaultDriver()\n {\n return Arr::get($this->container['config']['cache'], 'default');\n }",
"protected function getRouting_ResourcesLocator_DefaultService()\n {\n return $this->services['routing.resources_locator.default'] = new \\phpbb\\routing\\resources_locator\\default_resources_locator('./../', 'production', ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }",
"private function _readDefaultCache() {\n $settingFile = APPLICATION_PATH . '/application/settings/restapi_cache.php';\n $defaultFilePath = APPLICATION_PATH . '/temporary/restapicache';\n\n if (file_exists($settingFile)) {\n $currentCache = include $settingFile;\n } else {\n $currentCache = array(\n 'default_backend' => 'File',\n 'frontend' => array(\n 'automatic_serialization' => true,\n 'cache_id_prefix' => 'Engine4_restapi',\n 'lifetime' => '300',\n 'caching' => true,\n 'status' => true,\n 'gzip' => true,\n ),\n 'backend' => array(\n 'File' => array(\n 'file_locking' => true,\n 'cache_dir' => APPLICATION_PATH . '/temporary/restapicache',\n ),\n ),\n );\n }\n $currentCache['default_file_path'] = $defaultFilePath;\n\n return $currentCache;\n }",
"public static function getDefaultDriver(){\n return \\Illuminate\\Cache\\CacheManager::getDefaultDriver();\n }",
"public function result($key = NULL, $default = 0)\n\t{\n\t\tif (is_null($this->_result)) return NULL;\n\n\t\tif (isset($key))\n\t\t{\n\t\t\treturn array_get($this->_result, $key, $default);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_result;\t\n\t\t}\n\t}",
"public function getCache();",
"public function getFromCache($key, $default_return=null){\n $cached_response= Cache::get($key);\n return (bool)$cached_response ? $cached_response : $default_return;\n }",
"public function getResults($default = false)\n\t{\n\t\treturn count($this->_results) ? $this->_results : $default;\n\t}",
"private static function get_default_cache_tag()\n {\n return CacheableConfig::is_running_test() ? CACHEABLE_STORE_TAG_DEFAULT_TEST : CACHEABLE_STORE_TAG_DEFAULT;\n }",
"protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\service(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php');\n }",
"public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }",
"public static function hasDefaultCache();",
"public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }",
"public static function getCache() {\n\t\treturn null;\n\t}",
"protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getCacheAdapter();",
"public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}",
"public function getCacheInstance($cacheName = null);",
"protected function defaultShareProvider() {\n\t\tif ($this->defaultProvider === null) {\n\t\t\t$this->defaultProvider = new DefaultShareProvider(\n\t\t\t\t$this->serverContainer->getDatabaseConnection(),\n\t\t\t\t$this->serverContainer->getUserManager(),\n\t\t\t\t$this->serverContainer->getGroupManager(),\n\t\t\t\t$this->serverContainer->getLazyRootFolder(),\n\t\t\t\t$this->serverContainer->getMailer(),\n\t\t\t\t$this->serverContainer->query(Defaults::class),\n\t\t\t\t$this->serverContainer->getL10NFactory(),\n\t\t\t\t$this->serverContainer->getURLGenerator(),\n\t\t\t\t$this->serverContainer->getConfig()\n\t\t\t);\n\t\t}\n\n\t\treturn $this->defaultProvider;\n\t}",
"function getCache() {\n\t\tif ( !$this->postID )\n\t\t\treturn false;\n\t\t\t\n\t\t$sql = \"SELECT cached_result FROM $this->cacheTable WHERE post_id = '\" . $this->db->escape( $this->postID ) . \"'\";\n\t\t\t\n\t\t$results = $this->db->get_results( $sql );\n\t\t\n\t\tif ( !$results[0] )\n\t\t\treturn false;\n\t\t\t\n\t\treturn $results[0]->cached_result;\n\t}",
"function ctools_get_default_object($table, $name) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n if (!$export['default hook']) {\r\n return;\r\n }\r\n\r\n // Try to load individually from cache if this cache is enabled.\r\n if (!empty($export['cache defaults'])) {\r\n $defaults = _ctools_export_get_some_defaults($table, $export, array($name));\r\n }\r\n else {\r\n $defaults = _ctools_export_get_defaults($table, $export);\r\n }\r\n\r\n $status = variable_get($export['status'], array());\r\n\r\n if (!isset($defaults[$name])) {\r\n return;\r\n }\r\n\r\n $object = $defaults[$name];\r\n\r\n // Determine if default object is enabled or disabled.\r\n if (isset($status[$object->{$export['key']}])) {\r\n $object->disabled = $status[$object->{$export['key']}];\r\n }\r\n\r\n $object->{$export['export type string']} = t('Default');\r\n $object->export_type = EXPORT_IN_CODE;\r\n $object->in_code_only = TRUE;\r\n\r\n return $object;\r\n}",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"public function getFromCache() {}",
"public function getCache()\n {\n return $this->get('cache', false);\n }",
"public static function getCache() {}",
"public function get_static_cache( $key, $default = false ) {\n\t\t$cache = \\get_option( THE_SEO_FRAMEWORK_SITE_CACHE, [] );\n\t\treturn isset( $cache[ $key ] ) ? $cache[ $key ] : $default;\n\t}",
"public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }",
"public function getCache() {\n\t\treturn $this->get('Cundd\\\\Rest\\\\Cache\\\\Cache');\n\t}",
"public function getFilterCache($entity, $default=array())\n {\n $cacheId = $this->getCacheId();\n if (isset($this->filterCache[$cacheId][$entity])) {\n return $this->filterCache[$cacheId][$entity];\n }\n return $default;\n }",
"public function GetDefaultDatabase()\r\n {\r\n $this->checkDatabaseManager();\r\n $query = \"SELECT DATABASE()\";\r\n $this->_TotalQueries++;\r\n $this->_LastQuery = $query;\r\n $startTime = microtime(true);\r\n $res = $this->_DatabaseHandler->query($query)->fetch_row()[0];\r\n $this->_LastQueryElapsedTime = microtime(true) - $startTime;\r\n $this->_TotalExecutionTime += $this->_LastQueryElapsedTime;\r\n return $res;\r\n }",
"public function getDefaultDriver()\n\t{\n\t\treturn $this->royalcms['config']['cache.default'];\n\t}",
"protected function getObject()\n\t{\n\t\tif( !isset( $this->object ) ) {\n\t\t\t$this->object = \\Aimeos\\MAdmin\\Cache\\Manager\\Factory::createManager( $this->context )->getCache();\n\t\t}\n\n\t\treturn $this->object;\n\t}",
"public function getCachedResult() {\n $cachePath = $this->_getCachePath();\n if (is_file($cachePath)) {\n $cacheModifiedTime = filemtime($cachePath);\n if ($cacheModifiedTime < time() - CACHE_EXPIRED_DELAY) {\n $result = $this->getLiveResult();\n if ($result)\n return $result;\n else\n touch($cachePath);\n }\n\n return file_get_contents($cachePath);\n }\n\n return $this->getLiveResult();\n }",
"static public function getCache(){\n return static::$cache;\n }",
"public function getCache()\n {\n return $this->_cache;\n }",
"public static function getCache()\n {\n return self::$_cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public static function getCached()\n {\n return static::$cached;\n }",
"protected function getCache()\n {\n return $this->cache;\n }",
"function getCache() {\n return $this->cache;\n }",
"public function getResult () : Result\n {\n // Cache\n if ( $this->_Result === null ) :\n $this->calcPossibleRanking();\n $this->calcRankingScore();\n $this->makeRanking();\n $this->conflictInfos();\n endif;\n\n // Return\n return $this->_Result;\n }",
"function App_Cache() {\n\t\t\treturn App_Cache::instance()->getAdapter();\n\t\t}",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"public function getCache()\r\n\t{\r\n\t\treturn $this->m_cache;\r\n\t}",
"public function getCache() {\n\n // return our instance of Cache\n return $this->oCache;\n }",
"public function getCache() {\n\t\t$this->sync();\n\t\treturn $this->cache;\n\t}",
"public function execute($cacheResult = false)\n {\n return new QueryResult($this, $cacheResult);\n }",
"public function getManagedCache()\r\n\t{\r\n\t\tif ($this->managedCache == null)\r\n\t\t\t$this->managedCache = new \\Bitrix\\Main\\Data\\ManagedCache();\r\n\t\treturn $this->managedCache;\r\n\t}",
"protected function getCache(): FrontendInterface\n {\n return GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_core');\n }",
"public function getDefaultCacheTime()\n {\n return $this->default;\n }",
"public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }",
"public function getCache() {\n return $this->cache;\n }",
"public function getCache()\n\t{\n\t\tif( ! $this->cache_on)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(isset($this->cache_obj))\n\t\t{\n\t\t\treturn $this->cache_obj;\n\t\t}\n\t\t\n\t\t$class = 'Db_Cache_'.$this->cachedrv;\n\t\t\n\t\t$this->cache_obj = new $class($this->cacheopt);\n\t\t\n\t\treturn $this->cache_obj;\n\t}",
"public function getResult()\n {\n return parent::getResult();\n }",
"public static function getCacheProvider()\n {\n if (!self::$provider) {\n self::$provider = new ArrayCache();\n }\n\n return self::$provider;\n }",
"public function cacheProvider()\n {\n return [\n [new ArrayCache()],\n [new NamespaceCache(new ArrayCache(), 'other')],\n ];\n }",
"public function getResult(): ?ResultInterface;",
"public function getCache()\n {\n return $this->Cache;\n }",
"function getCache() {\n return $this->cache;\n }",
"static function cached_all(){\n return static::get_cache();\n }",
"public function getCache()\n\t{\n\t\treturn $this->cache;\n\t}",
"public function getLiveResult() {\n $url = $this->_buildUrl();\n $default_timeout = ini_get('default_socket_timeout');\n ini_set('default_socket_timeout', OPENDIGI_API_TIMEOUT);\n $result = @file_get_contents($url);\n ini_set('default_socket_timeout', $default_timeout);\n if ($result && $result != '[]' && @json_decode($result) != false) {\n if (!is_dir(DIR_PUBLIC_CACHE_SEARCHES))\n mkdir(DIR_PUBLIC_CACHE_SEARCHES, 0777, true);\n file_put_contents($this->_getCachePath(), $result);\n return $result;\n }\n }",
"protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }",
"protected function load_cache(){\r\n\t\tstatic $cached = null;\r\n\t\t\r\n\t\tif(!$cached){\r\n\t\t\t\r\n\t\t\tif($this->_cfg->get('sfversion') == 'auto'){\r\n\t\t\t\t// get version from sourceforge/cache\r\n\t\t\t\tif (!$this->is_cached()) $this->update_cache();\r\n\t\t\t\t$cached = (object)include($this->get_cache());\r\n\t\t\t}else{\r\n\t\t\t\t// use predefined version from config\r\n\t\t\t\t$cached = (object)$this->_cfg->get('sfversion');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $cached;\r\n\t}",
"public static function getCacheType();",
"public function get($default = null);",
"public function getCache(string $driverName): \\Nofuzz\\SimpleCache\\CacheInterface;",
"public function get($cache_name);",
"public function getCache($cache='default')\n {\n if (isset($this->_cachedObjects[$cache]) === true) {\n return $this->_cachedObjects[$cache];\n }\n\n // if there is not a configuration for the cache, the default cache driver will be returned\n if (isset($this->caches[$cache]) === false) {\n $driver = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $this->_cachedObjects[$cache] = $driver;\n return $driver;\n }\n\n $driver = $this->_createCache($cache);\n $this->_cachedObjects[$cache] = $driver;\n return $driver;\n }",
"public function cache()\n {\n return $this->cache;\n }",
"protected function getCache_ValidatorService()\n {\n return $this->services['cache.validator'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('k0V7XpDK96', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function getCache()\n\t{\n\t\tif (null === self::$_cache) {\n\t\t\tself::setCache(Zend_Cache::factory(\n\t\t\t\tnew Core_Cache_Frontend_Runtime(),\n\t\t\t\tnew Core_Cache_Backend_Runtime()\n\t\t\t));\n\t\t}\n\t\n\t\treturn self::$_cache;\n\t}",
"function getResult()\n\t{\n\t\tif (isset($this->result)) {\n\t\t\treturn $this->result;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function get ($key, $default = null): mixed\n {\n if ($this->existsInCache($key)){\n return $this->fromCache($key);\n }\n\n return $this->addToCache(\n $key, $this->extractFromConfig($key)?? $default\n );\n }",
"public function getCacheItemPool(): ?CacheItemPoolInterface;",
"protected function get_cache() {\n\t\n // uncomment next line to flush previous cache\n\t //delete_transient($this->get_cache_id()); \n\t\n \treturn get_transient( $this->get_cache_id() ); \t \n\t}",
"public function getCacheDriver(): ?string;",
"public function getCache()\n\t{\n\t\treturn ($this->_cache);\n\t}"
] | [
"0.86435807",
"0.76219445",
"0.76211333",
"0.6833611",
"0.6819532",
"0.6507174",
"0.6368295",
"0.6008313",
"0.5956899",
"0.5604679",
"0.548948",
"0.5455574",
"0.544233",
"0.5436743",
"0.5431846",
"0.54301",
"0.5398462",
"0.539615",
"0.53681433",
"0.5363936",
"0.5323601",
"0.5319066",
"0.5316195",
"0.5313002",
"0.5290819",
"0.5243258",
"0.52425796",
"0.52420807",
"0.522727",
"0.5225503",
"0.52224076",
"0.52135336",
"0.52050275",
"0.51902235",
"0.51878285",
"0.5181444",
"0.5164365",
"0.5128861",
"0.5128859",
"0.51151794",
"0.5113505",
"0.5112358",
"0.5109158",
"0.51035225",
"0.51011986",
"0.509513",
"0.50776887",
"0.50702083",
"0.5066324",
"0.5063606",
"0.505552",
"0.5054961",
"0.5054961",
"0.5054961",
"0.5054961",
"0.5054961",
"0.5054961",
"0.5054961",
"0.5037622",
"0.50289357",
"0.50185966",
"0.5013919",
"0.5004704",
"0.4996622",
"0.4996622",
"0.4995504",
"0.49949166",
"0.4983941",
"0.4983432",
"0.49768808",
"0.4975312",
"0.4971735",
"0.49703163",
"0.49671948",
"0.49665788",
"0.4961328",
"0.49590868",
"0.49353004",
"0.49325806",
"0.49297762",
"0.492934",
"0.49206445",
"0.4911517",
"0.49097806",
"0.49073973",
"0.4906815",
"0.49033532",
"0.49016038",
"0.49012288",
"0.4900517",
"0.4896946",
"0.48925513",
"0.4890557",
"0.488717",
"0.48835513",
"0.48794362",
"0.4875546",
"0.48730016",
"0.486792",
"0.48676932"
] | 0.86590713 | 0 |
Gets the public 'event_dispatcher' shared service. | protected function getEventDispatcherService()
{
$this->services['event_dispatcher'] = $instance = new \Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher($this);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['App\EventSubscriber\RestSubscriber']) ? $this->services['App\EventSubscriber\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 0);
$instance->addListener('kernel.controller', array(0 => function () {
return ${($_ = isset($this->services['App\EventSubscriber\RestSubscriber']) ? $this->services['App\EventSubscriber\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};
}, 1 => 'onKernelController'), 0);
$instance->addListener('kernel.view', array(0 => function () {
return ${($_ = isset($this->services['App\EventSubscriber\RestSubscriber']) ? $this->services['App\EventSubscriber\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};
}, 1 => 'onKernelView'), 0);
$instance->addListener('kernel.exception', array(0 => function () {
return ${($_ = isset($this->services['App\EventSubscriber\RestSubscriber']) ? $this->services['App\EventSubscriber\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};
}, 1 => 'onKernelException'), 0);
$instance->addListener('kernel.response', array(0 => function () {
return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \Symfony\Component\HttpKernel\EventListener\ResponseListener('UTF-8')) && false ?: '_'};
}, 1 => 'onKernelResponse'), 0);
$instance->addListener('kernel.response', array(0 => function () {
return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \Symfony\Component\HttpKernel\EventListener\StreamedResponseListener()) && false ?: '_'};
}, 1 => 'onKernelResponse'), -1024);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 16);
$instance->addListener('kernel.finish_request', array(0 => function () {
return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};
}, 1 => 'onKernelFinishRequest'), 0);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \Symfony\Component\HttpKernel\EventListener\ValidateRequestListener()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 256);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 24);
$instance->addListener('console.error', array(0 => function () {
return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};
}, 1 => 'onConsoleError'), -128);
$instance->addListener('console.terminate', array(0 => function () {
return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};
}, 1 => 'onConsoleTerminate'), -128);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 128);
$instance->addListener('kernel.response', array(0 => function () {
return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};
}, 1 => 'onKernelResponse'), -1000);
$instance->addListener('kernel.finish_request', array(0 => function () {
return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};
}, 1 => 'onFinishRequest'), 0);
$instance->addListener('kernel.response', array(0 => function () {
return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \Symfony\Component\HttpKernel\EventListener\SaveSessionListener()) && false ?: '_'};
}, 1 => 'onKernelResponse'), -1000);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 10);
$instance->addListener('kernel.finish_request', array(0 => function () {
return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};
}, 1 => 'onKernelFinishRequest'), 0);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};
}, 1 => 'configure'), 2048);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 32);
$instance->addListener('kernel.finish_request', array(0 => function () {
return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};
}, 1 => 'onKernelFinishRequest'), 0);
$instance->addListener('kernel.exception', array(0 => function () {
return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};
}, 1 => 'onKernelException'), -64);
$instance->addListener('console.error', array(0 => function () {
return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \Symfony\Bundle\MakerBundle\Event\ConsoleErrorSubscriber()) && false ?: '_'};
}, 1 => 'onConsoleError'), 0);
$instance->addListener('console.terminate', array(0 => function () {
return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \Symfony\Bundle\MakerBundle\Event\ConsoleErrorSubscriber()) && false ?: '_'};
}, 1 => 'onConsoleTerminate'), 0);
$instance->addListener('kernel.response', array(0 => function () {
return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \Symfony\Component\Security\Http\RememberMe\ResponseListener()) && false ?: '_'};
}, 1 => 'onKernelResponse'), 0);
$instance->addListener('kernel.request', array(0 => function () {
return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};
}, 1 => 'onKernelRequest'), 8);
$instance->addListener('kernel.finish_request', array(0 => function () {
return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};
}, 1 => 'onKernelFinishRequest'), 0);
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public static function getEventDispatcher()\n {\n return static::$dispatcher;\n }",
"protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }",
"private function getEventDispatcherServiceId()\n {\n return 'event_dispatcher';\n }",
"static function getEventDispatcher() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_EVENT_DISPATCHER);\n\t}",
"protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }",
"public function getEventDispatcher()\n {\n if (!isset($this['pantono.event.dispatcher'])) {\n $this['pantono.event.dispatcher'] = new Dispatcher($this);\n }\n return $this['pantono.event.dispatcher'];\n }",
"protected function getEventDispatcher()\n {\n return $this->eventDispatcher;\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function getEventDispatcher()\n {\n return $this->eventDispatcher;\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"public function getEventDispatcher(): EventDispatcherInterface;",
"public function getDispatcher(): EventDispatcherInterface;",
"public function getDispatcher(): Dispatcher\n {\n return $this->events;\n }",
"public function getEventDispatcher()\n {\n return $this->options['event_dispatcher'];\n }",
"public static function getEventDispatcher()\n {\n }",
"public static function getEventDispatcher()\n {\n if (static::$sharedInstance !== null) {\n return static::$sharedInstance;\n }\n\n global $app;\n\n $appEventDispatcher = null;\n if ($app instanceof Application) {\n static::$allowCodeceptionHooks = true;\n $appEventDispatcher = static::getAppEventDispatcher($app);\n } else {\n static::$allowCodeceptionHooks = false;\n $appEventDispatcher = new SymfonyEventDispatcher();\n }\n\n if (! $appEventDispatcher instanceof SymfonyEventDispatcher) {\n throw new TestRuntimeException(sprintf(\n '\\\\Codeception\\\\Codecept::$eventDispatcher property is not an instance of %s; value is instead: %s',\n SymfonyEventDispatcher::class,\n print_r($appEventDispatcher, true)\n ));\n }\n\n static::$sharedInstance = new self($appEventDispatcher);\n\n return static::$sharedInstance;\n }",
"public static function instance() {\n\t\treturn tribe( 'events-aggregator.service' );\n\t}",
"public function getDispatcher(): DispatcherContract\n {\n return $this->events;\n }",
"public function getEventDispatcher()\n {\n return $this->events;\n }",
"public function getEventDispatcher()\n {\n return $this->events;\n }",
"public static function getEventDispatcher(){\n\t\treturn \\Illuminate\\Log\\Writer::getEventDispatcher();\n\t}",
"public function event(): EventDispatcherInterface;",
"public function getDispatcherEvents()\n\t{\n\t\treturn $this->dispatcher;\n\t}",
"public static function getSharedDispatcher()\n {\n if (!self::$sharedDispatcher) {\n /** @var ObjectManagerInterface $objectManager */\n $objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n $requestFactory = $objectManager->getRequestFactory();\n $responseFactory = $objectManager->getResponseFactory();\n /** @var LoggerInterface $logger */\n $logger = $objectManager->get(LoggerInterface::class);\n new static($objectManager, $requestFactory, $responseFactory, $logger);\n }\n\n return self::$sharedDispatcher;\n }",
"public function getEventDispatcher()\n\t{\n\t\treturn $this->events;\n\t}",
"public function getDispatcher() {\n return $this->dispatcher;\n }",
"public function getEventDispatcher(): ?Dispatcher\n {\n if ($this->container->bound('events')) {\n return $this->container['events'];\n }\n\n return null;\n }",
"protected function getVictoireCore_MenuDispatcherService()\n {\n return $this->services['victoire_core.menu_dispatcher'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\MenuDispatcher($this->get('event_dispatcher'), $this->get('security.token_storage'), $this->get('security.authorization_checker'));\n }",
"public static function get() {\n\t\tstatic $singleton = NULL;\n\t\tis_null($singleton) && $singleton = new Dispatcher();\n\t\treturn $singleton;\n\t}",
"public function getOriginalEventDispatcher()\n {\n return $this->eventDispatcher;\n }",
"public static function setWrappedEventDispatcher(SymfonyEventDispatcherInterface $eventDispatcher)\n {\n if (static::$sharedInstance === null) {\n static::$sharedInstance = new self($eventDispatcher);\n\n return;\n }\n\n static::$sharedInstance->eventDispatcher = $eventDispatcher;\n }",
"private function getEventManager()\n {\n return $this->container->get('event_manager');\n }",
"public function getEventDispatcher()\n\t{\n\t\treturn $this->neoeloquent->getEventDispatcher();\n\t}",
"public function getEvent()\n {\n return $this->getServiceLocator()->get('Application')->getEventManager();\n }",
"public static function event() {\n return self::service()->get('events');\n }",
"public function registerSymfonyDispatcher()\n {\n try {\n $this->app['symfony.dispatcher'];\n } catch (\\ReflectionException $e) {\n $this->app['symfony.dispatcher'] = $this->app->share(\n function ($app) {\n return new EventDispatcher;\n }\n );\n }\n }",
"function FFW_EVENTS() {\n return FFW_EVENTS::instance();\n}",
"public function getEventsManager()\n {\n return $this->eventsManager;\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 }",
"function event(): EventEmitter\n{\n return EventEmitter::getInstance();\n}",
"protected function getEventsManager() {}",
"public static function instance() {\n if ( ! isset( self::$instance ) && ! ( self::$instance instanceof FFW_EVENTS ) ) {\n self::$instance = new FFW_EVENTS;\n self::$instance->setup_constants();\n self::$instance->includes();\n // self::$instance->load_textdomain();\n // use @examples from public vars defined above upon implementation\n }\n return self::$instance;\n }",
"public function getEventLoop() {\n\t\treturn $this->eventLoop;\n\t}",
"function &getDispatcher() {\n $dispatcher =& Registry::get('dispatcher', true, null);\n\n if (is_null($dispatcher)) {\n import('ikto.classes.core.ScienceJournalDispatcher');\n\n // Implicitly set dispatcher by ref in the registry\n $dispatcher = new ScienceJournalDispatcher();\n\n // Inject dependency\n $dispatcher->setApplication(PKPApplication::getApplication());\n\n // Inject router configuration\n $dispatcher->addRouterName('ikto.classes.core.ScienceJournalComponentRouter', ROUTE_COMPONENT);\n $dispatcher->addRouterName('ikto.classes.core.ScienceJournalPageRouter', ROUTE_PAGE);\n }\n\n return $dispatcher;\n }",
"public function getEventManager()\n {\n if (is_null($this->_events)) {\n $container = ContainerBuilder::buildContainer(\n [\n 'DefaultEventManager' => Definition::object(\n 'Zend\\EventManager\\SharedEventManager'\n )\n ]\n );\n $sharedEvents = $container->get('DefaultEventManager');\n $events = new EventManager();\n $events->setSharedManager($sharedEvents);\n $this->setEventManager($events);\n }\n return $this->_events;\n }",
"public function getEventManager()\n {\n if (!isset($this['event.manager'])) {\n $this['event.manager'] = new Manager($this['dispatcher']);\n }\n return $this['event.manager'];\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public function getEventManager()\n {\n if ($this->eventManager == null) {\n ControllerException::eventManagerNotDefined();\n }\n\n return $this->eventManager;\n }",
"public function getEventManager()\n {\n return $this->eventManager;\n }",
"public function getEventManager()\n {\n return $this->eventManager;\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function getInstance()\n {\n static $instance = false;\n\n if (!$instance) {\n $instance = new \\Xoops\\Core\\Events();\n }\n\n return $instance;\n }",
"public function getEventManager()\n {\n return $this->events;\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function getSignalSlotDispatcher() {\n\t\treturn $this->objectManager->get('TYPO3\\\\CMS\\\\Extbase\\\\SignalSlot\\\\Dispatcher');\n\t}",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public function getDispatcher(): RequestHandlerInterface {\n return $this->dispatcher;\n }",
"public static function getInstance(){\n if(static::$instance==null){\n static::$instance=new FEvento_p();\n }\n return static::$instance;\n }",
"public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }",
"protected static function getAppEventDispatcher(Application $app = null)\n {\n if ($app === null) {\n global $app;\n }\n\n if (! $app instanceof Application) {\n return null;\n }\n\n try {\n $runningCommand = readPrivateProperty($app, 'runningCommand');\n\n if (! $runningCommand instanceof Command) {\n throw new TestRuntimeException(\n 'Running command is empty or not an instance of the ' .\n 'Symfony\\Component\\Console\\Command\\Command class.'\n );\n }\n\n $codecept = readPrivateProperty($runningCommand, 'codecept');\n\n if (! $codecept instanceof Codecept) {\n throw new TestRuntimeException(\n 'Running command $codecept property is not set or not the correct type.'\n );\n }\n\n $appDispatcher = $codecept->getDispatcher();\n } catch (\\ReflectionException $e) {\n throw new TestRuntimeException(\n 'Could not get the value of the command $codecept property, message:' .\n $e->getMessage()\n );\n }\n\n return $appDispatcher;\n }",
"public function getEventDispatch();",
"public static function getDispatcher($ignoreCache = false)\n {\n $class = get_called_class();\n if ($ignoreCache || !isset(self::$dispatchers[$class])) {\n self::$dispatchers[$class] = new EventDispatcher();\n }\n\n return self::$dispatchers[$class];\n }",
"protected function getKernelExceptionSubscriberService()\n {\n return $this->services['kernel_exception_subscriber'] = new \\phpbb\\event\\kernel_exception_subscriber(${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, false);\n }",
"public function getEventPublisher()\n {\n return $this->eventPublisher;\n }",
"public function setEventDispatcher (Dispatcher $dispatcher) {\n $this->container->instance('events', $dispatcher);\n }",
"public static function getSignalSlotDispatcher(): Dispatcher\n {\n return GeneralUtility::makeInstance(Dispatcher::class);\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"public function getEventsManager() : ManagerInterface;",
"protected function getKernelTerminateSubscriberService()\n {\n return $this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber();\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"public function __construct(EventDispatcherInterface $event_dispatcher) {\n $this->eventDispatcher = $event_dispatcher;\n }",
"public function getEventSubscriberClass()\n {\n return get_class($this->wrapped);\n }",
"protected function getVictoireViewReference_EventSubscriberService()\n {\n return $this->services['victoire_view_reference.event_subscriber'] = new \\Victoire\\Bundle\\ViewReferenceBundle\\EventSubscriber\\ViewReferenceSubscriber($this->get('event_dispatcher'));\n }",
"public function __construct(EventDispatcherInterface $event_dispatcher) {\n\t\t$this->eventDispatcher = $event_dispatcher;\n\t}",
"public function __construct()\n {\n $this->events = new EventDispatcher();\n }",
"public function getEventManager()\n {\n Deprecation::triggerIfCalledFromOutside(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/issues/5784',\n '%s is deprecated.',\n __METHOD__,\n );\n\n return $this->_eventManager;\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public function service() {\n return $this->service;\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}",
"public function getDispatcher(): ?DispatcherInterface\n {\n return $this->dispatcher;\n }",
"public function testGetStaticEventDispatcher()\n {\n $transport = new Transport();\n $refTransport = new \\ReflectionObject($transport);\n $getStaticEventDispatcherMethod = $refTransport->getMethod('getEventDispatcher');\n $getStaticEventDispatcherMethod->setAccessible(true);\n $returnEventDispatcher = $getStaticEventDispatcherMethod->invoke($transport);\n $this->assertInstanceOf(EventDispatcher::class, $returnEventDispatcher);\n }",
"public static function getInstance() {\n return self::$instance;\n }",
"public function getServiceLocator()\r\n {\r\n return $this->serviceLocator;\r\n }",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"public static function getDispatcher($name = 'SHFactory')\n\t{\n\t\t$name = strtolower($name);\n\n\t\tif (!isset(self::$dispatcher[$name]))\n\t\t{\n\t\t\t// Something is up with the deprecation of JDispatcher in newer Joomla Versions\n\t\t\tif (class_exists('JDispatcher'))\n\t\t\t{\n\t\t\t\t// J2.5\n\t\t\t\tself::$dispatcher[$name] = new JDispatcher;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// J3.0+ and Platform\n\t\t\t\tself::$dispatcher[$name] = new JEventDispatcher;\n\t\t\t}\n\t\t}\n\n\t\treturn self::$dispatcher[$name];\n\t}",
"public function __construct(EventDispatcherInterface $event_dispatcher)\n {\n $this->event_dispatcher = $event_dispatcher;\n }",
"protected function getHttpKernelService()\n {\n return $this->services['http_kernel'] = new \\Symfony\\Component\\HttpKernel\\HttpKernel(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['controller.resolver']) ? $this->services['controller.resolver'] : $this->getController_ResolverService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"public static function getInstance()\r\n {\r\n return static::$instance;\r\n }",
"public function getEventsManager(): ?ManagerInterface;",
"public function setEventDispatcher(EventDispatcherInterface $eventDispatcher): void;",
"public static function getInstance() {\n\t\tif (!is_null(self::$INSTANCE)) {\n\t\t\treturn self::$INSTANCE;\n\t\t}\n\n\t\t$page = self::getPage(PhpBB::getInstance()->getRequest());\n\t\tself::$INSTANCE = self::getDispatcherType($page);\n\t\tself::$INSTANCE->page = $page;\n\t\tself::$INSTANCE->controller = AController::getInstance($page);\n\t\treturn self::$INSTANCE;\n\t}",
"public function getServiceLocator ()\n {\n return $this->serviceLocator;\n }",
"public static function getInstance()\n {\n return static::$instance;\n }"
] | [
"0.8082547",
"0.74879193",
"0.7415656",
"0.7333091",
"0.7270868",
"0.7212724",
"0.7150881",
"0.714787",
"0.70383567",
"0.7026146",
"0.68868333",
"0.68865883",
"0.6856445",
"0.6848307",
"0.6814494",
"0.6797737",
"0.67601585",
"0.67200613",
"0.65991396",
"0.6566795",
"0.6543914",
"0.6543914",
"0.653605",
"0.65127254",
"0.641898",
"0.6399287",
"0.6364646",
"0.6358914",
"0.6317277",
"0.62701744",
"0.6267948",
"0.6197644",
"0.6182177",
"0.6180604",
"0.6176948",
"0.6172587",
"0.6165174",
"0.6113054",
"0.6092275",
"0.60878193",
"0.6063974",
"0.6043975",
"0.6006477",
"0.5972117",
"0.59674746",
"0.5966299",
"0.5948573",
"0.59312546",
"0.5861201",
"0.584655",
"0.58289325",
"0.58289325",
"0.58076155",
"0.5803263",
"0.57906294",
"0.5760032",
"0.5709673",
"0.56998277",
"0.5644342",
"0.5642942",
"0.56361437",
"0.56267154",
"0.5624938",
"0.5621313",
"0.5572884",
"0.55692065",
"0.55678934",
"0.5556744",
"0.554735",
"0.554583",
"0.55117667",
"0.55105084",
"0.5479013",
"0.5477057",
"0.5475098",
"0.5473473",
"0.5466808",
"0.54511493",
"0.54463595",
"0.54378873",
"0.5417821",
"0.5406581",
"0.5397973",
"0.5395264",
"0.53923583",
"0.53895974",
"0.53877604",
"0.5386152",
"0.53814846",
"0.5380011",
"0.5368802",
"0.53681177",
"0.5363709",
"0.5361867",
"0.5357719",
"0.53558594",
"0.53481656",
"0.5348138",
"0.5344548",
"0.5343619"
] | 0.7233883 | 5 |
Gets the public 'http_kernel' shared service. | protected function getHttpKernelService()
{
return $this->services['http_kernel'] = new \Symfony\Component\HttpKernel\HttpKernel(${($_ = isset($this->services['event_dispatcher']) ? $this->services['event_dispatcher'] : $this->getEventDispatcherService()) && false ?: '_'}, new \Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver($this, ${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \Symfony\Component\HttpKernel\Log\Logger()) && false ?: '_'}), ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()) && false ?: '_'}, new \Symfony\Component\HttpKernel\Controller\ArgumentResolver(new \Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactory(), new RewindableGenerator(function () {
yield 0 => ${($_ = isset($this->services['argument_resolver.request_attribute']) ? $this->services['argument_resolver.request_attribute'] : $this->services['argument_resolver.request_attribute'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestAttributeValueResolver()) && false ?: '_'};
yield 1 => ${($_ = isset($this->services['argument_resolver.request']) ? $this->services['argument_resolver.request'] : $this->services['argument_resolver.request'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestValueResolver()) && false ?: '_'};
yield 2 => ${($_ = isset($this->services['argument_resolver.session']) ? $this->services['argument_resolver.session'] : $this->services['argument_resolver.session'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\SessionValueResolver()) && false ?: '_'};
yield 3 => ${($_ = isset($this->services['security.user_value_resolver']) ? $this->services['security.user_value_resolver'] : $this->load('getSecurity_UserValueResolverService.php')) && false ?: '_'};
yield 4 => ${($_ = isset($this->services['argument_resolver.service']) ? $this->services['argument_resolver.service'] : $this->load('getArgumentResolver_ServiceService.php')) && false ?: '_'};
yield 5 => ${($_ = isset($this->services['argument_resolver.default']) ? $this->services['argument_resolver.default'] : $this->services['argument_resolver.default'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\DefaultValueResolver()) && false ?: '_'};
yield 6 => ${($_ = isset($this->services['argument_resolver.variadic']) ? $this->services['argument_resolver.variadic'] : $this->services['argument_resolver.variadic'] = new \Symfony\Component\HttpKernel\Controller\ArgumentResolver\VariadicValueResolver()) && false ?: '_'};
}, 7)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getTwig_Runtime_HttpkernelService()\n {\n return $this->services['twig.runtime.httpkernel'] = new \\Symfony\\Bridge\\Twig\\Extension\\HttpKernelRuntime($this->get('fragment.handler'));\n }",
"protected function getHttpKernelService()\n {\n return $this->services['http_kernel'] = new \\Symfony\\Component\\HttpKernel\\HttpKernel(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['controller.resolver']) ? $this->services['controller.resolver'] : $this->getController_ResolverService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getKernelService()\n {\n throw new RuntimeException('You have requested a synthetic service (\"kernel\"). The DIC does not know how to construct this service.');\n }",
"protected function getHttpKernelService()\n {\n return $this->services['http_kernel'] = new \\Symfony\\Component\\HttpKernel\\HttpKernel($this->get('event_dispatcher'), new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver($this, ${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE)), $this->get('request_stack'), new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver(new \\Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory(), array(0 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver(), 1 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver(), 2 => new \\Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver($this->get('security.token_storage')), 3 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver(), 4 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver())));\n }",
"protected function getHttpKernel()\n {\n // подключен в конфиге симфони_фреймворк_бандла\n // vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml:12\n return $this->container->get('http_kernel');\n }",
"public static function kernel() {\n\t\treturn static::$kernel ?: (static::$kernel = new Kernel());\n\t}",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public function kernel()\n {\n return $this->_kernel;\n }",
"public function kernel()\n {\n return $this->_kernel;\n }",
"public function getSharedManager();",
"public static function getInstance()\n {\n if (!static::$instance)\n static::$instance = new Kernel;\n\n return static::$instance;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel() {\n\t\treturn $this->kernel;\n\t}",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"private function getHttpClient()\n {\n if ($httpClient = $this->app->config->get('swap.http_client')) {\n return $this->app[$httpClient];\n }\n\n return null;\n }",
"public function getOsapi()\n {\n return Controllers\\OsapiController::getInstance();\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem();\n }",
"public function service() {\n return $this->service;\n }",
"public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }",
"function getFilesystemService() {\n\t// $this->app->make('filesystem');\n\t// - or -\n\t// app('filesystem')\n\t// - or -\n\t// App::make('filesystem');\n\t// - or -\n\treturn $this->app['filesystem'];\n}",
"public function service()\n {\n return $this->service;\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"protected function getSymfonyRequestService()\n {\n return $this->services['symfony_request'] = new \\phpbb\\symfony_request(${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public static function getInstance()\r\n\t\t{\r\n\t\t\tif(is_null(self::$_instance))\r\n\t\t\t\tself::$_instance = new ApplicationKernel();\r\n\t\t\treturn self::$_instance;\r\n\t\t}",
"function &happy_linux_get_singleton( $name )\n{\n\tstatic $singletons;\n\n\tif ( !isset($singletons[$name]) ) \n\t{\n\t\t$class = 'happy_linux_'.$name;\n\t\t$file = XOOPS_ROOT_PATH.'/modules/happy_linux/class/'.$name.'.php';\n\n\t\tif ( file_exists($file) )\n\t\t{\n\t\t\tinclude_once $file;\n\t\t}\n\n\t\tif ( class_exists($class) ) \n\t\t{\n\t\t\t$singletons[$name] = new $class();\n\t\t}\n\t}\n\n\tif ( isset($singletons[$name]) ) \n\t{\n\t\t$single =& $singletons[$name];\n\t\treturn $single;\n\t}\n\telse\n\t{\n\t\tif ( happy_linux_is_admin() && function_exists('debug_print_backtrace') )\n\t\t{\n\t\t\techo \"happy_linux_get_singleton <br />\\n\";\n\t\t\tdebug_print_backtrace();\n\t\t}\n\t}\n\n\t$false = false;\n\treturn $false;\n}",
"abstract protected function getService();",
"public function getService()\n {\n return null;\n }",
"public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }",
"abstract public function getKernel(): PlaisioKernel;",
"function getService() {\n return $this->service;\n }",
"public function getService() {\n return $this->service;\n }",
"function oss_public_client()\n {\n try {\n return app('api-client')->service('oss-public-api');\n } catch (\\Throwable $e) {\n return null;\n }\n }",
"public function getService()\n {\n return $this->getKey('Service');\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"protected function getWorkspaceService() {}",
"protected function getWorkspaceService() {}",
"public function getNodeService();",
"protected function getRequestService()\n {\n return $this->services['request'] = new \\phpbb\\request\\request(NULL, true);\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"public function getService()\n {\n return $this->_service;\n }",
"public function getService($key = null)\n {\n if (null === $key) {\n return $this->kernel->container;\n } else {\n return $this->kernel->container[$key];\n }\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }",
"protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }",
"protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"private function getServiceHashtag()\n {\n return $this->container->get('app_service_hashtag');\n }",
"public function http(): SpanContextHttpInterface;",
"protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSession_HandlerService()\n {\n return $this->services['session.handler'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler(($this->targetDirs[3].'/app/../var/sessions/prod'));\n }",
"protected function getHttp()\n\t{\n\t\tif (empty($this->http))\n\t\t{\n\t\t\t$this->http = HttpFactory::getHttp();\n\t\t}\n\n\t\treturn $this->http;\n\t}",
"public function getHttpFactory() {\n return $this->httpFactory;\n }",
"abstract public function getServiceName();",
"public function getServiceLocator();",
"public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }",
"public static function getServer()\r\n {\r\n $osName = str_replace(' ', '', php_uname('s'));\r\n $className = \"\\\\\" . __NAMESPACE__ . \"\\\\OS\\\\$osName\";\r\n\r\n if(class_exists($className))\r\n {\r\n return new $className();\r\n }\r\n\r\n throw new OSNotFoundException();\r\n }",
"final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}",
"public static function api() {\n return Injector::inst()->get(self::APIServiceName);\n }",
"protected function get($serviceName)\n {\n return $this->codeIgniter->container->get($serviceName);\n }",
"public function getInstance() {\n\t\treturn $this->sh;\n\t}",
"public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }",
"public function getServiceLocator() \r\n { \r\n return $this->serviceLocator; \r\n }",
"public function getServiceManager()\n {\n return $this->sm;\n }",
"protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }",
"protected function getSecurity_AuthenticationUtilsService()\n {\n return $this->services['security.authentication_utils'] = new \\Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationUtils($this->get('request_stack'));\n }",
"public function getServiceLocator()\r\n {\r\n return $this->serviceLocator;\r\n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getServiceLocator ()\n {\n return $this->serviceLocator;\n }",
"protected function getSecurity_TokenStorageService()\n {\n return $this->services['security.token_storage'] = new \\Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage();\n }",
"protected function getSecurity_TokenStorageService()\n {\n return $this->services['security.token_storage'] = new \\Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage();\n }",
"public function getService()\n {\n return $this->send('POST', 'getService');\n }",
"public function get($serviceName);",
"function H_API() {\n\treturn H_API\\Endpoints::get_instance();\n}",
"public function getHttp()\n {\n return $this->http ?: $this->http = new Http();\n }",
"private function initHttp()\n {\n $this->di->mapService('core.http', '\\Core\\Http\\Http', [\n 'core.http.cookie',\n 'core.http.header'\n ]);\n $this->di->mapService('core.http.cookie', '\\Core\\Http\\Cookie\\CookieHandler');\n $this->di->mapService('core.http.header', '\\Core\\Http\\Header\\HeaderHandler');\n\n $this->http = $this->di->get('core.http');\n }",
"public function getUserOpenshiftIo()\n {\n return Controllers\\UserOpenshiftIoController::getInstance();\n }",
"protected static function __instance()\n {\n return DiPool::getinstance()->getSingleton(static::class);\n }",
"protected function getContainer()\n {\n if (!empty($this->kernelDir)) {\n $tmpKernelDir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : null;\n $_SERVER['KERNEL_DIR'] = getcwd().$this->kernelDir;\n }\n\n $cacheKey = $this->kernelDir.'|'.$this->environment;\n if (empty($this->containers[$cacheKey])) {\n $options = array(\n 'environment' => $this->environment,\n );\n $kernel = $this->createKernel($options);\n $kernel->boot();\n\n $this->containers[$cacheKey] = $kernel->getContainer();\n }\n\n if (isset($tmpKernelDir)) {\n $_SERVER['KERNEL_DIR'] = $tmpKernelDir;\n }\n\n return $this->containers[$cacheKey];\n }",
"public static function get() {\n return self::$app;\n }",
"public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }",
"protected function service()\n {\n return new Service();\n }",
"public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }",
"protected function getKernelTerminateSubscriberService()\n {\n return $this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber();\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }"
] | [
"0.67457736",
"0.6699442",
"0.635468",
"0.62597084",
"0.6193187",
"0.6108665",
"0.6105956",
"0.6099569",
"0.6099569",
"0.60915345",
"0.60650516",
"0.6057159",
"0.6057159",
"0.6057159",
"0.6057159",
"0.600807",
"0.5995665",
"0.58177453",
"0.5733615",
"0.57020676",
"0.5669944",
"0.564462",
"0.56445754",
"0.5636966",
"0.5617017",
"0.5595658",
"0.55846816",
"0.5571824",
"0.5539915",
"0.5526893",
"0.55166435",
"0.5505527",
"0.5492492",
"0.5485386",
"0.5483491",
"0.543174",
"0.5431028",
"0.5422117",
"0.541067",
"0.5406415",
"0.54034865",
"0.53997254",
"0.53997254",
"0.539403",
"0.5392847",
"0.5381352",
"0.5378645",
"0.5363265",
"0.5360137",
"0.5360137",
"0.5360137",
"0.5360137",
"0.5360137",
"0.5360137",
"0.5360137",
"0.53444934",
"0.53357476",
"0.53357476",
"0.53357476",
"0.53147924",
"0.53147924",
"0.53106403",
"0.53063387",
"0.53011346",
"0.5282342",
"0.5265691",
"0.52590084",
"0.52465224",
"0.5218031",
"0.52121",
"0.5204247",
"0.5177682",
"0.5175298",
"0.51735115",
"0.5147694",
"0.51445234",
"0.51361364",
"0.51181483",
"0.5114426",
"0.5106317",
"0.51038605",
"0.50969505",
"0.50969505",
"0.5090535",
"0.5089936",
"0.5089936",
"0.5087126",
"0.507936",
"0.5076164",
"0.5069868",
"0.5068293",
"0.50587654",
"0.50413543",
"0.50393426",
"0.50386566",
"0.5031025",
"0.50281984",
"0.5008528",
"0.49969986",
"0.49924937"
] | 0.5720247 | 19 |
Gets the public 'request_stack' shared service. | protected function getRequestStackService()
{
return $this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getRouter_RequestContextService()\n {\n return $this->services['router.request_context'] = new \\Symfony\\Component\\Routing\\RequestContext('', 'GET', 'localhost', 'http', 80, 443);\n }",
"protected function getRouter_RequestContextService()\n {\n return $this->services['router.request_context'] = new \\Symfony\\Component\\Routing\\RequestContext('', 'GET', 'localhost', 'http', 80, 443);\n }",
"protected function getCurrentRequest():ServerRequestInterface {\n return $this->requestStack->getCurrentRequest();\n }",
"public function getRequestStack()\n\t{\n\t\treturn $this->requestStack;\n\t}",
"protected function getRequestService()\n {\n return $this->services['request'] = new \\phpbb\\request\\request(NULL, true);\n }",
"public function getRequest()\r\n {\r\n return Mage::registry('current_request');\r\n }",
"protected function getSymfonyRequestService()\n {\n return $this->services['symfony_request'] = new \\phpbb\\symfony_request(${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public function getMaster()\n {\n $container = $this->getContainer();\n\n if ($container->has('request.master')) {\n return $container->get('request.master');\n }\n return $container->get('request');\n }",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"public function request() {\n return $this->requestStack->getCurrentRequest();\n }",
"private function getRequest()\n {\n if ($this->request === null) {\n $this->request = $this->container->get('request_stack')->getCurrentRequest();\n }\n return $this->request;\n }",
"public function service() {\n return $this->service;\n }",
"public function getRequest()\n {\n return \\Cloud::app()->getFrontController()->getRequest();\n }",
"function request(): Request\n\t{\n\t\tstatic $request;\n\n\t\tif($request === null)\n\t\t{\n\t\t\t$request = Application::instance()->getContainer()->get(Request::class);\n\t\t}\n\n\t\treturn $request;\n\t}",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"protected static function getStackCache()\n {\n if (self::$stackCache == null) {\n //Folder save Cache response\n if (isset(self::$configApp['cacheHttp']) && isset(self::$configApp['cacheHttp']['folderCache'])) {\n $folderCache = self::$configApp['cacheHttp']['folderCache'];\n } else {\n $folderCache = __DIR__ . '/../../storage/cacheHttp';\n }\n //Create folder\n if (is_dir($folderCache) == false) {\n mkdir($folderCache, 0777, true);\n chmod($folderCache, 0777);\n }\n\n $localStorage = new Local($folderCache);\n $systemStorage = new FlysystemStorage($localStorage);\n $cacheStrategy = new PrivateCacheStrategy($systemStorage);\n\n $stack = HandlerStack::create();\n $stack->push(new CacheMiddleware($cacheStrategy), 'cache');\n self::$stackCache = $stack;\n }\n return self::$stackCache;\n }",
"public function service()\n {\n return $this->service;\n }",
"public function getRequestInstance(){\n\t\treturn ControllerRequest::getInstance();\n\t}",
"protected function getMonolog_Logger_RequestService()\n {\n $this->services['monolog.logger.request'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('request');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public static function getServiceId(): string\n {\n return RequestInterface::class;\n }",
"public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }",
"public function getSharedManager();",
"public function getRequest()\n {\n return $this->getService('request');\n }",
"protected function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function getCurrentRequest()\n {\n return $this->container['request'];\n }",
"public static function getInstance(){\n\t\tif(null === self::$instance){\n\t\t\tself::$instance = new Stack();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"protected function getHttpKernelService()\n {\n return $this->services['http_kernel'] = new \\Symfony\\Component\\HttpKernel\\HttpKernel(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['controller.resolver']) ? $this->services['controller.resolver'] : $this->getController_ResolverService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getRequestStorageFactory() {\n return \\Drupal::service('vipps_recurring_payments:request_storage_factory');\n }",
"protected function getAssets_ContextService()\n {\n return $this->services['assets.context'] = new \\Symfony\\Component\\Asset\\Context\\RequestStackContext($this->get('request_stack'));\n }",
"protected function getCurrentRequest() {\n return \\Drupal::request();\n }",
"public function getMiddlewareStack() : array;",
"public function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"protected function _request() {\n\t\treturn $this->_container->request;\n\t}",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"protected function getRequest()\n {\n return app(Request::class);\n }",
"public function getService() {\n return $this->service;\n }",
"public function getRequest()\n {\n return static::app()->request;\n }",
"function getService() {\n return $this->service;\n }",
"private function getRequestFactory()\n {\n if ($requestFactory = $this->app->config->get('swap.request_factory')) {\n return $this->app[$requestFactory];\n }\n\n return null;\n }",
"public function getRequest() {\n\t\treturn $this->getFrontcontroller()->getRequest();\n\t}",
"function getRequest()\n {\n return $this->current_request;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"protected function getRequest() {\n if(!$this->request) {\n throw new \\RuntimeException('You cannot access the session without a Request object set');\n }\n return $this->request;\n }",
"function session()\n {\n return app()->services()->session()->stack();\n }",
"public function getService()\n {\n return $this->_service;\n }",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"protected function getHttpKernelService()\n {\n return $this->services['http_kernel'] = new \\Symfony\\Component\\HttpKernel\\HttpKernel($this->get('event_dispatcher'), new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver($this, ${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE)), $this->get('request_stack'), new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver(new \\Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory(), array(0 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver(), 1 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver(), 2 => new \\Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver($this->get('security.token_storage')), 3 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver(), 4 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver())));\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"protected function getTwig_Runtime_HttpkernelService()\n {\n return $this->services['twig.runtime.httpkernel'] = new \\Symfony\\Bridge\\Twig\\Extension\\HttpKernelRuntime($this->get('fragment.handler'));\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function getRequest() {\r\n\t\treturn $this->context->getState('request');\r\n\t}",
"public function request()\n {\n return $this->context->getRequest();\n }",
"public function getRequest(): RequestInterface;",
"public function getRequest()\n {\n if (null === $this->lastRequest) {\n $this->lastRequest = $this->requestStack->getMasterRequest();\n }\n\n\n return $this->lastRequest;\n }",
"public function getService()\n {\n return $this->getKey('Service');\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"protected function getRequestHandler() : string\n {\n return Request::class;\n }",
"public static function getServerRequest() {\n\t\tif (is_null(self::$serverRequest)) {\n\t\t\tself::$serverRequest = ServerRequest::fromGlobals();\n\t\t}\n\t\t\n\t\treturn self::$serverRequest;\n\t}",
"public function getRequest()\n {\n return $this->requestFactory->getRequest();\n }",
"private function getRequest()\n {\n $controller = $this->getController();\n return $controller->getRequest();\n }",
"public function getRequestId() {}",
"public function getRequestId() {}",
"public function getRequestedServices();",
"protected function getHttpKernel()\n {\n // подключен в конфиге симфони_фреймворк_бандла\n // vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml:12\n return $this->container->get('http_kernel');\n }",
"public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }",
"public function sharedInstance() {\n\t\tif (!self::$popServerInstance) {\n\t\t\tself::$popServerInstance = new PopServer();\n\t\t}\n\t\treturn self::$popServerInstance;\n\t}",
"public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }",
"public function getRequestId();",
"public function getRequest()\n {\n return $this->getComponent('request');\n }",
"public function request(): Request\n {\n try {\n $request = $this->container->get(Request::class);\n } catch (ContainerExceptionInterface $e) {\n throw new ScopeException(\n 'Unable to get `ServerRequestInterface` in active container scope',\n $e->getCode(),\n $e\n );\n }\n\n // Flushing input state\n if ($this->request !== $request) {\n $this->bags = [];\n $this->request = $request;\n }\n\n return $request;\n }",
"public function getRequest(): Request\n {\n return $this->request;\n }",
"public function getRequest(): Request\n {\n return $this->request;\n }",
"public function getRequest()\n\t{\n\t\treturn $this->getComponent('request');\n\t}",
"function getServiceName() { return $this->_servicename; }",
"private function _request()\n {\n if ($this->_request) {\n return $this->_request;\n }\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n return $this->_request;\n }",
"public function &getRequest() : RequestInterface\n {\n return $this->request;\n }",
"public function getRequest()\n\t{\n\t\treturn $this->compose('Request', 'Http\\Requests');\n\t}",
"public function getRequestHelper()\n {\n if (null === $this->requestHelper) {\n $this->requestHelper = Mage::helper('ops/payment_request');\n }\n\n return $this->requestHelper;\n }",
"function pusher(): Pusher\n\t{\n\t\tstatic $pusher;\n\n\t\tif($pusher === null)\n\t\t{\n\t\t\t$pusher = Application::instance()->getContainer()->get(Request::class)->getAttribute('mako.pusher');\n\t\t}\n\n\t\treturn $pusher;\n\t}",
"public function getServiceName()\n {\n if (array_key_exists(\"serviceName\", $this->_propDict)) {\n return $this->_propDict[\"serviceName\"];\n } else {\n return null;\n }\n }",
"public function getRequest()\n {\n if (! $this->request) {\n $this->request = \\Zend_Controller_Front::getInstance()->getRequest();\n }\n return $this->request;\n }",
"public function getRequest()\n {\n return isset($this->request) ? $this->request : null;\n }",
"private function getSharedAttributes($stack = []) {\n \n $mods = get_theme_mods(); \n\n if(is_array($mods) && !empty($mods)) {\n foreach($mods as $key => $mod) {\n if(in_array($key, $this->sharedModKeys)) {\n $stack[$key] = $mod; \n }\n }\n }\n\n return $stack; \n }",
"public function getRequest()\r\n {\r\n return $this->_controller->getApplication()->getRequest();\r\n }",
"public function getRequest(): Request|\\Symfony\\Component\\HttpFoundation\\Request\n {\n return $this->request ?: Request::createFromGlobals();\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }"
] | [
"0.59371424",
"0.59371424",
"0.586726",
"0.58414614",
"0.5828912",
"0.5803156",
"0.5797442",
"0.5726076",
"0.5706834",
"0.5706307",
"0.5705448",
"0.5669906",
"0.5582079",
"0.55666167",
"0.5537205",
"0.55328083",
"0.5504719",
"0.54949635",
"0.5491874",
"0.54605293",
"0.5459252",
"0.54561764",
"0.5447835",
"0.5422105",
"0.53935516",
"0.5385798",
"0.53781193",
"0.5364729",
"0.5357113",
"0.5334289",
"0.53299004",
"0.53279924",
"0.53117746",
"0.53117746",
"0.53072745",
"0.5298644",
"0.52962756",
"0.5281472",
"0.5263777",
"0.5260652",
"0.52564335",
"0.5243892",
"0.5224899",
"0.52214444",
"0.52214444",
"0.52214444",
"0.52214444",
"0.52214444",
"0.52214444",
"0.52214444",
"0.5206006",
"0.5202638",
"0.51935446",
"0.5192876",
"0.5191185",
"0.51860917",
"0.5162657",
"0.5146035",
"0.5146035",
"0.51399255",
"0.5137848",
"0.51342374",
"0.5132582",
"0.512281",
"0.5118185",
"0.51009786",
"0.50885427",
"0.5070758",
"0.5065624",
"0.5056798",
"0.505598",
"0.5051017",
"0.5046387",
"0.50315845",
"0.5030707",
"0.50259006",
"0.50189483",
"0.5017601",
"0.5004415",
"0.4997329",
"0.4997329",
"0.49929816",
"0.49888274",
"0.4987862",
"0.49837428",
"0.49823052",
"0.49809504",
"0.49774632",
"0.4964398",
"0.49591896",
"0.49558705",
"0.49511382",
"0.4944308",
"0.49422342",
"0.49396217",
"0.49396217",
"0.49396217",
"0.49396217"
] | 0.777501 | 2 |
Gets the public 'router' shared service. | protected function getRouterService()
{
$this->services['router'] = $instance = new \Symfony\Bundle\FrameworkBundle\Routing\Router($this, 'kernel:loadRoutes', array('cache_dir' => $this->targetDirs[0], 'debug' => true, 'generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', 'generator_base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper', 'generator_cache_class' => 'srcDevDebugProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper', 'matcher_cache_class' => 'srcDevDebugProjectContainerUrlMatcher', 'strict_requirements' => true, 'resource_type' => 'service'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'});
$instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRouterService() {\n return $this->routerService;\n }",
"protected function getRouterService()\n {\n return $this->services['router'] = new \\phpbb\\routing\\router($this, ${($_ = isset($this->services['routing.chained_resources_locator']) ? $this->services['routing.chained_resources_locator'] : $this->getRouting_ChainedResourcesLocatorService()) && false ?: '_'}, ${($_ = isset($this->services['routing.delegated_loader']) ? $this->services['routing.delegated_loader'] : $this->getRouting_DelegatedLoaderService()) && false ?: '_'}, 'php', './../cache/production/');\n }",
"private function get_router()\n\t{\n\t\treturn $this->m_router;\n\t}",
"public static function router() {\n\t\tif (!isset(self::$_router)) {\n\t\t\tself::$_router=new \\GO\\Base\\Router();\n\t\t}\n\t\treturn self::$_router;\n\t}",
"public function get_router();",
"public function router()\n {\n return $this->_router;\n }",
"public function router() \n\t{\n\t\treturn $this->router;\n\t}",
"public static function getRouter() {\n\t\tif (is_null(static::$router)) {\n\t\t\tstatic::createRouter();\n\t\t}\n\n\t\treturn static::$router;\n\t}",
"public function & GetRouter () {\n\t\treturn $this->router;\n\t}",
"public function getRouter()\n\t{\n\t\treturn self::$router;\n\t}",
"protected function getRouter()\n {\n return $this->app['router'];\n }",
"protected function getRouter()\n {\n return $this->app['router'];\n }",
"protected function _getRouter() {\n\t\treturn new Router;\n\t}",
"public function getRouter();",
"public function getRouter()\n {\n return $this->router;\n }",
"public function getRouter()\n {\n return $this->router;\n }",
"protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, ($this->targetDirs[3].'/app/config/routing.yml'), array('cache_dir' => __DIR__, 'debug' => false, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'appProdProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'appProdProjectContainerUrlMatcher', 'strict_requirements' => NULL), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n\n return $instance;\n }",
"public static function getInstance() {\n if (Router::$instance === null) {\n Router::$instance = new Router();\n }\n return Router::$instance;\n }",
"public function & GetRouter ();",
"public static function getInstance() {\n\n if (self::$instance == NULL) {\n self::$instance = new router();\n }\n return self::$instance;\n\n }",
"public function getRouter(){\n return $this->router;\n }",
"protected function getMonolog_Logger_RouterService()\n {\n $this->services['monolog.logger.router'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('router');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function menu_get_router()\n {\n return menu_get_router();\n }",
"public function getRouter() {\n\n // Return our router\n return $this->sRouter;\n }",
"public function getRouterBase();",
"public function getRouter()\n {\n if (is_null($this->_router)) {\n $this->_router = new Router(['request' => $this->getRequest()]);\n }\n return $this->_router;\n }",
"public function GetRouter ();",
"public function getRouter()\n {\n return isset($this->router) ? $this->router : '';\n }",
"function &getRouter()\n\t{\n\t\t$router =& parent::getRouter('administrator');\n\t\treturn $router;\n\t}",
"public static function getInstance(){\n\t\tif (!is_object(self::$instance))\n\t\t\tself::$instance=new TSMSRouter();\n\t\treturn self::$instance;\n\t\t}",
"protected function get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e(): \\Viserio\\Component\\Routing\\Router\n {\n $this->services[\\Viserio\\Contract\\Routing\\Router::class] = $instance = new \\Viserio\\Component\\Routing\\Router(($this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] ?? $this->get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c()));\n\n $instance->setContainer($this);\n\n return $instance;\n }",
"protected function get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e(): \\Viserio\\Component\\Routing\\Router\n {\n $this->services[\\Viserio\\Contract\\Routing\\Router::class] = $instance = new \\Viserio\\Component\\Routing\\Router(($this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] ?? $this->get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c()));\n\n $instance->setContainer($this);\n\n return $instance;\n }",
"protected function _createRouter(){\n\t\treturn new SimpleRouter();\n\t}",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"public function GetRouterClass ();",
"protected function getKnpMenu_Voter_RouterService()\n {\n return $this->services['knp_menu.voter.router'] = new \\Knp\\Menu\\Matcher\\Voter\\RouteVoter();\n }",
"public function getRouter(): ?RouterInterface\n {\n return $this->router;\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected static function createRouter() {\n\t\tstatic::$router = new Router();\n\t}",
"public function createRouter(): IRouter;",
"protected static function getFacadeAccessor() {\n return 'router';\n }",
"public static function routing() {\n\t\treturn env('ROUTING_MODE', 'router');\n\t}",
"protected function getRouting_ResolverService()\n {\n return $this->services['routing.resolver'] = new \\phpbb\\routing\\loader_resolver(${($_ = isset($this->services['routing.loader.collection']) ? $this->services['routing.loader.collection'] : $this->getRouting_Loader_CollectionService()) && false ?: '_'});\n }",
"public function get_strPathRouter()\n {\n return $this->strPathRouter;\n }",
"abstract protected function getDefaultRouterClass(): string;",
"public static function getInstance(): self\n {\n require_once '../routes/web.php';\n\n if (static::$instance === null) {\n static::$instance = new static();\n }\n\n return static::$instance;\n }",
"public static function router(){\n if(iRouter::callMade()) {\n viewManager::registerComponent(iRouter::$route);\n }\n }",
"protected function getRouting_HelperService()\n {\n return $this->services['routing.helper'] = new \\phpbb\\routing\\helper(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['symfony_request']) ? $this->services['symfony_request'] : $this->getSymfonyRequestService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, './../', 'php');\n }",
"protected function overrideRouter()\n\t{\n\t\t$this->app['router'] = $this->app->share(function($app)\n\t\t{\n\t\t\treturn $app['api.router'];\n\t\t});\n\t}",
"abstract protected function getDefaultRouterClass();",
"protected static function getFacadeAccessor()\n\t{\n\t\treturn static::$container->get('facade-router');\n\t}",
"protected function getVictoireCore_RoutingLoaderService()\n {\n return $this->services['victoire_core.routing_loader'] = new \\Victoire\\Bundle\\CoreBundle\\Route\\RouteLoader(array());\n }",
"public static function init()\n {\n $instance = static::instance();\n\n return $instance\n ->setRouter(Router::instance())\n ->_handle();\n }",
"protected function _initRouter()\n {\n $front = Zend_Controller_Front::getInstance();\n $router = $front->getRouter();\n \n // Add some routes\n $router->addRoute('routeId', new Zend_Controller_Router_Route('route/definition/:param'));\n //...\n \n // Returns the router resource to bootstrap resource registry\n return $router;\n }",
"public final function & router( ZRouter & $a_router = null )\r\n\t{\r\n\t\tif( $a_router === null )\r\n\t\t\treturn $this->getRouter();\r\n\r\n\t\treturn $this->setRouter($a_router);\r\n\t}",
"protected function getTemplate_Twig_Extensions_RoutingService()\n {\n return $this->services['template.twig.extensions.routing'] = new \\phpbb\\template\\twig\\extension\\routing(${($_ = isset($this->services['routing.helper']) ? $this->services['routing.helper'] : $this->getRouting_HelperService()) && false ?: '_'});\n }",
"final public static function router() {\n\n $ctr = 0;\n\n $path = self::getRouter();\n\n foreach(self::getController() as $data){\n\n if(in_array(strtolower($path['route']), $data )){\n\n\n if(!empty($path['controller'])){\n $route = ucfirst(strtolower($path['controller']));\n }else{\n $route = ucfirst('index');\n }\n\n if(!empty($path['action'])){\n $action = strtolower($path['action']).self::getConfig()->path->name_action;\n }else{\n $action = 'index'.self::getConfig()->path->name_action;\n }\n\n /**\n * Verifica se o controller existe\n */\n if(file_exists(self::getConfig()->path->path_modules.'/'.$data['path'].'/'.$route.self::getConfig()->path->name_controller.self::getConfig()->path->ext_file)){\n\n $namespace = str_replace('/','\\\\','\\\\'.$data['path'].'/'.$route.self::getConfig()->path->name_controller);\n\n $obj = new $namespace;\n\n return $obj->$action();\n\n }else{\n echo self::getConfig()->path->controller_not_found_msg;\n }\n\n $ctr++;\n\n }\n }\n /**\n * Verifica se a rota existe\n */\n if(!$ctr > 0){\n echo self::getConfig()->path->router_not_found_msg;\n }\n\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"final public static function getRouter(){\n $url = self::getUrl();\n\n $path = array(\n 'route' => $url[0],\n 'controller' => $url[1],\n 'action' => $url[2],\n );\n\n if(empty($path['route'])){\n $path['route'] =self::getConfig()->path->router_default;\n }\n\n\n return $path;\n }",
"private function getRoute(){\n\t}",
"public function routerProvider()\n {\n return [\n 'aura-minimal' => [3, 1, 'minimal-files', 404, [], Router\\AuraRouter::class],\n 'aura-full' => [3, 1, 'copy-files', 200, $this->expectedRoutes, Router\\AuraRouter::class],\n 'fastroute-minimal' => [3, 2, 'minimal-files', 404, [], Router\\FastRouteRouter::class],\n 'fastroute-full' => [3, 2, 'copy-files', 200, $this->expectedRoutes, Router\\FastRouteRouter::class],\n 'zend-router-minimal' => [3, 3, 'minimal-files', 404, [], Router\\ZendRouter::class],\n 'zend-router-full' => [3, 3, 'copy-files', 200, $this->expectedRoutes, Router\\ZendRouter::class],\n ];\n }",
"public function getSharedManager();",
"public function getRoutes()\n {\n return Controllers\\RoutesController::getInstance();\n }",
"public static function controller()\n\t{\n\t\treturn self::$router->getController();\n\t}",
"public function bootstrapRouter()\n {\n $this->router = new Router($this);\n }",
"protected function getRouter(): RouterDriver\n {\n if (!$this->drivers->get('router') instanceof RouterDriver) {\n throw new DriverNotSupportedException('Provided router driver is not supported.');\n }\n\n return $this->drivers->get('router');\n }",
"public static function getRouting()\n {\n if ( null === self::$routing )\n {\n throw new sfException( sprintf( 'You must pass a routing instance to the %s class.', get_class( $this ) ) );\n }\n\n return self::$routing;\n }",
"public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }",
"final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}",
"public static function router()\n {\n $routerOutput = '[Router]' . PHP_EOL;\n Router::init();\n $routes = Router::dump();\n $routerOutput .= CLITableBuilder::init(\n $routes,\n ['identifier', 'name', 'controller', 'action', 'method'],\n false,\n 10\n );\n CLIShellColor::commandOutput($routerOutput.PHP_EOL, 'white', 'green');\n }",
"public function get()\n\t{\n\t\t\n\t\t$route = $this->__path;\n\t\t\n\t\tif( $this->__mapper )\n\t\t{\n\t\t\t\n\t\t\t$map = $this->__mapper->match($this->__path);\n\t\t\n\t\t\tif( $map )\n\t\t\t{\n\t\t\t\t$route = $map;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn self::sanetize($route);\n\t\t\n\t}",
"public function set_router( sn\\base\\routing\\I_Router $router );",
"public function getSystemRoutes();",
"public function routerize(Router $router)\n\t{\n\t\t$router->middleware('admin','Mkny\\Cinimod\\Middleware\\Admin');\n\t\t$router->middleware('site','Mkny\\Cinimod\\Middleware\\Site');\n\n\t\t\n\n\t\t$router->group([\n 'namespace' => $this->namespace,\n // 'middleware' => 'web',\n ], function ($router) {\n require mkny_path('\\Cinimod\\Controllers\\routes.php');\n // require mkny_path('\\Cinimod\\Controllers\\routes.php');\n });\n\t\t\n\t\t\n\n\t\t// $this->routeResolver($router);\n\n\t\t\n\n\t}",
"public static function route()\n {\n return self::$route;\n }",
"protected static function __instance()\n {\n return DiPool::getinstance()->getSingleton(static::class);\n }",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"protected function getUriSignerService()\n {\n return $this->services['uri_signer'] = new \\Symfony\\Component\\HttpKernel\\UriSigner('0b1f529bfd1e2214cc16881ae978db041c8bee6f');\n }",
"public function router()\n {\n // Initializing variables\n LSReqenvironment::initialize();\n }",
"public function &getRoute() : \\Amvisie\\Core\\Route\n {\n return $this->route;\n }",
"private function _getRouteHelper()\n {\n return Mage::helper('route');\n }",
"public function getRoute()\n {\n }",
"public function getRoute();",
"public function getRoute(): Route;",
"public static function &getInstance()\n {\n static $instance;\n\n if (is_null($instance))\n {\n $instance = new tsHosting();\n }\n return $instance;\n }",
"protected function getRouterGenerator()\n {\n /** @var Router $router */\n $router = Application::container()->get('router.middleware');\n return $router->getRouterContainer()->getGenerator();\n }",
"public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"static function routes() {\n return self::$_routes;\n }",
"protected function getRouting_LoaderService()\n {\n $a = $this->get('file_locator');\n $b = $this->get('annotation_reader');\n\n $c = new \\Sensio\\Bundle\\FrameworkExtraBundle\\Routing\\AnnotatedRouteControllerLoader($b);\n\n $d = new \\Symfony\\Component\\Config\\Loader\\LoaderResolver();\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\XmlFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\PhpFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\DirectoryLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\DependencyInjection\\ServiceRouterLoader($this));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader($a, $c));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader($a, $c));\n $d->addLoader($c);\n $d->addLoader($this->get('victoire_core.routing_loader'));\n $d->addLoader($this->get('victoire_i18n.routing_loader'));\n\n return $this->services['routing.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'}, $d);\n }",
"protected function getFacadeRoot()\n {\n return HttplugManager::class;\n }",
"protected function getRouting_DelegatedLoaderService()\n {\n return $this->services['routing.delegated_loader'] = new \\Symfony\\Component\\Config\\Loader\\DelegatingLoader(${($_ = isset($this->services['routing.resolver']) ? $this->services['routing.resolver'] : $this->getRouting_ResolverService()) && false ?: '_'});\n }",
"function getRoute() {\n\t\treturn $this->config()->route;\n\t}",
"public static function &getInstance(){\n\t\tstatic $instance;\n\t\t\n\t\tif( is_null($instance) ){\n\t\t\t$instance = new tsSiteMap();\n \t}\n\t\treturn $instance;\n\t}",
"protected function getRouting_ResourcesLocator_DefaultService()\n {\n return $this->services['routing.resources_locator.default'] = new \\phpbb\\routing\\resources_locator\\default_resources_locator('./../', 'production', ${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n }",
"protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, './../', ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function getServiceLocator ()\n {\n return $this->serviceLocator;\n }",
"public function getRoutes() {}"
] | [
"0.81344014",
"0.7998334",
"0.78059834",
"0.77026695",
"0.76789755",
"0.7648378",
"0.76094735",
"0.75945336",
"0.7498437",
"0.74634534",
"0.7445047",
"0.7445047",
"0.7423577",
"0.7413018",
"0.740041",
"0.740041",
"0.7296917",
"0.72839135",
"0.7259575",
"0.72379416",
"0.7163058",
"0.7093951",
"0.70892316",
"0.70850885",
"0.70738053",
"0.704276",
"0.70135415",
"0.6966858",
"0.69489324",
"0.68884176",
"0.6696822",
"0.6696822",
"0.66580325",
"0.6580356",
"0.6528513",
"0.64848536",
"0.6465731",
"0.64264756",
"0.6402287",
"0.63855803",
"0.6380471",
"0.6379035",
"0.61875933",
"0.6161196",
"0.61432254",
"0.6136295",
"0.61316687",
"0.6075232",
"0.6033405",
"0.601443",
"0.60021555",
"0.59555167",
"0.59218955",
"0.590385",
"0.58893",
"0.57808083",
"0.5776954",
"0.5767871",
"0.57576346",
"0.5669709",
"0.56637913",
"0.5643599",
"0.564341",
"0.5626637",
"0.5590426",
"0.5572525",
"0.5552323",
"0.55449104",
"0.55393344",
"0.5531115",
"0.5527573",
"0.5516719",
"0.5501778",
"0.5485612",
"0.54844004",
"0.5468813",
"0.54563046",
"0.54490334",
"0.54382217",
"0.54360783",
"0.54302657",
"0.5419858",
"0.5419485",
"0.5406683",
"0.54062784",
"0.5390161",
"0.53802943",
"0.53762335",
"0.5375927",
"0.5363864",
"0.5363364",
"0.53440994",
"0.53349364",
"0.53217256",
"0.53197855",
"0.53089726",
"0.53065425",
"0.5300264",
"0.52933997",
"0.52928454"
] | 0.7372492 | 16 |
Gets the public 'security.token_storage' shared service. | protected function getSecurity_TokenStorageService()
{
return $this->services['security.token_storage'] = new \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStorageService();",
"public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }",
"public function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('Application\\Event\\MyAuthStorage');\n }\n return $this->storage;\n }",
"protected function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('cp_user_auth_storage');\n }\n\n return $this->storage;\n }",
"private function _getStorageName() {\n\t\tif($this->_rememberMe) {\n\t\t\treturn self::TOKEN_COOKIE_STORAGE;\n\t\t}\n\n\t\treturn self::TOKEN_SESSION_STORAGE;\n\t}",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"protected function getStorage()\n {\n return unserialize(Session::retrieve(__NAMESPACE__));\n }",
"public function getSharedManager();",
"function getStorage()\n{\n\tif (!$this->storage) $this->storage = new AuthDbStorage;\n\treturn $this->storage;\t\n}",
"public function getStorage()\n {\n return Controllers\\StorageController::getInstance();\n }",
"public function getStorage()\n {\n if (NULL === $this->_storage) {\n $this->setStorage(new Auth\\Storage\\MultipleIdentities());\n }\n \n return $this->_storage;\n }",
"public function getStorage():OAuthStorageInterface;",
"public function getStorage(): StorageInterface\n {\n return $this->storage;\n }",
"protected function getSession_Storage_NativeService()\n {\n return $this->services['session.storage.native'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage(array('cookie_httponly' => true, 'gc_probability' => 1), $this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"public static function getStorage() {}",
"public function getStorage()\n {\n return $this->get(self::_STORAGE);\n }",
"protected function getTokenService(){\n\t\tif ($this->token_service == null) {\n\t\t\t$this->token_service = new \\Wallee\\Sdk\\Service\\TokenService(\\WalleeHelper::instance($this->registry)->getApiClient());\n\t\t}\n\t\t\n\t\treturn $this->token_service;\n\t}",
"public function getStorage()\n {\n return $this->_storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getStorage()\n {\n return $this->storage;\n }",
"public function getInstanceStorage() {\n if (null == $this->instanceStorage) {\n $this->instanceStorage = new InstanceStorage();\n }\n\n return $this->instanceStorage;\n }",
"public function getStorage()\r\n {\r\n return $this->storage;\r\n }",
"public function getStorage() {\n\t\treturn $this->_storage;\n\t}",
"public static function inst()\n {\n if (!self::$inst) {\n self::$inst = new SecurityToken();\n }\n\n return self::$inst;\n }",
"public function getStorage();",
"public function getStorage();",
"public function &_getStorage()\n\t{\n\t\t$hash = md5(serialize($this->_options));\n\n\t\tif (isset(self::$_handler[$hash]))\n\t\t{\n\t\t\treturn self::$_handler[$hash];\n\t\t}\n\n\t\tself::$_handler[$hash] = TCacheStorage::getInstance($this->_options['storage'], $this->_options);\n\n\t\treturn self::$_handler[$hash];\n\t}",
"public function getStorage() {}",
"public function getStorage() {}",
"public function getStorage() {}",
"public function getStorage()\n {\n if($this->_storageInstance == null)\n {\n $storageClass = $this->_storageClass;\n $this->_storageInstance = new $storageClass($this->_storageConfig);\n $this->_storageInstance->setMapperInstance($this);\n }\n return $this->_storageInstance;\n }",
"public function getCacheStorage(): CacheStorageInterface\n {\n return $this->storage;\n }",
"public function getSymbolStorage() {\n if (null == $this->symbolStorage) {\n $this->symbolStorage = new SymbolStorage();\n }\n\n return $this->symbolStorage;\n }",
"public static function getSecurityToken()\n {\n return Utilities::getSecurityToken();\n }",
"protected function get_stored_token() {\n global $SESSION;\n\n $name = $this->get_tokenname();\n\n if (isset($SESSION->{$name})) {\n return $SESSION->{$name};\n }\n\n return null;\n }",
"function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}",
"public static function getStorage($app) {\n\t\treturn \\OC_App::getStorage($app);\n\t}",
"public function getSharedSecret(): string;",
"public function getStorage()\n {\n if (null === $this->storage) {\n $this->setStorage();\n }\n return $this->storage;\n }",
"protected function getSession_Storage_FilesystemService()\n {\n return $this->services['session.storage.filesystem'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage((__DIR__.'/sessions'), 'MOCKSESSID', ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"public function getStorage(): StorageInterface\n {\n return $this->configuration[ConfigurationInterface::STORAGE];\n }",
"function getStorage();",
"public function getSharedKey(): string;",
"public static function get_token() {\n global $USER;\n $sid = session_id();\n return self::get_token_for_user($USER->id, $sid);\n }",
"public function client()\n {\n return StorageProviderClientFactory::make($this);\n }",
"public function getSharedKey(): string\n {\n return $this->sharedKey;\n }",
"function getFilesystemService() {\n\t// $this->app->make('filesystem');\n\t// - or -\n\t// app('filesystem')\n\t// - or -\n\t// App::make('filesystem');\n\t// - or -\n\treturn $this->app['filesystem'];\n}",
"public function getSharedSecret()\n {\n return isset($this->shared_secret) ? $this->shared_secret : '';\n }",
"function getStorage() ;",
"public function setStorage(OAuthStorageInterface $storage):static;",
"private function getStorage()\n {\n if (empty($this->storage)) {\n $this->storage = $this->wizardStorageFactory->create([\n 'key' => $this->getRequest()->getParam(UrlBuilder::REQUEST_PARAM_CONFIGURE_KEY)\n ]);\n }\n return $this->storage;\n }",
"public function retrieve(): ?TokenInterface\n {\n $token = $this->storage->get(self::STORAGE_KEY)[0] ?? null;\n if ($token && $this->isLocalUserActive($token)) {\n return $token;\n }\n return null;\n }",
"public function sharedData()\r\n {\r\n return $this->shared_data;\r\n }",
"function token(){\n return Request::session('internal_token');\n}",
"function get_storage()\n{\n return env('FILESYSTEM_DRIVER');\n}",
"public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}",
"protected function getStorage()\n{\n\tglobal $pclib;\n\tif (!$this->storage) $this->storage = new TranslatorDbStorage($this);\n\treturn $this->storage;\n}",
"abstract protected function getStorage(): StorageInterface;",
"public function getStorageNode()\n {\n return $this->get('storagenode');\n }",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem();\n }",
"function getStorageEngine() {\n \treturn $this->storage_engine;\n }",
"protected function getToken()\n {\n if (!$this->isStateless()) {\n $temp = $this->request->getSession()->get('oauth.temp');\n\n return $this->server->getTokenCredentials(\n $temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')\n );\n } else {\n $temp = unserialize($_COOKIE['oauth_temp']);\n\n return $this->server->getTokenCredentials(\n $temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')\n );\n }\n }",
"public function getSharedSecret()\n {\n if (array_key_exists(\"sharedSecret\", $this->_propDict)) {\n return $this->_propDict[\"sharedSecret\"];\n } else {\n return null;\n }\n }",
"public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}",
"public function getService()\r\n\t{\r\n\t\t$this->_service = $this->getClient()->objectStoreService('cloudFiles', $this->region);\r\n\t\treturn $this->_service;\r\n\t}",
"protected function getTokenService()\n {\n if ($this->tokenService == null) {\n $this->tokenService = new \\PostFinanceCheckout\\Sdk\\Service\\TokenService(PostFinanceCheckoutModule::instance()->getApiClient());\n }\n\n return $this->tokenService;\n }",
"public function storage($storage)\n\t{\n\t\treturn $this->storage->get($storage);\n\t}",
"protected function getTokenService()\n {\n if ($this->tokenService == null) {\n $this->tokenService = new \\TrustPayments\\Sdk\\Service\\TokenService(TrustPaymentsModule::instance()->getApiClient());\n }\n\n return $this->tokenService;\n }",
"protected function getSecurityToken() {\n\t\treturn new \\SecurityToken(self::SECURITY_TOKEN_NAME);\n\t}",
"function getObjectStore()\n {\n // services. You can also get it from $identity->token().\n $token = $this->identity->authenticateAsUser($this->username, $this->password, null, $this->tenantName);\n Session::put('token', $token);\n\n // Get a listing of all of the services you currently have configured in\n // OpenStack.\n //$catalog = $identity->serviceCatalog();\n //$tenantName = $identity->tenantName();\n\n $storageList = $this->identity->serviceCatalog('object-store');\n $objectStorageUrl = $storageList[0]['endpoints'][0]['publicURL'];\n\n // Create a new ObjectStorage instance:\n $objectStore = new ObjectStorage($token, $objectStorageUrl);\n\n return $objectStore;\n }",
"protected function getStorage(StorageInterface $source) {\n return new GhostStorage($source);\n }",
"protected function getRequestStorageFactory() {\n return \\Drupal::service('vipps_recurring_payments:request_storage_factory');\n }",
"protected function getSession_Storage_MetadataBagService()\n {\n return $this->services['session.storage.metadata_bag'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag('_sf2_meta', '0');\n }",
"protected function getTokenVersionService(){\n\t\tif ($this->token_version_service == null) {\n\t\t\t$this->token_version_service = new \\Wallee\\Sdk\\Service\\TokenVersionService(\\WalleeHelper::instance($this->registry)->getApiClient());\n\t\t}\n\t\t\n\t\treturn $this->token_version_service;\n\t}",
"protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }",
"protected function getSession_Storage_PhpBridgeService()\n {\n return $this->services['session.storage.php_bridge'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage($this->get('session.handler'), ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }",
"public static function shared()\n {\n static $instance = null;\n if( $instance === null )\n {\n $instance = new static();\n }\n return $instance;\n }",
"public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }",
"function _getStorage()\n {\n if ($this->_handler instanceof CacheStorage) {\n return $this->_handler;\n }\n\n $this->_handler = CacheStorage::getInstance($this->_options['storage'], $this->_options);\n if ($this->_handler != null) {\n if ($this->_handler->test()) {\n return $this->_handler;\n } else {\n $this->_handler = CacheStorage::getInstance('file', $this->_options);\n return $this->_handler;\n }\n } else {\n return null;\n }\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"public static function GetTokenServer ()\n {\n\t\treturn self::GetServer('forceTokenServer', 'token');\n }",
"public function getCurrentStorage() {\n return @$this->attributes['current_storage'];\n }",
"protected function getFosUser_Util_TokenGeneratorService()\n {\n return $this->services['fos_user.util.token_generator'] = new \\FOS\\UserBundle\\Util\\TokenGenerator();\n }",
"public function get()\n {\n if ($token = $this->cachedToken()) {\n return $token;\n }\n\n return $this->newToken();\n }",
"public function get()\n {\n if (!$this->storage->has(self::STORAGE_KEY)) {\n $this->update();\n }\n return $this->storage->get(self::STORAGE_KEY);\n }",
"public function getLibraryStorage() {\n if (null == $this->libraryStorage) {\n $this->libraryStorage = new LibraryStorage();\n }\n\n return $this->libraryStorage;\n }",
"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 }",
"public function getAzureFilesStorageSasToken() {\n return @$this->attributes['azure_files_storage_sas_token'];\n }",
"public function storageClass()\n {\n return 'OAuth2_Storage_Pdo';\n }",
"protected function getStorageFile()\n\t{\n\t\t$this->createDirectory();\n\t\treturn $this->storagePath.$this->storageFileName;\n\t}",
"public function getToken(){\n\t\t$token = $this->config->getAppValue('owncollab_ganttchart', 'sharetoken', 0);\n\t\tif ($token === 0){\n\t\t\t$token = $this->generateToken();\n\t\t}\n\t\treturn $token;\n\t}",
"public static function getToken() {\n return session(\"auth_token\", \"\");\n }"
] | [
"0.70061004",
"0.69544894",
"0.6743185",
"0.6726429",
"0.6493238",
"0.64293724",
"0.64108723",
"0.6380058",
"0.63707745",
"0.63647574",
"0.63508135",
"0.62439954",
"0.6182945",
"0.61813575",
"0.6169047",
"0.61324614",
"0.61092895",
"0.60971105",
"0.6093218",
"0.6093218",
"0.6093218",
"0.6093218",
"0.6093218",
"0.6093218",
"0.6093218",
"0.6093218",
"0.6093218",
"0.609261",
"0.60904485",
"0.60548615",
"0.6039897",
"0.6021407",
"0.6021407",
"0.60150254",
"0.6002818",
"0.6002491",
"0.6002463",
"0.5996482",
"0.5975685",
"0.5963951",
"0.5953253",
"0.5937985",
"0.59351206",
"0.59314644",
"0.5927341",
"0.58969146",
"0.5884245",
"0.58818763",
"0.58680964",
"0.5852649",
"0.57833546",
"0.5781956",
"0.5765896",
"0.5760006",
"0.5755481",
"0.57518643",
"0.5750434",
"0.5744019",
"0.5741905",
"0.57198024",
"0.5715751",
"0.57116634",
"0.569288",
"0.5679899",
"0.5673433",
"0.5671001",
"0.5670438",
"0.56479686",
"0.563617",
"0.5630052",
"0.56277883",
"0.56261945",
"0.5619549",
"0.56127703",
"0.56041807",
"0.56022877",
"0.5598531",
"0.5591852",
"0.55916315",
"0.5559921",
"0.5558874",
"0.5551182",
"0.55367607",
"0.5531829",
"0.55277294",
"0.55268013",
"0.55209553",
"0.55186725",
"0.55147445",
"0.55123353",
"0.54863167",
"0.5482211",
"0.5480681",
"0.5471341",
"0.5454011",
"0.5448827",
"0.54458046",
"0.5441412",
"0.5439581"
] | 0.80226177 | 1 |
Gets the private 'App\EventSubscriber\RestSubscriber' shared autowired service. | protected function getRestSubscriberService()
{
return $this->services['App\EventSubscriber\RestSubscriber'] = new \App\EventSubscriber\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"protected function getVictoireViewReference_EventSubscriberService()\n {\n return $this->services['victoire_view_reference.event_subscriber'] = new \\Victoire\\Bundle\\ViewReferenceBundle\\EventSubscriber\\ViewReferenceSubscriber($this->get('event_dispatcher'));\n }",
"protected function getVictoireBlog_Article_SubscriberService()\n {\n return $this->services['victoire_blog.article.subscriber'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleSubscriber($this->get('victoire_page.user_callable'), 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User');\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function get_rest_api_instance() {\n\t\treturn $this->rest_api;\n\t}",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"public function getEventSubscriber();",
"private function getRessourceService()\n {\n if (!$this->ressourceService) {\n $this->ressourceService = $this->getServiceManager()->get('playgroundcms_ressource_service');\n }\n\n return $this->ressourceService;\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"protected function getVictoireCore_CacheSubscriberService()\n {\n return $this->services['victoire_core.cache_subscriber'] = new \\Victoire\\Bundle\\CoreBundle\\EventSubscriber\\CacheSubscriber($this->get('victoire_core.cache_builder'));\n }",
"public static function instance() {\n\t\treturn tribe( 'events-aggregator.service' );\n\t}",
"protected function getJmsSerializer_DoctrineProxySubscriberService()\n {\n return $this->services['jms_serializer.doctrine_proxy_subscriber'] = new \\JMS\\Serializer\\EventDispatcher\\Subscriber\\DoctrineProxySubscriber(false, true);\n }",
"protected function getSensioFrameworkExtra_Controller_ListenerService()\n {\n return $this->services['sensio_framework_extra.controller.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener($this->get('annotation_reader'));\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"public static function getRestDispatch() : RestDispatch\n {\n static $dispatch;\n\n if ($dispatch === null || ! ($dispatch instanceof RestDispatch)) {\n $dispatch = new RestDispatch();\n }\n\n return $dispatch;\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"protected function getPage_SubscriberService()\n {\n return $this->services['page.subscriber'] = new \\Victoire\\Bundle\\PageBundle\\EventSubscriber\\PageSubscriber($this->get('router'), $this->get('victoire_page.user_callable'), 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User', $this->get('victoire_view_reference.builder'), $this->get('victoire_view_reference.repository'));\n }",
"protected function getVictoireI18n_LocaleSubscriberService()\n {\n return $this->services['victoire_i18n.locale_subscriber'] = new \\Victoire\\Bundle\\I18nBundle\\Subscriber\\LocaleSubscriber('en', $this->get('victoire_i18n.locale_resolver'));\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getVictoireAnalytics_BrowserEvent_SubscriberService()\n {\n return $this->services['victoire_analytics.browser_event.subscriber'] = new \\Victoire\\Bundle\\AnalyticsBundle\\EventSubscriber\\BrowseEventSubscriber('Victoire\\\\Bundle\\\\UserBundle\\\\Entity\\\\User');\n }",
"protected function getVictoireCore_EntityProxy_SubscriberService()\n {\n $this->services['victoire_core.entity_proxy.subscriber'] = $instance = new \\Victoire\\Bundle\\CoreBundle\\EventSubscriber\\EntityProxySubscriber();\n\n $instance->setBusinessEntityCacheReader($this->get('victoire_business_entity.cache_reader'));\n\n return $instance;\n }",
"protected function getAnnotations_ReaderService()\n {\n $this->services['annotations.reader'] = $instance = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n\n $a = new \\Doctrine\\Common\\Annotations\\AnnotationRegistry();\n $a->registerUniqueLoader('class_exists');\n\n $instance->addGlobalIgnoredName('required', $a);\n\n return $instance;\n }",
"public function getEventSubscriberClass()\n {\n return get_class($this->wrapped);\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"function getService() {\n return $this->service;\n }",
"protected function getKernelExceptionSubscriberService()\n {\n return $this->services['kernel_exception_subscriber'] = new \\phpbb\\event\\kernel_exception_subscriber(${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, false);\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"protected function getAnnotations_ReaderService()\n {\n return $this->services['annotations.reader'] = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n }",
"protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }",
"public function getRESTClient()\n\t{\n\t\tif ($this->rest_client === null) {\n\t\t\t$this->rest_client = new kyRESTClient();\n\t\t\t$this->rest_client->setConfig($this);\n\t\t}\n\n\t\treturn $this->rest_client;\n\t}",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, 'kernel:loadRoutes', array('cache_dir' => $this->targetDirs[0], 'debug' => true, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'srcDevDebugProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'srcDevDebugProjectContainerUrlMatcher', 'strict_requirements' => true, 'resource_type' => 'service'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'});\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n\n return $instance;\n }",
"protected function resourceService(){\n return new $this->resourceService;\n }",
"protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, ${($_ = isset($this->services['annotations.cache']) ? $this->services['annotations.cache'] : $this->load('getAnnotations_CacheService.php')) && false ?: '_'}, true);\n }",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getResolveControllerNameSubscriberService()\n {\n return $this->services['resolve_controller_name_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'});\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"public function getSubscriber()\n {\n return $this->subscriber;\n }",
"private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }",
"public function getApiService();",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function service()\n {\n return $this->service;\n }",
"public function onInitResourceVrpayecommerceClient()\n {\n $this->Application()->Loader()->registerNamespace(\n 'Shopware_Components_Vrpayecommerce',\n $this->Path() . 'Components/Vrpayecommerce/'\n );\n $client = new Shopware_Components_Vrpayecommerce_Client($this->Config());\n return $client;\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function getService() {\n return $this->service;\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"protected function getVictoireCore_WidgetSubscriberService()\n {\n return $this->services['victoire_core.widget_subscriber'] = new \\Victoire\\Bundle\\CoreBundle\\EventSubscriber\\WidgetSubscriber($this->get('victoire_core.view_css_builder'), $this->get('victoire_widget_map.builder'));\n }",
"protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public static function getSubscribedServices()\r\n {\r\n return [\r\n MDHelper::class,\r\n LoggerInterface::class\r\n ];\r\n }",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"public static function getInstance() {\n return !self::$instance ? new restaurantService() : self::$instance;\n\t\t}",
"public function service() {\n return $this->service;\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"public function getAppService()\n {\n return $this->getController()->getServiceLocator()->get('Application\\Service\\Service');\n }",
"protected function getConsole_ExceptionSubscriberService()\n {\n return $this->services['console.exception_subscriber'] = new \\phpbb\\console\\exception_subscriber(${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'});\n }",
"private function getServicePostSubscription()\n {\n return $this->container->get('app_service_post_subscription');\n }",
"public function __invoke()\n {\n $client = $this->container->get('cpms\\service\\api');\n\n return $client;\n }",
"protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, new \\Symfony\\Component\\Cache\\DoctrineProvider(\\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create((__DIR__.'/annotations.php'), ${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'})), false);\n }",
"public function __construct(RestServices $restServices)\n {\n $this->restServices = $restServices;\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getVictoireBusinessEntity_BusinessEntitySubscriberService()\n {\n return $this->services['victoire_business_entity.business_entity_subscriber'] = new \\Victoire\\Bundle\\BusinessEntityBundle\\EventSubscriber\\BusinessEntitySubscriber($this->get('victoire_business_page.business_page_builder'), $this->get('victoire_core.helper.business_entity_helper'), $this->get('victoire_business_page.business_page_helper'), $this->get('event_dispatcher'));\n }",
"protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, ($this->targetDirs[3].'/app/config/routing.yml'), array('cache_dir' => __DIR__, 'debug' => false, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'appProdProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'appProdProjectContainerUrlMatcher', 'strict_requirements' => NULL), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n\n return $instance;\n }",
"protected function getSncRedis_LoggerService()\n {\n return $this->services['snc_redis.logger'] = new \\Snc\\RedisBundle\\Logger\\RedisLogger($this->get('monolog.logger.snc_redis', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"function &getDispatcher() {\n $dispatcher =& Registry::get('dispatcher', true, null);\n\n if (is_null($dispatcher)) {\n import('ikto.classes.core.ScienceJournalDispatcher');\n\n // Implicitly set dispatcher by ref in the registry\n $dispatcher = new ScienceJournalDispatcher();\n\n // Inject dependency\n $dispatcher->setApplication(PKPApplication::getApplication());\n\n // Inject router configuration\n $dispatcher->addRouterName('ikto.classes.core.ScienceJournalComponentRouter', ROUTE_COMPONENT);\n $dispatcher->addRouterName('ikto.classes.core.ScienceJournalPageRouter', ROUTE_PAGE);\n }\n\n return $dispatcher;\n }",
"public function getRouterService() {\n return $this->routerService;\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->clientArticleService = app()->make(ClientArticleService::class);\n }",
"public function createSubscriber();",
"public function getUserService()\n {\n return $this->userService;\n }",
"public function getRentalsService()\n {\n return $this->rentalsService;\n }",
"public function getRestClient()\n {\n if (!isset($this->restClient)) {\n $this->restClient = new Client(\n array(\n 'base_uri' => $this->restParameters['base_url']\n )\n );\n }\n return $this->restClient;\n }",
"private function getGraylogService()\n {\n if ($this->graylogService instanceof GraylogService) {\n return $this->graylogService;\n } elseif ($this->graylogService instanceof DependencyProxy) {\n return $this->graylogService->_activateDependency();\n } else {\n return new GraylogService();\n }\n }",
"public function getSlideService(){\n if(null === $this->slideService)\n $this->slideService = $this->getServiceLocator()->get('slide_service');\n return $this->slideService;\n }",
"protected function registerClientBaseService()\n {\n $this->bind('http', function ($app) {\n return new Http(new Client());\n });\n\n $this->bind('access_token', function ($app) {\n return new AccessToken(\n $app->config->get('app_id'),\n $app->config->get('secret'),\n $app['cache'],\n $app['http']\n );\n });\n }",
"protected function getRouting_DelegatedLoaderService()\n {\n return $this->services['routing.delegated_loader'] = new \\Symfony\\Component\\Config\\Loader\\DelegatingLoader(${($_ = isset($this->services['routing.resolver']) ? $this->services['routing.resolver'] : $this->getRouting_ResolverService()) && false ?: '_'});\n }",
"public function registerSymfonyDispatcher()\n {\n try {\n $this->app['symfony.dispatcher'];\n } catch (\\ReflectionException $e) {\n $this->app['symfony.dispatcher'] = $this->app->share(\n function ($app) {\n return new EventDispatcher;\n }\n );\n }\n }",
"public function getClient() {\n\t\treturn $this->service; \n\t}",
"protected function getFosJsRouting_SerializerService()\n {\n return $this->services['fos_js_routing.serializer'] = new \\Symfony\\Component\\Serializer\\Serializer(array(0 => new \\Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer()), array('json' => new \\Symfony\\Component\\Serializer\\Encoder\\JsonEncoder()));\n }",
"protected function getHttpKernelService()\n {\n return $this->services['http_kernel'] = new \\Symfony\\Component\\HttpKernel\\HttpKernel($this->get('event_dispatcher'), new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver($this, ${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE)), $this->get('request_stack'), new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver(new \\Symfony\\Component\\HttpKernel\\ControllerMetadata\\ArgumentMetadataFactory(), array(0 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver(), 1 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver(), 2 => new \\Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver($this->get('security.token_storage')), 3 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver(), 4 => new \\Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\VariadicValueResolver())));\n }",
"protected function getFosUser_Listener_ResettingService()\n {\n return $this->services['fos_user.listener.resetting'] = new \\FOS\\UserBundle\\EventListener\\ResettingListener($this->get('router'), 86400);\n }",
"protected function getKernelTerminateSubscriberService()\n {\n return $this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber();\n }",
"function H_API() {\n\treturn H_API\\Endpoints::get_instance();\n}",
"public function getService()\n {\n if (!$this->service) {\n /** @var \\OAuth\\ServiceFactory $serviceFactory */\n $serviceFactory = $this->app->make('oauth/factory/service');\n $this->service = $this->factory->createService($serviceFactory);\n }\n\n return $this->service;\n }"
] | [
"0.6869794",
"0.6032906",
"0.59967154",
"0.5986137",
"0.59064466",
"0.5882892",
"0.5875221",
"0.5854544",
"0.5829561",
"0.5825283",
"0.58147025",
"0.57799953",
"0.5775164",
"0.57709503",
"0.57209134",
"0.57184684",
"0.57043725",
"0.5691644",
"0.5673127",
"0.56611854",
"0.5610289",
"0.55946076",
"0.5573036",
"0.554843",
"0.55325496",
"0.5527597",
"0.5527577",
"0.5524188",
"0.54766375",
"0.5465573",
"0.54382247",
"0.54375124",
"0.5401106",
"0.53997576",
"0.5399596",
"0.5399518",
"0.5392495",
"0.5383451",
"0.5369645",
"0.5342974",
"0.53300726",
"0.5322987",
"0.5322987",
"0.53203994",
"0.5315973",
"0.5292848",
"0.5283839",
"0.5276843",
"0.5276843",
"0.5276843",
"0.5276843",
"0.5276843",
"0.5276843",
"0.5276843",
"0.52748305",
"0.5271459",
"0.5270531",
"0.5269636",
"0.5262864",
"0.5253177",
"0.52479726",
"0.52455586",
"0.5243411",
"0.5240042",
"0.5236573",
"0.5235376",
"0.5233888",
"0.5213062",
"0.5213062",
"0.5190445",
"0.5186994",
"0.51850146",
"0.5172769",
"0.51658696",
"0.5159672",
"0.51389325",
"0.51376295",
"0.51347643",
"0.51325953",
"0.51314205",
"0.5129131",
"0.5127183",
"0.5121784",
"0.51110846",
"0.51050204",
"0.51046777",
"0.5104068",
"0.510202",
"0.5074676",
"0.5072279",
"0.5072192",
"0.5069094",
"0.50505143",
"0.50464743",
"0.50401086",
"0.50350267",
"0.50336885",
"0.50227475",
"0.5016271",
"0.50102854"
] | 0.8636062 | 0 |
Gets the private 'annotation_reader' shared service. | protected function getAnnotationReaderService()
{
return $this->services['annotation_reader'] = new \Doctrine\Common\Annotations\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, ${($_ = isset($this->services['annotations.cache']) ? $this->services['annotations.cache'] : $this->load('getAnnotations_CacheService.php')) && false ?: '_'}, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, new \\Symfony\\Component\\Cache\\DoctrineProvider(\\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create((__DIR__.'/annotations.php'), ${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'})), false);\n }",
"protected function getAnnotations_ReaderService()\n {\n return $this->services['annotations.reader'] = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n }",
"protected function getAnnotations_ReaderService()\n {\n $this->services['annotations.reader'] = $instance = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n\n $a = new \\Doctrine\\Common\\Annotations\\AnnotationRegistry();\n $a->registerUniqueLoader('class_exists');\n\n $instance->addGlobalIgnoredName('required', $a);\n\n return $instance;\n }",
"protected function getReader()\n\t{\n\t\twith($reader = new SimpleAnnotationReader)\n\t\t\t\t->addNamespace('Adamgoose\\Events\\Annotations\\Annotations');\n\n\t\treturn $reader;\n\t}",
"private static function getReader()\n {\n return new IndexedReader(new AnnotationReader());\n// return new CachedReader(\n// new IndexedReader(new AnnotationReader()),\n// Cache::instance(__CLASS__),\n// false\n// );\n }",
"public static function reader()\n {\n if (!self::$reader) {\n self::$reader = new AnnotationReader();\n self::$reader = new IndexedReader(new CachedReader(\n self::$reader,\n self::getCacheProvider()\n ));\n }\n\n return self::$reader;\n }",
"protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('o2NSV3WKIW', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function annotations()\n {\n if (! $this->annotations) {\n $this->annotations = new AnnotationReader($this);\n }\n\n return $this->annotations;\n }",
"public function getAnnotation() {}",
"protected static function getFacadeAccessor()\n {\n return AnnotationsReader::class;\n }",
"public function getDirectValueAnnotationsManager(): Annotations\\IDirectValueAnnotationsManager\n {\n return $this->annotationsManager;\n }",
"public static function getRegisteredAnnotations()\n {\n return self::$annotations;\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"public function getAnnotation($key)\n {\n return $this->annotations[$key];\n }",
"public function getAnnotations() {}",
"public function getAnnotationDictionary() {}",
"public function getAnnotations()\n {\n return $this->_annotations;\n }",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"function getService() {\n return $this->service;\n }",
"public static function get(\\SetaPDF_Core_Reader_ReaderInterface $reader) {}",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService() {\n return $this->service;\n }",
"public function getAnnotation(string $annotationClass);",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"public function getReflectionService() {}",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"protected function getPropertyAccessorService()\n {\n return $this->services['property_accessor'] = new \\Symfony\\Component\\PropertyAccess\\PropertyAccessor(false, false, \\Symfony\\Component\\PropertyAccess\\PropertyAccessor::createCache('jeA6qXDMb6', NULL, 'MYfBg2oUlptyQ7C3Ob4WQe', $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE)));\n }",
"public function createDefaultAnnotationManager()\n {\n $annotationManager = new AnnotationManager;\n $parser = new GenericAnnotationParser();\n $parser->registerAnnotation(new Annotation\\Inject());\n $annotationManager->attach($parser);\n\n return $annotationManager;\n }",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"protected function getVictoireBusinessEntity_CacheReaderService()\n {\n return $this->services['victoire_business_entity.cache_reader'] = new \\Victoire\\Bundle\\BusinessEntityBundle\\Reader\\BusinessEntityCacheReader($this->get('victoire_core.cache'), $this->get('victoire_widget.widget_helper'), $this->get('victoire_business_entity.annotation_driver'));\n }",
"protected function getSecurityManager() {\n return $this->dependencyInjector->get('ride\\\\library\\\\security\\\\SecurityManager');\n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getReader()\n {\n if (!$this->_reader) {\n $class = get_class($this);\n $class = preg_match('/^Proxies/', $class) ? substr($class, 15) : $class;\n $this->_reader = new Reader($class);\n }\n\n return $this->_reader;\n }",
"protected function getMetadataDriverImplementation()\n {\n return new AnnotationDriver(\n $_ENV['annotation_reader'],\n __DIR__.'/../Fixture/Document'\n );\n }",
"public function service()\n {\n return $this->service;\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function getShared(string $classIdentifier);",
"private function getServicePostLike()\n {\n return $this->container->get('app_service_post_like');\n }",
"public function annotation(string $annotation)\n {\n return $this->annotated_method ? $this->annotated_method->annotation($annotation) : null ;\n }",
"protected function getVictoireBusinessEntity_AnnotationDriverService()\n {\n return $this->services['victoire_business_entity.annotation_driver'] = new \\Victoire\\Bundle\\BusinessEntityBundle\\Annotation\\AnnotationDriver($this->get('annotation_reader'), $this->get('event_dispatcher'), $this->get('victoire_widget.widget_helper'), array(0 => ($this->targetDirs[3].'/app/../src'), 1 => ($this->targetDirs[3].'/app/../vendor/victoire'), 2 => ($this->targetDirs[3].'/app/../vendor/friendsofvictoire')), $this->get('logger'));\n }",
"public function service() {\n return $this->service;\n }",
"protected function _getInjector()\n {\n if ($this->_defaultInjector === null) {\n // The XML holds an option which one of the injectors is the default one\n $injectorName = $this->_reader->getOption('injector', 'Sweetie\\Injector\\Magic');\n\n // @todo check type\n $this->_defaultInjector = new $injectorName($this);\n }\n\n return $this->_defaultInjector;\n }",
"public function getService()\n {\n if (!$this->service) {\n /** @var \\OAuth\\ServiceFactory $serviceFactory */\n $serviceFactory = $this->app->make('oauth/factory/service');\n $this->service = $this->factory->createService($serviceFactory);\n }\n\n return $this->service;\n }",
"public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"public function getServiceLocator() \r\n { \r\n return $this->serviceLocator; \r\n }",
"public function getAnnotation($name)\n\t{\n\t\t$res = ComponentReflection::parseAnnotation($this, $name);\n\t\treturn $res ? end($res) : null;\n\t}",
"public function getAnnotations()\n {\n // Also provide the path to the commandfile that these annotations\n // were pulled from and the classname of that file.\n $path = $this->reflection->getFileName();\n $className = $this->reflection->getDeclaringClass()->getName();\n return new AnnotationData(\n $this->getRawAnnotations()->getArrayCopy() +\n [\n 'command' => $this->getName(),\n '_path' => $path,\n '_classname' => $className,\n ]\n );\n }",
"public function getAnnotationName()\n {\n return $this->annotationName;\n }",
"public function getAnnotation($name)\n\t{\n\t\treturn null;\n\t}",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }",
"public function getServiceLocator()\r\n {\r\n return $this->serviceLocator;\r\n }",
"public function getServiceLocator ()\n {\n return $this->serviceLocator;\n }",
"public function getRentalsService()\n {\n return $this->rentalsService;\n }",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"public function getSharedManager();",
"protected function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function GetNativeReader() {\n\t\treturn $this->nativeReader;\n\t}",
"public function getReader()\n\t{\n\t\treturn static::$reader;\n\t}",
"function getMethodAnnotation(\\ReflectionMethod $method, $annotationName);",
"public function getService()\n {\n return null;\n }",
"public static function getReaderManager()\n {\n if (static::$readers === null) {\n static::$readers = new ReaderManager();\n }\n return static::$readers;\n }",
"abstract protected function getService();",
"protected function getJmsSerializer_AccessorStrategyService()\n {\n return $this->services['jms_serializer.accessor_strategy'] = new \\JMS\\Serializer\\Accessor\\ExpressionAccessorStrategy($this->get('jms_serializer.expression_evaluator'), new \\JMS\\Serializer\\Accessor\\DefaultAccessorStrategy());\n }",
"function getClassAnnotation(\\ReflectionClass $class, $annotationName);",
"function getMethodAnnotations(\\ReflectionMethod $method);",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public static function getInstance()\n {\n\t\tif (self::$instance == null) {\n\t\t\tself::$instance = new ServiceProvider();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"public function getAnnotation(): ?string;",
"public function getAnnotation(): ?string;"
] | [
"0.78386486",
"0.7793118",
"0.75140715",
"0.6867563",
"0.6572512",
"0.64137864",
"0.6359297",
"0.62259763",
"0.6131553",
"0.5929245",
"0.5681704",
"0.5652193",
"0.558437",
"0.5562851",
"0.5559268",
"0.5553822",
"0.5501414",
"0.54617417",
"0.5460059",
"0.5460059",
"0.5460035",
"0.5460035",
"0.5460035",
"0.5460035",
"0.5460035",
"0.5460035",
"0.5460035",
"0.5460035",
"0.54369104",
"0.54355705",
"0.54023695",
"0.54023695",
"0.54023695",
"0.54023695",
"0.54023695",
"0.54023695",
"0.54023695",
"0.53791004",
"0.53652483",
"0.53579557",
"0.5340954",
"0.5339624",
"0.53168845",
"0.52869695",
"0.5256675",
"0.52142406",
"0.5205276",
"0.5183544",
"0.518284",
"0.518284",
"0.5178018",
"0.51760334",
"0.51754326",
"0.5160427",
"0.5141351",
"0.5129777",
"0.5124281",
"0.5116483",
"0.5111149",
"0.5096991",
"0.50924414",
"0.5077481",
"0.5062261",
"0.50484216",
"0.5018002",
"0.50164676",
"0.50094324",
"0.4982109",
"0.4980827",
"0.4979483",
"0.49794078",
"0.4978857",
"0.4978316",
"0.4969549",
"0.4963458",
"0.49615562",
"0.49525976",
"0.4928423",
"0.49255016",
"0.4924733",
"0.49098292",
"0.4908727",
"0.49055034",
"0.49047476",
"0.4896866",
"0.4896866",
"0.4896866",
"0.4896866",
"0.4896866",
"0.4896866",
"0.4896866",
"0.48967776",
"0.48967776",
"0.48967776",
"0.48967776",
"0.48967776",
"0.48967776",
"0.4895641",
"0.48922813",
"0.48922813"
] | 0.7894564 | 0 |
Gets the private 'annotations.reader' shared service. | protected function getAnnotations_ReaderService()
{
$this->services['annotations.reader'] = $instance = new \Doctrine\Common\Annotations\AnnotationReader();
$a = new \Doctrine\Common\Annotations\AnnotationRegistry();
$a->registerUniqueLoader('class_exists');
$instance->addGlobalIgnoredName('required', $a);
return $instance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, ${($_ = isset($this->services['annotations.cache']) ? $this->services['annotations.cache'] : $this->load('getAnnotations_CacheService.php')) && false ?: '_'}, true);\n }",
"protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, new \\Symfony\\Component\\Cache\\DoctrineProvider(\\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create((__DIR__.'/annotations.php'), ${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'})), false);\n }",
"protected function getAnnotations_ReaderService()\n {\n return $this->services['annotations.reader'] = new \\Doctrine\\Common\\Annotations\\AnnotationReader();\n }",
"protected function getReader()\n\t{\n\t\twith($reader = new SimpleAnnotationReader)\n\t\t\t\t->addNamespace('Adamgoose\\Events\\Annotations\\Annotations');\n\n\t\treturn $reader;\n\t}",
"private static function getReader()\n {\n return new IndexedReader(new AnnotationReader());\n// return new CachedReader(\n// new IndexedReader(new AnnotationReader()),\n// Cache::instance(__CLASS__),\n// false\n// );\n }",
"public static function reader()\n {\n if (!self::$reader) {\n self::$reader = new AnnotationReader();\n self::$reader = new IndexedReader(new CachedReader(\n self::$reader,\n self::getCacheProvider()\n ));\n }\n\n return self::$reader;\n }",
"protected function annotations()\n {\n if (! $this->annotations) {\n $this->annotations = new AnnotationReader($this);\n }\n\n return $this->annotations;\n }",
"protected static function getFacadeAccessor()\n {\n return AnnotationsReader::class;\n }",
"protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('o2NSV3WKIW', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function get(\\SetaPDF_Core_Reader_ReaderInterface $reader) {}",
"public function getReader()\n {\n if (!$this->_reader) {\n $class = get_class($this);\n $class = preg_match('/^Proxies/', $class) ? substr($class, 15) : $class;\n $this->_reader = new Reader($class);\n }\n\n return $this->_reader;\n }",
"public function getReader()\n\t{\n\t\treturn static::$reader;\n\t}",
"public static function getReaderManager()\n {\n if (static::$readers === null) {\n static::$readers = new ReaderManager();\n }\n return static::$readers;\n }",
"public function getReaderFactory()\n {\n return $this->readerFactory;\n }",
"public function getReader() {}",
"public function getReader() {}",
"public function getReader() {}",
"public function getReader() {}",
"public function getReader() {}",
"public function getReader() {}",
"public function getReader() {}",
"protected function reader()\n {\n if ($this->_reader === null) {\n $this->_reader = Reader::createFromDefaults();\n }\n\n return $this->_reader;\n }",
"public function getAnnotation() {}",
"public static function getRegisteredAnnotations()\n {\n return self::$annotations;\n }",
"protected function getVictoireBusinessEntity_CacheReaderService()\n {\n return $this->services['victoire_business_entity.cache_reader'] = new \\Victoire\\Bundle\\BusinessEntityBundle\\Reader\\BusinessEntityCacheReader($this->get('victoire_core.cache'), $this->get('victoire_widget.widget_helper'), $this->get('victoire_business_entity.annotation_driver'));\n }",
"public function GetNativeReader() {\n\t\treturn $this->nativeReader;\n\t}",
"public function getDirectValueAnnotationsManager(): Annotations\\IDirectValueAnnotationsManager\n {\n return $this->annotationsManager;\n }",
"public function getReader();",
"public function getReader();",
"public function getAnnotations() {}",
"protected function getWorkingReader()\n {\n static $reader;\n\n // Reader aready created\n if ($reader)\n {\n return $reader;\n }\n\n // The path to the data source\n $file_path = realpath(__DIR__.'/logs/assettocorsa/offline_quick_race_session.json');\n\n // Get the data reader for the given data source\n $reader = Data_Reader::factory($file_path);\n\n // Return reader\n return $reader;\n }",
"public function getAnnotation($key)\n {\n return $this->annotations[$key];\n }",
"public function getAnnotations()\n {\n return $this->_annotations;\n }",
"public function markRead(): MarkReadService\n {\n /** @var MarkReadService $service */\n $service = app(MarkReadService::class);\n\n return $service->setConversationId($this->getConversationId());\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"public function getAnnotations()\n {\n return $this->annotations;\n }",
"protected static function getFacadeAccessor() : string {\n return 'log-reader';\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"protected function getPropertyAccessorService()\n {\n return $this->services['property_accessor'] = new \\Symfony\\Component\\PropertyAccess\\PropertyAccessor(false, false, \\Symfony\\Component\\PropertyAccess\\PropertyAccessor::createCache('jeA6qXDMb6', NULL, 'MYfBg2oUlptyQ7C3Ob4WQe', $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE)));\n }",
"public function getShared(string $classIdentifier);",
"public function getAnnotationDictionary() {}",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->_service;\n }",
"static function getReader($file)\n {\n $readerClass = Mp3Indexer_ReaderImplFactory::$READER_CLASSNAME;\n return new $readerClass($file);\n }",
"public function getReflectionService() {}",
"public function getAccessor()\n {\n return $this->accessor;\n }",
"function getService() {\n return $this->service;\n }",
"public function setAnnotationReader($reader)\n {\n $this->wrapped->setAnnotationReader($reader);\n }",
"protected function getReferencer()\n {\n return $this->referencer;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function setReader(Reader $reader);",
"public function getService() {\n return $this->service;\n }",
"public function isBotReader()\n {\n return $this->is_bot_reader;\n }",
"public function getAnnotation(string $annotationClass);",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"public static function getShared()\r\n\t{\r\n\t\treturn self::$shared;\r\n\t}",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"public function getReadConnectionService() {}",
"public function getAnnotation($name)\n\t{\n\t\t$res = ComponentReflection::parseAnnotation($this, $name);\n\t\treturn $res ? end($res) : null;\n\t}",
"function getMetaDataReader() {\n\t\tif(!$this->metaDataReader) {\n\t\t\t$source = $this->getElement(\"data\");\n\t\t\tif(file_exists($source)) {\n\t\t\t\t$this->metaDataReader = new weMetaData($source);\n\t\t\t}\n\t\t}\n\t\treturn $this->metaDataReader;\n\t}",
"public function read()\r\n {\r\n return $this->getNamespace()->{$this->getMember()};\r\n }",
"protected function getRepository()\n {\n return $this->tokens;\n }",
"protected function getRepository()\n {\n return $this->tokens;\n }",
"protected function getMetadataDriverImplementation()\n {\n return new AnnotationDriver(\n $_ENV['annotation_reader'],\n __DIR__.'/../Fixture/Document'\n );\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"protected function getSecurityManager() {\n return $this->dependencyInjector->get('ride\\\\library\\\\security\\\\SecurityManager');\n }",
"public function getAnnotations()\n {\n // Also provide the path to the commandfile that these annotations\n // were pulled from and the classname of that file.\n $path = $this->reflection->getFileName();\n $className = $this->reflection->getDeclaringClass()->getName();\n return new AnnotationData(\n $this->getRawAnnotations()->getArrayCopy() +\n [\n 'command' => $this->getName(),\n '_path' => $path,\n '_classname' => $className,\n ]\n );\n }",
"function getMethodAnnotations(\\ReflectionMethod $method);",
"private function getRessourceService()\n {\n if (!$this->ressourceService) {\n $this->ressourceService = $this->getServiceManager()->get('playgroundcms_ressource_service');\n }\n\n return $this->ressourceService;\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }",
"public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }",
"public function getAnnotation($name)\n {\n // hasAnnotation parses the docblock\n if (!$this->hasAnnotation($name)) {\n return null;\n }\n return $this->otherAnnotations->get($name);\n }",
"public function getServiceLocator() \r\n { \r\n return $this->serviceLocator; \r\n }",
"public function getRawAnnotations()\n {\n $this->parseDocBlock();\n return $this->otherAnnotations;\n }",
"protected function _getInjector()\n {\n if ($this->_defaultInjector === null) {\n // The XML holds an option which one of the injectors is the default one\n $injectorName = $this->_reader->getOption('injector', 'Sweetie\\Injector\\Magic');\n\n // @todo check type\n $this->_defaultInjector = new $injectorName($this);\n }\n\n return $this->_defaultInjector;\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function getReadConnectionService(): string;",
"public function service()\n {\n return $this->service;\n }",
"public static function bootstrap(Reader $reader)\n {\n self::registerDefaultScopes();\n\n // @todo allow multiple bootstrap calls to change configuration?\n if (static::$_instance === null) {\n static::$_instance = new self($reader);\n }\n\n return static::$_instance;\n }",
"public function getRentalsService()\n {\n return $this->rentalsService;\n }",
"public function getReadIterator(): ReadIterator\n {\n return $this->readIterator;\n }",
"private function loader()\n {\n return new ServiceDescriptionLoader();\n }"
] | [
"0.8015223",
"0.7964286",
"0.7922955",
"0.72738236",
"0.7099812",
"0.705272",
"0.6221672",
"0.61354625",
"0.61225814",
"0.6007353",
"0.600729",
"0.6004071",
"0.5830038",
"0.5638752",
"0.5625458",
"0.5625458",
"0.5625458",
"0.5625458",
"0.5625458",
"0.5625458",
"0.5625458",
"0.5614214",
"0.561163",
"0.5596709",
"0.55899453",
"0.55729467",
"0.545462",
"0.5388444",
"0.5388444",
"0.5322261",
"0.53060627",
"0.5284645",
"0.5244225",
"0.523109",
"0.52205807",
"0.52205807",
"0.52205807",
"0.52205807",
"0.52205807",
"0.52205807",
"0.52205807",
"0.52205807",
"0.50910556",
"0.5076252",
"0.50051576",
"0.50007415",
"0.4974567",
"0.49683487",
"0.49683487",
"0.4965046",
"0.49390164",
"0.493838",
"0.49324536",
"0.49223787",
"0.49182597",
"0.49134886",
"0.491242",
"0.491242",
"0.491242",
"0.491242",
"0.491242",
"0.491242",
"0.491242",
"0.48811632",
"0.48800766",
"0.48762205",
"0.4871755",
"0.48676798",
"0.48586336",
"0.48547977",
"0.48470998",
"0.48404092",
"0.48056975",
"0.47953126",
"0.47936553",
"0.47886005",
"0.47877324",
"0.47877324",
"0.47875178",
"0.47865754",
"0.47865212",
"0.47865212",
"0.4785762",
"0.47482836",
"0.47289062",
"0.47250882",
"0.4719684",
"0.47045994",
"0.47041604",
"0.4701182",
"0.46905226",
"0.46878275",
"0.4685953",
"0.46813405",
"0.46766573",
"0.46756724",
"0.46735665",
"0.46691555",
"0.46641114",
"0.46627635"
] | 0.7759862 | 3 |
Gets the private 'config_cache_factory' shared service. | protected function getConfigCacheFactoryService()
{
return $this->services['config_cache_factory'] = new \Symfony\Component\Config\ResourceCheckerConfigCacheFactory(new RewindableGenerator(function () {
yield 0 => ${($_ = isset($this->services['dependency_injection.config.container_parameters_resource_checker']) ? $this->services['dependency_injection.config.container_parameters_resource_checker'] : $this->services['dependency_injection.config.container_parameters_resource_checker'] = new \Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker($this)) && false ?: '_'};
yield 1 => ${($_ = isset($this->services['config.resource.self_checking_resource_checker']) ? $this->services['config.resource.self_checking_resource_checker'] : $this->services['config.resource.self_checking_resource_checker'] = new \Symfony\Component\Config\Resource\SelfCheckingResourceChecker()) && false ?: '_'};
}, 2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getConfigCacheFactoryService()\n {\n return $this->services['config_cache_factory'] = new \\Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory(array());\n }",
"protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\service(${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, './../', 'php');\n }",
"protected static function configFactory() {\n return \\Drupal::configFactory();\n }",
"public function getCacheConfig()\n {\n $config = null;\n if (file_exists($this->options['cache_path'])) {\n $content = @file_get_contents($this->options['cache_path']);\n $config = new Config($this->app, $content);\n }\n return $config;\n }",
"protected function getConfigService()\n {\n return $this->services['config'] = new \\phpbb\\config\\db(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, 'phpbb_config');\n }",
"protected function getCache_AppService()\n {\n $this->services['cache.app'] = $instance = new \\Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter('n5NzkKREKO', 0, (__DIR__.'/pools'));\n\n if ($this->has('monolog.logger.cache')) {\n $instance->setLogger($this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }\n\n return $instance;\n }",
"static public function getInstance()\n\t{\n\t\tif (empty(self::$_instance))\n\t\t\tself::$_instance = new CacheFileFactory();\n\t\t\n\t\treturn self::$_instance;\n\t}",
"protected function _initCache()\n {\n $this->bootstrap('Config');\n $appConfig = Zend_Registry::get('config');\n $cache = NULL;\n\n // only attempt to init the cache if turned on\n if ($appConfig->app->caching) {\n\n // get the cache settings\n $config = $appConfig->app->cache;\n\n if (NULL !== $this->_tmpFolder) {\n if ('File' == $config->backend->adapter && !isset($config->backend->options->cache_dir)) {\n $config->backend->options->cache_dir = $this->_tmpFolder . '/cache';\n if (!is_dir($config->backend->options->cache_dir)) {\n mkdir($config->backend->options->cache_dir);\n }\n }\n }\n\n try {\n $cache = Zend_Cache::factory(\n $config->frontend->adapter,\n $config->backend->adapter,\n $config->frontend->options->toArray(),\n $config->backend->options->toArray()\n );\n } catch (Zend_Cache_Exception $e) {\n // send email to alert caching failed\n Zend_Registry::get('log')->alert(\n 'Caching failed: adapter=' . $config->backend->adapter . ', message=' . $e->getMessage(\n ));\n }\n }\n Zend_Registry::set('cache', $cache);\n return $cache;\n }",
"protected static function getCacheManager() {}",
"protected function getCache_ValidatorService()\n {\n return $this->services['cache.validator'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('k0V7XpDK96', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"function _biurnal_conf_get_conf_cache($name) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_get('biurnal_conf', $name);\n if (!$cache) {\n $cache = biurnal_conf_load($name);\n if ($cache) {\n $cache->locked = ctools_object_cache_test('biurnal_conf', $name);\n }\n }\n\n return $cache;\n}",
"public function getDefaultCacheFactory(): ?Factory\n {\n return Cache::getFacadeRoot();\n }",
"public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }",
"protected function getCache_DriverService()\n {\n return $this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file();\n }",
"static function factory()\n {\n if (function_exists('apc_fetch')) {\n $class = new BaseZF_Framework_Cache_Apc();\n } else {\n $class = new BaseZF_Framework_Cache_Apc_Disable();\n }\n\n return $class;\n }",
"public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'AuthService' => function($sm) {\n // Make sure database is started.\n $sm->get('Model');\n \n $authService = new AuthenticationService();\n $adapter = new \\Swaggerdile\\Authentication\\Adapter\\Wordpress();\n\n $authService->setAdapter($adapter);\n\n // Get configuration\n $config = $sm->get('config');\n\n $authService->setStorage(new CookieBase(\n $config['cookiebase_short_secret'],\n $config['cookiebase_secret'],\n $config['cookiebase_name'],\n $config['cookiebase_timeout'],\n $config['cookiebase_domain']));\n\n return $authService;\n },\n\n 'IsAdult' => function($sm) {\n $request = $sm->get('Request');\n\n $cookie = $request->getCookie();\n return (is_object($cookie) &&\n $cookie->offsetExists('swaggerdile_opt_in') &&\n (int)$cookie->swaggerdile_opt_in);\n },\n\n 'Model' => function($sm) {\n $dbAdapter = $sm->get('\\Zend\\Db\\Adapter\\Adapter');\n \\Zend\\Db\\TableGateway\\Feature\\GlobalAdapterFeature::setStaticAdapter($dbAdapter);\n\n if($sm->get('IsAdult')) {\n \\Swaggerdile\\Model\\ModelTable::enableAdult();\n } else{\n \\Swaggerdile\\Model\\ModelTable::disableAdult();\n }\n\n return \\Swaggerdile\\Model\\Factory::getInstance();\n },\n\n 'Media' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Media( $config['media']['publicMediaBasePath'],\n $config['media']['privateMediaBasePath']);\n },\n\n 'Wordpress' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Wordpress( $config['wordpress_api_url'],\n $config['wordpress_api_key']);\n },\n\n 'Email' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Mail($config['mail']);\n },\n\n 'Crypto' => function($sm) {\n $config = $sm->get('config');\n return new \\Swaggerdile\\Crypto($config['crypto']);\n },\n\n 'Cache' => function($sm) {\n $config = $sm->get('config');\n\n if(array_key_exists('cloudflare_zone', $config)) {\n return new \\Swaggerdile\\Cache(\n $config['cloudflare_zone'],\n $config['cloudflare_user'],\n $config['cloudflare_key']);\n } else {\n return new \\Swaggerdile\\Cache('', '', '');\n }\n }, \n\n 'SDExceptionStrategy' => function($sm) {\n $strategy = new \\Swaggerdile\\Mvc\\View\\Http\\ExceptionStrategy();\n\n // @TODO : make this configurable\n $strategy->setDisplayExceptions(false);\n $strategy->setExceptionTemplate(\"error/index\");\n\n return $strategy;\n },\n\n 'SDRouteNotFoundStrategy' => function($sm) {\n $strategy = new \\Swaggerdile\\Mvc\\View\\Http\\RouteNotFoundStrategy();\n\n // @TODO : make this configurable\n $strategy->setDisplayExceptions(false);\n $strategy->setNotFoundTemplate(\"error/404\");\n\n return $strategy;\n },\n\n 'User' => function($sm) {\n $authAdapter = $sm->get('AuthService');\n\n if(!$authAdapter->hasIdentity()) {\n return false;\n }\n\n $id = $authAdapter->getIdentity();\n\n if(!is_object($id)) {\n $user = $sm->get('Model')\n ->get('User')\n ->fetchById($id);\n } else {\n $user = $sm->get('Model')\n ->get('User')\n ->fetchById($id->getId());\n }\n\n return $user === null ? false : $user; \n },\n\n 'Jira' => function($sm) {\n return new \\chobie\\Jira\\Api(\n TIGERDILE_JIRA_URL,\n new \\chobie\\Jira\\Api\\Authentication\\Basic(\n TIGERDILE_JIRA_USER,\n TIGERDILE_JIRA_PASSWORD\n )\n );\n },\n\n 'Chat' => function($sm) {\n return new \\Swaggerdile\\Chat();\n },\n ),\n );\n }",
"public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }",
"public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }",
"public static function getCacheProvider()\n {\n if (!self::$provider) {\n self::$provider = new ArrayCache();\n }\n\n return self::$provider;\n }",
"function cacheConfig() {\n\t\tif(!isset($this->_options['configCachePath'])) {\n\t\t\tthrow new PPI_Exception('Missing path to the config cache path');\n\t\t}\n\n\t\t$path = sprintf('%s%s.%s.cache',\n\t\t\t$this->_options['configCachePath'],\n\t\t\t$this->_options['configFile'],\n\t\t\t$this->_options['configBlock']);\n\n\t\tif(file_exists($path)) {\n\t\t\treturn unserialize(file_get_contents($path));\n\t\t}\n\t\t$config = $this->parseConfig();\n\t\tfile_put_contents($path, serialize($config));\n\t\treturn $config;\n\t}",
"public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}",
"public function getCacheFactory(): ?Factory\n {\n if (!$this->hasCacheFactory()) {\n $this->setCacheFactory($this->getDefaultCacheFactory());\n }\n return $this->cacheFactory;\n }",
"public static function getCache()\n\t{\n\t if (!self::$cache) {\n\t\t\t$frontendOptions = array('lifetime' => 604800, \n\t\t\t\t\t\t\t\t\t 'automatic_serialization' => true);\n\t\t\t$backendOptions = array('cache_dir' => APPLICATION_PATH . '/../data/cache');\n\t\t\tself::$cache \t = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);\n\t }\n\t\treturn self::$cache;\n\t}",
"public static function getInstance() {\n return self::getConfig();\n }",
"protected function getCache() {\n\t\t$factory = $this->policy('rate_factoryname');\n\t\t$lifetime = $this->policy('rate_lock_timeout') + 60; // As long as it's longer than the actual timeout\n\t\t$cache = SS_Cache::factory($factory);\n\t\t$cache->setOption('automatic_serialization', true);\n\t\t$cache->setOption('lifetime', $lifetime);\n\t\treturn $cache;\n\t}",
"protected function getCache_AnnotationsService()\n {\n return $this->services['cache.annotations'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('o2NSV3WKIW', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getCache_SystemService()\n {\n return $this->services['cache.system'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('oF4uGKF1Zr', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getCacheManager() {}",
"protected function getCacheManager() {}",
"function getCacheServices();",
"public static function getCacheManager()\n {\n return static::$cache;\n }",
"protected function _initCache() {\n\trequire_once 'Zend/Cache.php';\n\trequire_once 'Zend/Config/Ini.php';\n\n\t$this->bootstrap('ServerRegistry');\n\t$config = new Zend_Config_Ini(APPLICATION_CONFIG_PATH . '/cache.ini');\n\t$cache = Zend_Cache::factory($config->get('frontend'), $config->get('backend'), $config->get('frontendOption')->toArray(), $config->get('backendOption')->toArray(), TRUE, TRUE);\n\t$cache->cleanByRegistry();\n\tif (isset($_GET ['clear_cache']) && ('all' == $_GET ['clear_cache'])) {\n\t $cache->clean();\n\t}\n\n\treturn $cache;\n }",
"public static function getCache() {}",
"public function __invoke()\n {\n return new ConfigProvider(__DIR__ . '/../config/{{,*.}global,{,*.}local}.php');\n }",
"public function produce()\n {\n $cacheFactory = null;\n foreach($this->cacheFactories as $factory)\n {\n if(false === $factory instanceof CacheFactoryInterface) {\n throw new \\InvalidArgumentException(\"Array of Cache Factories must contain valid CacheFactory objects.\");\n }\n \n if($this->type == $factory->getType()) {\n $cacheFactory = $factory;\n break;\n }\n }\n \n if(null === $cacheFactory)\n {\n throw ConfigException::cacheFactoryNotFound($this->type);\n }\n \n $cache = $cacheFactory->newInstance($this->app);\n \n if(false === $cache instanceof CacheInterface) {\n throw new \\InvalidArgumentException(\"Cache factory must produce a valid CacheInterface object.\");\n }\n \n return $cache;\n }",
"protected function initCache()\n {\n $this->di->set('viewCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = new FrontOutput(['lifetime' => $config->get('viewCache')->lifetime]);\n\n $config = $config->get('viewCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('modelsCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('modelsCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('modelsCache')->lifetime]);\n\n $config = $config->get('modelsCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('dataCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('dataCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('dataCache')->lifetime]);\n\n $config = $config->get('dataCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n }",
"protected function getCache(): FrontendInterface\n {\n return GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_core');\n }",
"static public function getCache(){\n return static::$cache;\n }",
"public function getCache() {\n if( null === $this->_cache ) {\n $this->_cache = Zend_Cache::factory\n ( $this->_frontend\n , $this->_backend\n , $this->_frontendOptions\n , $this->_backendOptions\n );\n }\n return $this->_cache;\n }",
"public static function get($cacheName='_'){\n\t\tif(!isset(self::$_instances[$cacheName]))\n\t\t\tself::$_instances[$cacheName]=CCache::create(self::$_config[$cacheName]);\n\t\treturn self::$_instances[$cacheName];\n\t}",
"public function fromCache()\n {\n try {\n $cache = $this->cache->get('config');\n\n if ($cache === false) {\n $cache = array_merge($this->_defaults, $this->getFromDb());\n $this->cache->set('config', $cache);\n }\n\n return $cache;\n }\n catch (Exception $e) {\n Log::error($e->getMessage(), null, __METHOD__);\n }\n }",
"public static function getInstance()\n {\n if (!isset(self::$instance)) {\n switch (CACHE_TYPE) {\n case CacheType::apc:\n self::$cache = new APC();\n break;\n case CacheType::eaccelerator:\n self::$cache = new eAccelerator;\n break;\n case CacheType::xcache:\n self::$cache = new XCache;\n break;\n case CacheType::file:\n self::$cache = new File;\n break;\n\n case CacheType::none:\n default:\n self::$cache = new NoCache;\n break;\n }\n\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }",
"static public function getInstance ($base) {\n # Is the configuration file already in memory?\n if (isset (self::$_cache[$base])) {\n\n # Yes, the file has already been loaded\n $obj = self::$_cache[$base];\n\n } else {\n\n # No, load the file from disk and save it to cache\n $obj = new Config ($base);\n self::$_cache[$base] = $obj;\n\n }\n return $obj;\n }",
"private function getProxyFactoryConfiguration()\n {\n $configuration = new Configuration();\n\n if ($this->proxyCacheDirectory) {\n $this->ensureDirectoryExists($this->proxyCacheDirectory);\n $configuration->setProxiesTargetDir($this->proxyCacheDirectory);\n }\n\n return $configuration;\n }",
"public function getCache() {\n\t\treturn $this->get('Cundd\\\\Rest\\\\Cache\\\\Cache');\n\t}",
"public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }",
"public static function getConfigInstance()\n {\n if (!static::$config) {\n static::$config = new Config\\NativeConfig;\n }\n\n return static::$config;\n }",
"public static function getCache()\n {\n return self::$_cache;\n }",
"private function getCacheServer()\n {\n /**\n * The configuration options are encapsulated in a class called RedisOptions\n * Here we setup the server configuration using the values from our config file\n */\n $redis_options = new RedisOptions();\n $redis_options->setServer(array(\n 'host' => self::$__endpoint,\n 'port' => self::$__port,\n 'timeout' => self::$__timeout\n ));\n // /**\n // * This is not required, although it will allow to store anything that can be serialized by PHP in Redis\n // */\n // $redis_options->setLibOptions ( array (\n // Redis::OPT_SERIALIZER => Redis::SERIALIZER_PHP\n // ) );\n \n /**\n * We create the cache passing the RedisOptions instance we just created\n */\n $redis_cache = new Redis($redis_options);\n \n return $redis_cache;\n }",
"protected function getCache()\n {\n return $this->cache;\n }",
"protected function getCacheManager()\n {\n if (!$this->cacheManager) {\n $this->cacheManager = $this->getContainer()->get('fos_http_cache.cache_manager');\n }\n\n return $this->cacheManager;\n }",
"protected function getCron_Task_Core_TidyCacheService()\n {\n $this->services['cron.task.core.tidy_cache'] = $instance = new \\phpbb\\cron\\task\\core\\tidy_cache(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n\n $instance->set_name('cron.task.core.tidy_cache');\n\n return $instance;\n }",
"protected function getMonolog_Logger_CacheService()\n {\n $this->services['monolog.logger.cache'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('cache');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'dbAdapter' => function($sm) {\n $config = $sm->get('config');\n $config = $config['db'];\n $dbAdapter = new DbAdapter($config);\n return $dbAdapter;\n },\n 'Plans\\Model\\DatabaseSql' => function($sm) {\n $dbAdapter = $sm->get('dbAdapter');\n $tablePlan = new DatabaseSql($dbAdapter);\n return $tablePlan; \n }, \n ),\n );\n }",
"private function getCookieMetadataFactory()\n {\n if (!$this->cookieMetadataFactory) {\n $this->cookieMetadataFactory = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory::class\n );\n }\n return $this->cookieMetadataFactory;\n }",
"protected function getConfigHelper()\n {\n return $this->_configHelper;\n }",
"public static function getConfig()\n {\n return new Config(self::$config);\n }",
"public static function getConfig() {\n if (!self::$_configInstance)\n new acs_config();\n \n return self::$_configInstance;\n }",
"public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }",
"protected function _getCache()\n\t{\n\t\t/**\n\t\t * @todo needs to be adjusted for use with Zend_Cache_Manager\n\t\t */\n\t\treturn self::$_cache;\n\n\t}",
"protected function getCaptcha_FactoryService()\n {\n return $this->services['captcha.factory'] = new \\phpbb\\captcha\\factory($this, ${($_ = isset($this->services['captcha.plugins.service_collection']) ? $this->services['captcha.plugins.service_collection'] : $this->getCaptcha_Plugins_ServiceCollectionService()) && false ?: '_'});\n }",
"protected function configureCaching() {\n $_CONFIG = array();\n\n require_once ASCMS_CORE_MODULE_PATH . '/Cache/Controller/CacheLib.class.php';\n\n $isInstalled = function($cacheEngine) {\n switch ($cacheEngine) {\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC:\n return extension_loaded('apc');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE:\n return extension_loaded('opcache') || extension_loaded('Zend OPcache');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE:\n return extension_loaded('memcache') || extension_loaded('memcached');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE:\n return extension_loaded('xcache');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM:\n return true;\n }\n };\n\n $isConfigured = function($cacheEngine, $user = false) {\n switch ($cacheEngine) {\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC:\n if ($user) {\n return ini_get('apc.serializer') == 'php';\n }\n return true;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE:\n return ini_get('opcache.save_comments') && ini_get('opcache.load_comments');\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE:\n return false;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE:\n if ($user) {\n return (\n ini_get('xcache.var_size') > 0 &&\n ini_get('xcache.admin.user') &&\n ini_get('xcache.admin.pass')\n );\n }\n return ini_get('xcache.size') > 0;\n case \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM:\n return is_writable(ASCMS_DOCUMENT_ROOT . '/tmp/cache');\n }\n };\n\n // configure opcaches\n $configureOPCache = function() use($isInstalled, $isConfigured, &$_CONFIG) {\n // APC\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC) && $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC)) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC;\n return;\n }\n\n // Disable zend opcache if it is enabled\n // If save_comments is set to TRUE, doctrine2 will not work properly.\n // It is not possible to set a new value for this directive with php.\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE)) {\n ini_set('opcache.save_comments', 1);\n ini_set('opcache.load_comments', 1);\n ini_set('opcache.enable', 1);\n\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE)) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_ZEND_OPCACHE;\n return;\n }\n }\n\n // XCache\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE) &&\n $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE)\n ) {\n $_CONFIG['cacheOPCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE;\n return;\n }\n return false;\n };\n\n // configure user caches\n $configureUserCache = function() use($isInstalled, $isConfigured, &$_CONFIG) {\n // APC\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC)) {\n // have to use serializer \"php\", not \"default\" due to doctrine2 gedmo tree repository\n ini_set('apc.serializer', 'php');\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC, true)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_APC;\n return;\n }\n }\n\n // Memcache\n if ($isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE) && $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_MEMCACHE;\n return;\n }\n\n // XCache\n if (\n $isInstalled(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE) &&\n $isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE, true)\n ) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_XCACHE;\n return;\n }\n\n // Filesystem\n if ($isConfigured(\\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM)) {\n $_CONFIG['cacheUserCache'] = \\Cx\\Core_Modules\\Cache\\Controller\\CacheLib::CACHE_ENGINE_FILESYSTEM;\n return;\n }\n return false;\n };\n\n if ($configureOPCache() === false) {\n $_CONFIG['cacheOpStatus'] = 'off';\n } else {\n $_CONFIG['cacheOpStatus'] = 'on';\n }\n\n if ($configureUserCache() === false) {\n $_CONFIG['cacheDbStatus'] = 'off';\n } else {\n $_CONFIG['cacheDbStatus'] = 'on';\n }\n\n $objDb = $this->_getDbObject($statusMsg);\n foreach ($_CONFIG as $key => $value) {\n $objDb->Execute(\"UPDATE `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings` SET `setvalue` = '\".$value.\"' WHERE `setname` = '\".$key.\"'\");\n }\n }",
"protected function _getCache()\n {\n if (!isset($this->_configuration)) {\n $this->_configuration = \\Yana\\Db\\Binaries\\ConfigurationSingleton::getInstance();\n }\n return $this->_configuration->getFileNameCache();\n }",
"protected function getCache_DefaultClearerService()\n {\n $this->services['cache.default_clearer'] = $instance = new \\Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer();\n\n $instance->addPool($this->get('cache.app'));\n $instance->addPool($this->get('cache.system'));\n $instance->addPool(${($_ = isset($this->services['cache.validator']) ? $this->services['cache.validator'] : $this->getCache_ValidatorService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.serializer']) ? $this->services['cache.serializer'] : $this->getCache_SerializerService()) && false ?: '_'});\n $instance->addPool(${($_ = isset($this->services['cache.annotations']) ? $this->services['cache.annotations'] : $this->getCache_AnnotationsService()) && false ?: '_'});\n\n return $instance;\n }",
"public function getCache()\n {\n return Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache( 'frontcore' );\n }",
"public function getConfigService();",
"static public function getInstance()\n\t{\n\t\tif (self::$_instance == null)\n\t\t\tself::$_instance = new Ivc_Cache;\n\t\treturn (self::$_instance);\n\t}",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getCache()\n {\n return $this->cache;\n }",
"public function getConfigClass() {\n return CachingDatasourceConfig::class;\n }",
"public function getCache()\n {\n return $this->_cache;\n }",
"protected function getLiipImagine_Cache_ManagerService()\n {\n $this->services['liip_imagine.cache.manager'] = $instance = new \\Liip\\ImagineBundle\\Imagine\\Cache\\CacheManager($this->get('liip_imagine.filter.configuration'), $this->get('router'), $this->get('liip_imagine.cache.signer'), $this->get('event_dispatcher'), 'default');\n\n $instance->addResolver('default', $this->get('liip_imagine.cache.resolver.default'));\n $instance->addResolver('no_cache', $this->get('liip_imagine.cache.resolver.no_cache_web_path'));\n\n return $instance;\n }",
"public function getCacheId()\n {\n return 'wsdl_config_global_' . md5($this->getServiceUrl('*/*/*'));\n }",
"public function getCache()\n {\n return $this->get('cache', false);\n }",
"function getConfig() {\n\t\tif($this->_oConfig === null) {\n\t\t\tif(isset($this->_options['cacheConfig']) && $this->_options['cacheConfig']) {\n\t\t\t\t$this->_oConfig = $this->cacheConfig();\n\t\t\t} else {\n\t\t\t\t$this->_oConfig = $this->parseConfig();\n\t\t\t}\n\t\t}\n\t\treturn $this->_oConfig;\n\t}",
"protected function getCache_SerializerService()\n {\n return $this->services['cache.serializer'] = \\Symfony\\Component\\Cache\\Adapter\\AbstractAdapter::createSystemCache('+si9XZUmcI', 0, 'MYfBg2oUlptyQ7C3Ob4WQe', (__DIR__.'/pools'), $this->get('monolog.logger.cache', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function getInstance(): Config\n {\n return self::$config;\n }",
"protected static function getFacadeAccessor() { return 'cache'; }",
"public function getServiceConfig()\n {\n \treturn array(\n\t\t\t'factories' => array(\n\t\t\t\t\t\n\t\t\t\t//models\n\t\t\t\t'Api\\Model\\Key' => function($sm) {\n\t\t\t\t\t$hash = $sm->get('Application\\Model\\Hash');\n\t\t\t\t\t$user = $sm->get('Api\\Model\\Users');\n\t\t\t\t\treturn new Key($hash, $user);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Projects' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Projects($adapter, $db);\n\t\t\t\t}, \n\t\t\t\t'Api\\Model\\Tasks' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Tasks($adapter, $db);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Users' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\t$role = $sm->get('Api\\Model\\Roles');\n\t\t\t\t\t$ud = $sm->get('Application\\Model\\User\\Data');\n\t\t\t\t\treturn new Users($adapter, $db, $role, $ud);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Companies' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Companies($adapter, $db);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Options' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\treturn new Options($adapter, $db);\n\t\t\t\t},\t \n\t\t\t\t'Api\\Model\\Roles' => function($sm) {\n\t\t\t\t\t$adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n\t\t\t\t\t$db = $sm->get('SqlObject');\n\t\t\t\t\t$permission = $sm->get('Application\\Model\\Permissions');\n\t\t\t\t\treturn new Roles($adapter, $db, $permission);\n\t\t\t\t},\n\n\t\t\t\t//events\n\t\t\t\t'Api\\Event\\UserDataEvent' => function($sm) {\n\t\t\t\t\treturn new UserDataEvent(); \n\t\t\t\t},\n\t\t\t\t'Api\\Event\\ViewEvent' => function($sm) {\n\t\t\t\t\t$auth = $sm->get('AuthService');\n\t\t\t\t\t$user = $sm->get('Api\\Model\\Users');\n\t\t\t\t\t\n\t\t\t\t\treturn new ViewEvent($auth->getIdentity(), $user); \n\t\t\t\t},\n\t\t\t),\n \t);\n }",
"public function getCache()\n {\n return $this->Cache;\n }",
"public function getCache();",
"protected function load_cache(){\r\n\t\tstatic $cached = null;\r\n\t\t\r\n\t\tif(!$cached){\r\n\t\t\t\r\n\t\t\tif($this->_cfg->get('sfversion') == 'auto'){\r\n\t\t\t\t// get version from sourceforge/cache\r\n\t\t\t\tif (!$this->is_cached()) $this->update_cache();\r\n\t\t\t\t$cached = (object)include($this->get_cache());\r\n\t\t\t}else{\r\n\t\t\t\t// use predefined version from config\r\n\t\t\t\t$cached = (object)$this->_cfg->get('sfversion');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $cached;\r\n\t}",
"public static function getCache()\n\t{\n\t\tif (null === self::$_cache) {\n\t\t\tself::setCache(Zend_Cache::factory(\n\t\t\t\tnew Core_Cache_Frontend_Runtime(),\n\t\t\t\tnew Core_Cache_Backend_Runtime()\n\t\t\t));\n\t\t}\n\t\n\t\treturn self::$_cache;\n\t}",
"public function getServiceConfig() {\n return array(\n 'aliases' => array(\n 'Zend\\Authentication\\AuthenticationService' => 'dao.authentication.service'\n ),\n 'factories' => array(\n 'dao.authentication.simple' => new SimpleAuthService(),\n 'dao.authentication.god' => new GodAuthService(),\n 'dao.authentication.service' => new AuthenticationService()\n )\n );\n }",
"public function getCache()\n\t{\n\t\treturn $this->cache;\n\t}",
"public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'Newsletter\\Model\\AdminConfigTable' => function($sm) {\n $tableGateway = $sm->get('AdminConfigTableGateway');\n $table = new AdminConfigTable($tableGateway);\n return $table;\n\t\t\t\t },\n\t\t\t\t 'AdminConfigTableGateway' => function ($sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Config());\n return new TableGateway('admin_config', $dbAdapter, null, $resultSetPrototype);\n\t\t\t\t },\n\t\t\t\t 'Newsletter\\Model\\EmailsubscriptionTable' => function($sm) {\n $tableGateway = $sm->get('EmailsubscriptionTableGateway');\n $table = new EmailsubscriptionTable($tableGateway);\n return $table;\n\t\t\t\t },\n\t\t\t\t 'EmailsubscriptionTableGateway' => function ($sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Emailsubscription());\n return new TableGateway('email_subscription', $dbAdapter, null, $resultSetPrototype);\n\t\t\t\t },\n\t\t\t ),\n\t\t\t);\n\t\t }",
"public static function i(): ServicesFactory\n {\n return parent::getInstance();\n }",
"public static function getCache() {\n\t\treturn null;\n\t}",
"protected function getDi()\n {\n $di = new Di;\n\n $di->set('viewCache', function () {\n return new File(new Output(['lifetime' => 2]), ['cacheDir' => cacheFolder()]);\n });\n\n return $di;\n }",
"public function getCache(): Cache\n {\n return $this->cache;\n }",
"function getCache() {\n return $this->cache;\n }",
"static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}",
"public function getCacheClient()\n {\n if ($this->cacheClient) {\n return $this->cacheClient;\n }\n\n return $this->cacheClient = new CacheClient($this->cacheConnectionDsn);\n }",
"protected function get_cache_engine() {\n\n if ($this->caching && !$this->cache) {\n $rcube = rcube::get_instance();\n $ttl = $rcube->config->get('dbmail_cache_ttl', '10d');\n $this->cache = $rcube->get_cache('DBMAIL', $this->caching, $ttl);\n }\n\n return $this->cache;\n }",
"static public function getInstance()\r\n\t{\r\n\t\tif (!isset(self::$instance))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"The configuration has not been set. \".\r\n\t\t\t\t\"Please call useConfig before any calls to getInstance()\");\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}"
] | [
"0.85419357",
"0.7490239",
"0.69463694",
"0.6896996",
"0.6809103",
"0.66566825",
"0.6515313",
"0.6390726",
"0.6376414",
"0.63504124",
"0.63116676",
"0.6310457",
"0.62856317",
"0.6273551",
"0.6257921",
"0.6257274",
"0.6251199",
"0.6251199",
"0.62475675",
"0.62276244",
"0.6211742",
"0.620726",
"0.6198504",
"0.6190014",
"0.6181773",
"0.6180085",
"0.6177892",
"0.6162036",
"0.6161027",
"0.6158324",
"0.6135952",
"0.6114875",
"0.6067709",
"0.6062647",
"0.6054747",
"0.6051774",
"0.6042358",
"0.60405815",
"0.60392165",
"0.6025819",
"0.6014825",
"0.60148245",
"0.60117173",
"0.60100394",
"0.5999446",
"0.5994933",
"0.5983665",
"0.5982387",
"0.5982317",
"0.5981389",
"0.59724206",
"0.59531933",
"0.5938657",
"0.59299976",
"0.59289265",
"0.5926375",
"0.58999157",
"0.58909416",
"0.58878183",
"0.58835155",
"0.58714265",
"0.586936",
"0.58568937",
"0.5856752",
"0.585636",
"0.58550227",
"0.58532846",
"0.5852859",
"0.5852859",
"0.5852859",
"0.5852859",
"0.5852859",
"0.5852859",
"0.5852859",
"0.5851437",
"0.5848911",
"0.584608",
"0.5844232",
"0.5843593",
"0.58430755",
"0.5835631",
"0.58327174",
"0.58223736",
"0.5816145",
"0.579885",
"0.5791261",
"0.5782295",
"0.57761395",
"0.577444",
"0.5772829",
"0.5761481",
"0.57568336",
"0.57451445",
"0.57445484",
"0.57291114",
"0.57281876",
"0.57241416",
"0.5719057",
"0.57177675",
"0.5717261"
] | 0.83640254 | 1 |
Gets the private 'controller_name_converter' shared service. | protected function getControllerNameConverterService()
{
return $this->services['controller_name_converter'] = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser($this->get('kernel'));\n }",
"protected function getResolveControllerNameSubscriberService()\n {\n return $this->services['resolve_controller_name_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'});\n }",
"public function getControllerName() {}",
"public function getControllerObjectName() {}",
"public function getControllerObjectName() {}",
"public function getBaseControllerName(): string;",
"protected function getModuleFromControllerName() \r\n {\r\n $controller_name = get_class($this);\r\n return strtolower(preg_replace('/_(.*?)$/i', '', $controller_name));\r\n }",
"function getControllerObjectName() ;",
"public function getControllerName()\n {\n return Inflector::id2camel($this->getControllerId(),'-');\n }",
"public function getControllerExtensionName() {}",
"public function getControllerExtensionName() {}",
"public function getControllerName() {\n\n\t\treturn $this->_controller;\n\t}",
"public function getControllerName(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_controllerName[$className])){\n\t\t\treturn self::$_controllerName[$className];\n\t\t} else {\n\t\t\treturn $className;\n\t\t}\n\t}",
"protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, './../', ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function getControllername()\r\n {\r\n return $this->controllername;\r\n }",
"public function getController()\n {\n return $this->str_controller;\n }",
"public function getControllerName() {\n\t\treturn $this->controller;\n\t}",
"public function getControllerName()\n {\n return $this->_controller;\n }",
"public function getController(): string\n {\n return $this->controller;\n }",
"public function getController(): string\n {\n return $this->controller;\n }",
"public function getControllerName()\n {\n return $this->controller;\n }",
"public function getControllerName()\n {\n if (is_null($this->_controllerName)) {\n $this->getController();\n }\n return $this->_controllerName;\n }",
"public function getControllerName() {\n return $this->controllerName;\n }",
"public static function getControllerName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"private function getControllerName() {\n if(isset($_GET['c']) && !empty($_GET['c'])) {\n return $_GET['c'];\n }\n return Config::getDefaultController();\n }",
"public function getController()\n\t{\n\t\t$className = strtolower(get_class($this));\n\t\t$className = preg_replace('/_controller$/', '', $className);\n\n\t\treturn $className;\n\t}",
"private function _getControllerClassName($name)\n {\n $parts = explode('/', $name);\n $result = '';\n \n //Vendor part\n foreach ( explode('_', $parts[0]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n //Package part\n foreach ( explode('_', $parts[1]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n //Module part\n foreach ( explode('_', $parts[2]) as $key )\n {\n $result .= ucfirst($key) . '_';\n }\n \n $result .= 'Controller';\n \n if (empty($parts[3]))\n {\n $result .= '_Default';\n }\n else foreach ( explode('_', $parts[3]) as $key )\n {\n $result .= '_'.ucfirst($key);\n }\n return $result;\n }",
"public function getControllerName()\n {\n return preg_replace(\"/(.*)[\\\\\\\\](.*)(Controller)/\", '$2', get_class($this));\n }",
"public function getController()\n {\n return ucfirst($this->controller).'Controller';\n }",
"public function getController() {\n\t\tif (isset($_GET[$this->config->get('controllerParam')]))\n\t\t\t$controller = clearPath(urldecode($_GET[$this->config->get('controllerParam')]));\n\t\telse\n\t\t\t$controller = clearPath($this->config->get('defaultController'));\n\t\t\n\t\treturn strtolower($controller);\n\t}",
"public function getConverterName();",
"protected static function getControllerName()\n {\n //控制器cname对应的中文名称\n $cnames['UsersController'] = '用户管理';\n $cnames['CatesController'] = '栏目管理';\n $cnames['AdminuserController'] = '管理员管理';\n $cnames['RoleController'] = '岗位管理';\n $cnames['NodeController'] = '权限管理';\n $cnames['BannersController'] = '轮播图管理';\n $cnames['LinksController'] = '链接管理';\n $cnames['NewsController'] = '新闻管理';\n $cnames['AddressController'] = '收货地址管理';\n $cnames['BrandsController'] = '品牌管理';\n $cnames['SpecificController'] = '商品规格管理';\n $cnames['GoodsController'] = '商品管理';\n $cnames['BlogController'] = '商城头条管理';\n $cnames['RecommendController'] = '今日推荐管理';\n $cnames['SeckillController'] = '秒杀管理';\n\n return $cnames;\n }",
"public function getController()\n\t{\t\n\n\t\t$parsed = $this->getAsArray();\n\t\t\n\t\tif( ! empty($parsed) )\n\t\t{\n\t\t\tif( $this->getPrefix() )\n\t\t\t{\n\t\t\t\tarray_shift($parsed);\n\t\t\t}\n\t\t\tif( ! empty($parsed) )\n\t\t\t{\n\t\t\t\treturn $parsed[0];\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private function _controllerToClassName( $controllerName ) {\n $words = ucwords(str_replace(array('_', '-'),' ', $controllerName));\n return str_replace(' ', '', $words);\n }",
"protected function getTemplating_NameParserService()\n {\n return $this->services['templating.name_parser'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser($this->get('kernel'));\n }",
"public function getController()\n {\n return $this->sController;\n }",
"protected function getCurrentCallingControllerName()\n {\n if (is_null($this->currentCallingControllerName)) {\n $namespace = explode('\\\\', get_class($this));\n $this->currentCallingControllerName = strtolower(str_replace('Controller', '', end($namespace)));\n }\n\n return $this->currentCallingControllerName;\n }",
"public function formatController()\n {\n if ($this->controllerFormatter) {\n return call_user_func($this->controllerFormatter, $this);\n }\n return 'Controller' . StringObject::create($this->getController())->toClass();\n }",
"protected static function getConverterId()\n {\n return strtolower(self::getConverterDisplayName());\n }",
"public function getUniqueControllerPrefix()\n {\n return self::PREFIX;\n }",
"public function getControllerSimpleName()\n {\n return end(explode('\\\\', $this->controllerName));\n }",
"public static function getController()\n {\n return self::getInstance()->urlParams[self::PARAM_CONTROLLER];\n }",
"public function CompleteControllerName ($controllerNamePascalCase);",
"protected function controller_class($name) {\n return str_replace('/', '_', Support_Inflector::camelize($name)) . 'Controller';\n }",
"abstract public function getServiceTypeName();",
"abstract public function getServiceName();",
"public static function name()\n {\n $path = explode('\\\\', get_called_class());\n $controller_name = array_pop($path);\n return trim(str_replace(\"Controller\", \"\", $controller_name));\n }",
"public function getId()\n {\n return strtolower(strstr($this->getShortName(), 'Controller', true));\n }",
"public function getShortName() {\n return lcfirst(str_replace('Controller', '', get_class($this)));\n }",
"protected function getBazinga_Jstranslation_ControllerService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['bazinga.jstranslation.controller'] = $instance = new \\Bazinga\\Bundle\\JsTranslationBundle\\Controller\\Controller($this->get('translator.default'), $this->get('templating'), $this->get('bazinga.jstranslation.translation_finder'), (__DIR__.'/bazinga-js-translation'), false, 'en', 'messages', '86400');\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n $instance->addLoader('json', $this->get('translation.loader.json'));\n\n return $instance;\n }",
"protected function _getController()\n\t{\n\t\treturn $this->_registry->getController();\n\t}",
"public function getDefaultControllerName()\n {\n return $this->_defaultController;\n }",
"public function getController() : string\n {\n return substr($this->uri, 0, -strlen($this->match)) .\n $this->replacement;\n }",
"public static function getControllerName()\r\n {\r\n $page = request::get('page', 'homepage'); \r\n\r\n // if a controller file exists with this name\r\n $file_name = $page . '.controller.php';\r\n $file_path = CONTROLLERS_DIR . '/' . $file_name;\r\n if(file_exists($file_path))\r\n {\r\n // return the path to that file\r\n return $page;\r\n }\r\n else\r\n {\r\n // return the path to the error 404 file\r\n return 'error404';\r\n }\r\n }",
"public function getController( );",
"public function getErrorControllerName()\n {/*{{{*/\n return $this->get(self::KEY_ERROR_CONTROLLER_NAME);\n }",
"public function getController($ucfirst=true){\r\n\t\tif(is_array($this->matchedRoute) && isset($this->matchedRoute['controller_regex'])){\r\n\t\t\tif($this->matchedRoute['controller_regex'] == true){\r\n\t\t\t\t$this->controller = 'Reg'.sha1($this->matchedRoute['controller']);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif($ucfirst){\r\n\t\t\t$o = ucfirst($this->controller);\r\n\t\t} else {\r\n\t\t\t$o = strtolower($this->controller);\r\n\t\t}\r\n\t\treturn $o;\r\n\t}",
"public function getController() {\n \t\n \t// Return our controller\n \treturn $this->sController;\n }",
"public static function getControllerName()\n {\n //get the name of the page from URL \n $page_name = request::get('page', 'home');\n //$page_uri = $_SERVER['REQUEST_URI'];//get the uri of the current page\n //$url_parts = explode('/',$page_uri);//break it into parts\n //$page_name = array_pop($url_parts);//gets the last part (contact from www.site.com/contact)\n //get the path to the proper controller file based on the page name\n\n //if(trim($page_name)=='') $page_name = 'home';//if none was specified, make ot home\n\n $controller_file = static::getControllerFile($page_name);\n //if such a controller exists\n if(file_exists($controller_file))\n {\n //return the name of the page \n return $page_name;\n }\n else\n {\n //otherwise throw a nice error!\n return 'error404';\n }\n }",
"public function & GetController ();",
"public function getController()\n {\n return $this->__get($this->getControllerKey());\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"private static function convert_controller_uri($s_controller)\n\t{\n\t\t$uri = explode('\\\\',$s_controller);\n\t\t$uri = explode('_',$uri[1]);\n\t\treturn strtolower($uri[1]);\n\t}",
"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 getControllerFileName() // \"controller/ContactosController.php\"\n {\n\n return 'controller/' . $this->getControllerClassName().'.php';\n\n }",
"public function getController();",
"public function getController();",
"public function getController();",
"static public function controller() {\n\t\treturn self::$controller;\n\t}",
"public function getControllerName()\n {\n $current = static::class;\n $ancestry = ClassInfo::ancestry($current);\n $controller = null;\n while ($class = array_pop($ancestry)) {\n if ($class === self::class) {\n break;\n }\n if (class_exists($candidate = sprintf('%sController', $class))) {\n $controller = $candidate;\n break;\n }\n $candidate = sprintf('%sController', str_replace('\\\\Model\\\\', '\\\\Control\\\\', $class));\n if (class_exists($candidate)) {\n $controller = $candidate;\n break;\n }\n }\n if ($controller) {\n return $controller;\n }\n return PageController::class;\n }",
"public function getControllerActionName() {}",
"protected function getTemplating_FilenameParserService()\n {\n return $this->services['templating.filename_parser'] = new \\Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateFilenameParser();\n }",
"public function getControllerClassName() //\"HomeController\"\n {\n\n return Inflector::camel($this->getController()).'Controller'; //clase estatica NO se instancia \n }",
"public function controllerAlias()\n {\n return $this->controllerAlias;\n }",
"public function getControllerKey()\n {\n return $this->controllerKey;\n }",
"public static function getController($_controllerName)\n {\n if (! class_exists($_controllerName)) {\n throw new Exception(\"Controller\" . $_controllerName . \"not found.\");\n }\n \n if (!in_array('Controller_Interface', class_implements($_controllerName))) {\n throw new Exception(\"Controller $_controllerName does not implement ControllerInterface.\");\n }\n \n return call_user_func(array($_controllerName, 'getInstance'));\n }",
"protected function _controller() {\n\t\treturn $this->_container->controller;\n\t}",
"protected function getControllerClassName()\n {\n $className = $this->classPath;\n\n if (false !== strpos($className, '.')) {\n \\Yii::import($className);\n $className = explode('.', $className);\n $className = array_pop($className);\n }\n\n return $className;\n }",
"public function getController()\n {\n if (is_null($this->_controller)) {\n $controller = $this->getConfiguration()\n ->get('router.controller', 'pages');\n if (isset($this->_params['controller'])) {\n $controller = $this->_params['controller'];\n }\n $this->_controllerName = $controller;\n $this->_controller = trim(\n \"{$this->namespace}\\\\\". ucfirst($controller),\n '\\\\'\n );\n }\n return $this->_controller;\n }",
"public function getCustomController()\n {\n $controllerName = ucfirst(str_replace('post_', '', $this->slug));\n return $controllerName.'Controller';\n }",
"function _getPluginControllerNames() {\n \t\tApp::import('Core', 'File', 'Folder');\n \t\t$paths = Configure::getInstance();\n \t\t$folder =& new Folder();\n \t\t$folder->cd(APP . 'plugins');\n\n \t\t// Get the list of plugins\n \t\t$Plugins = $folder->read();\n \t\t$Plugins = $Plugins[0];\n \t\t$arr = array();\n\n \t\t// Loop through the plugins\n \t\tforeach($Plugins as $pluginName) {\n \t\t\t// Change directory to the plugin\n \t\t\t$didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');\n \t\t\t// Get a list of the files that have a file name that ends\n \t\t\t// with controller.php\n \t\t\t$files = $folder->findRecursive('.*_controller\\.php');\n\n \t\t\t// Loop through the controllers we found in the plugins directory\n \t\t\tforeach($files as $fileName) {\n \t\t\t\t// Get the base file name\n \t\t\t\t$file = basename($fileName);\n\n \t\t\t\t// Get the controller name\n \t\t\t\t$file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));\n \t\t\t\tif (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {\n \t\t\t\t\tif (!App::import('Controller', $pluginName.'.'.$file)) {\n \t\t\t\t\t\tdebug('Error importing '.$file.' for plugin '.$pluginName);\n \t\t\t\t\t} else {\n \t\t\t\t\t\t/// Now prepend the Plugin name ...\n \t\t\t\t\t\t// This is required to allow us to fetch the method names.\n \t\t\t\t\t\t$arr[] = Inflector::humanize($pluginName) . \"/\" . $file;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn $arr;\n \t}",
"function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}",
"public function getControllerInstanceClassName($controllerInstance)\n {\n return $controllerInstance;\n }",
"public function getModelName($controllerName = null)\n {\n if ($this->modelName === null || $controllerName !== null) {\n if (is_object($controllerName)) {\n $controllerName = get_class($controllerName);\n } elseif ($controllerName === null) {\n $controllerName = get_called_class();\n }\n $reflector = new \\ReflectionClass($controllerName);\n $namespace = preg_replace('/\\\\\\\\Controllers$/', '\\\\Models', $reflector->getNamespaceName());\n $modelName = basename(str_replace('\\\\', DIRECTORY_SEPARATOR, $controllerName));\n $modelName = new String(preg_replace('/Controller$/', '', $modelName));\n $modelName = $namespace . '\\\\' . $modelName->singularize()->camelCase();\n if (is_string($modelName) && $modelName[0] !== '\\\\') {\n $modelName = '\\\\' . $modelName;\n }\n return $modelName;\n }\n return $this->modelName;\n }",
"function _getPluginControllerNames() {\n\t\tApp::import('Core', 'File', 'Folder');\n\t\t$paths = Configure::getInstance();\n\t\t$folder =& new Folder();\n\t\t$folder->cd(APP . 'plugins');\n\t\t// Get the list of plugins\n\t\t$Plugins = $folder->read();\n\t\t$Plugins = $Plugins[0];\n\t\t$arr = array();\n\t\t// Loop through the plugins\n\t\tforeach($Plugins as $pluginName) {\n\t\t\t// Change directory to the plugin\n\t\t\t$didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');\n\t\t\t// Get a list of the files that have a file name that ends\n\t\t\t// with controller.php\n\t\t\t$files = $folder->findRecursive('.*_controller\\.php');\n\t\t\t// Loop through the controllers we found in the plugins directory\n\t\t\tforeach($files as $fileName) {\n\t\t\t\t// Get the base file name\n\t\t\t\t$file = basename($fileName);\n\t\t\t\t// Get the controller name\n\t\t\t\t$file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));\n\t\t\t\tif (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {\n\t\t\t\t\tif (!App::import('Controller', $pluginName.'.'.$file)) {\n\t\t\t\t\t\tdebug('Error importing '.$file.' for plugin '.$pluginName);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/// Now prepend the Plugin name ...\n\t\t\t\t\t\t// This is required to allow us to fetch the method names.\n\t\t\t\t\t\t$arr[] = Inflector::humanize($pluginName) . \"/\" . $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}",
"protected function getControllerBaseName()\n {\n $controllerName = get_called_class();\n $controllerNameComponents = explode('\\\\', $controllerName);\n\n $baseName = array_pop($controllerNameComponents);\n $baseName = substr($baseName, 0, strrpos($baseName, 'Controller'));\n\n return $baseName;\n }",
"public function GetControllerClass ();",
"public function getController() //string(4) \"home\"\n {\n \n return $this->controller;\n\n }",
"public function getControllerExtensionKey() {}",
"protected function getController_HelperService()\n {\n return $this->services['controller.helper'] = new \\phpbb\\controller\\helper(${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['symfony_request']) ? $this->services['symfony_request'] : $this->getSymfonyRequestService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, ${($_ = isset($this->services['routing.helper']) ? $this->services['routing.helper'] : $this->getRouting_HelperService()) && false ?: '_'});\n }",
"public function getController()\n {\n return $this->joUrl['CONTROLLER'];\n }",
"protected function parseController($str_controller)\n {\n return $this->str_controller_namespace . str_replace([' ', \"\\t\"], ['', '\\\\'], ucwords(str_replace('-', ' ', strtolower($str_controller))));\n }",
"function getController($context) {\n\t\t$uri=$context->getURI();\n\t\t$path=$uri->getPart();\n\t\tswitch ($path) {\n\t\t\tcase 'admin':\n\t\t\t\treturn getAdminController($context);\n\t\t\tcase '':\n\t\t\t\t$uri->prependPart('home');\n\t\t\t\treturn 'Static';\n\t\t\tcase 'static':\n\t\t\t\treturn 'Static';\n\t\t\tcase 'login':\n\t\t\t\treturn 'Login';\n\t\t\tcase 'logout':\n\t\t\t\treturn 'Logout';\n\t\t\tcase \"checkout\":\n\t\t\t\treturn \"Checkout\";\n\t\t\tcase \"myShoppingCart\":\n\t\t\t return \"ShoppingCart\";\n\t\t\tdefault:\n\t\t\t\tthrow new InvalidRequestException (\"No such page \");\n\t\t}\n\t}",
"public function getControllerName()\n\t{\n\t\t$explodedArray = explode('/', $_SERVER['REQUEST_URI']);\n\t\tif (array_key_exists(1, $explodedArray) && !empty($explodedArray[1]) && !strstr($explodedArray[1], '?')) {\n\t\t\t$this->controllerName = $explodedArray[1];\n\t\t}else\n\t\t\t$this->controllerName = 'main';\n\t}",
"protected function getVictoireCore_Listener_ControllerListenerService()\n {\n return $this->services['victoire_core.listener.controller_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\ControllerListener($this->get('event_dispatcher'));\n }",
"public function get_rest_controller( string $controller_name ) {\n\t\treturn $this->rest_controllers[ $controller_name ];\n\t}",
"public function getControllerTitle()\n {\n if(strpos($this->controller, '/') >= 0) {\n return preg_replace(\"/\\/[\\w-_]+$/\", '', $this->controller);\n }\n else {\n return '';\n }\n }",
"public function createControllerServiceName($serviceName)\n {\n return sprintf(\n '%s\\\\V%s\\\\Rest\\\\%s\\\\Controller',\n $this->module,\n $this->moduleEntity->getLatestVersion(),\n $serviceName\n );\n }",
"protected function getControllerStubName()\n {\n $version = '';\n if ($this->option('api-version')) {\n $version = '-version-based';\n }\n\n return parent::getControllerStubName() . $version;\n }"
] | [
"0.87402654",
"0.75222164",
"0.6778608",
"0.6602507",
"0.6602507",
"0.6550051",
"0.65097094",
"0.64549685",
"0.6215908",
"0.6212425",
"0.6212425",
"0.6200901",
"0.617198",
"0.61692774",
"0.614288",
"0.61354715",
"0.6130968",
"0.6097719",
"0.60866785",
"0.60866785",
"0.60849196",
"0.6076881",
"0.6072362",
"0.60608405",
"0.6060049",
"0.60260415",
"0.59579945",
"0.5924119",
"0.59186566",
"0.5907464",
"0.5848301",
"0.58385783",
"0.5827428",
"0.5822598",
"0.581972",
"0.5819348",
"0.58098555",
"0.58095044",
"0.5801354",
"0.58003247",
"0.5791896",
"0.5764526",
"0.57525814",
"0.5749326",
"0.5746926",
"0.5745591",
"0.57264566",
"0.57234234",
"0.57039183",
"0.56989235",
"0.5696085",
"0.5683421",
"0.5682513",
"0.56796557",
"0.5673296",
"0.5669043",
"0.5667982",
"0.5663118",
"0.5661783",
"0.5655841",
"0.56539583",
"0.5652499",
"0.5652499",
"0.56451875",
"0.56381166",
"0.5637063",
"0.5627746",
"0.5627746",
"0.5627746",
"0.5621718",
"0.5616212",
"0.56093645",
"0.56092215",
"0.56089455",
"0.5595198",
"0.5586322",
"0.55858874",
"0.558425",
"0.55782545",
"0.5577795",
"0.55760264",
"0.55664694",
"0.55566615",
"0.5531405",
"0.5524494",
"0.552386",
"0.55136573",
"0.5506189",
"0.54921645",
"0.54917526",
"0.5487536",
"0.54843223",
"0.5481468",
"0.54688007",
"0.5466402",
"0.54399097",
"0.54273266",
"0.5404715",
"0.54021263",
"0.5396268"
] | 0.8904801 | 0 |
Gets the private 'debug.debug_handlers_listener' shared service. | protected function getDebug_DebugHandlersListenerService()
{
return $this->services['debug.debug_handlers_listener'] = new \Symfony\Component\HttpKernel\EventListener\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \Symfony\Component\HttpKernel\Log\Logger()) && false ?: '_'}, -1, -1, true, new \Symfony\Component\HttpKernel\Debug\FileLinkFormatter(NULL), true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"private function getDebugLogger()\n {\n foreach ($this->handlers as $handler) {\n if ($handler instanceof Ecocode_Profiler_Model_Logger_DebugHandlerInterface) {\n return $handler;\n }\n }\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"public function getHandlerManager()\n {\n return $this->handlerManager;\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getVictoireCore_PageMenuListenerService()\n {\n return $this->services['victoire_core.page_menu_listener'] = new \\Victoire\\Bundle\\PageBundle\\Listener\\PageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getHandler();",
"public function getHandler();",
"public function getHandler() {}",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"private static function getHandler()\n {\n if (self::$config_handler == null) {\n self::$config_handler = new self();\n }\n return self::$config_handler;\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getVictoireBlog_BlogMenuListenerService()\n {\n return $this->services['victoire_blog.blog_menu_listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\BlogMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getHandler()\n {\n }",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"protected function get_handler() {\n\n\t\treturn $this->handler;\n\t}",
"protected function getSecurity_Authentication_GuardHandlerService()\n {\n return $this->services['security.authentication.guard_handler'] = new \\Symfony\\Component\\Security\\Guard\\GuardAuthenticatorHandler($this->get('security.token_storage'), $this->get('event_dispatcher', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"function &_getHandler()\n\t{\n\t\treturn 0;\n\t}",
"public static function handler()\n {\n return static::$handler;\n }",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function getEventHandlers()\n {\n return $this->eventHandlers;\n }",
"public function getHandlers()\n {\n return $this->handlers;\n }",
"public function getHandler()\n {\n return $this->handler;\n }",
"public function getHandler()\n {\n return $this->handler;\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"public function getHandler()\n\t{\n\t\treturn $this->handler;\n\t}",
"public function get_handler_instance() {\n\n\t\treturn $this->handler;\n\t}",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getVictoireSitemap_Export_HandlerService()\n {\n return $this->services['victoire_sitemap.export.handler'] = new \\Victoire\\Bundle\\SitemapBundle\\Domain\\Export\\SitemapExportHandler($this->get('doctrine.orm.default_entity_manager'), $this->get('victoire_page.page_helper'), $this->get('victoire_view_reference.repository'));\n }",
"public function hookManager()\n {\n return $this->hookManager;\n }",
"protected function getHookFinderService()\n {\n return $this->services['hook_finder'] = new \\phpbb\\hook\\finder('./../', 'php', ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'});\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"static function getEventDispatcher() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_EVENT_DISPATCHER);\n\t}",
"public function getHandler(){\n return($this->handle); \n }",
"public function getMessageHandler()\n {\n return $this->messageHandler;\n }",
"protected function getSession_HandlerService()\n {\n return $this->services['session.handler'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler(($this->targetDirs[3].'/app/../var/sessions/prod'));\n }",
"protected function getVictoireCore_MenuDispatcherService()\n {\n return $this->services['victoire_core.menu_dispatcher'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\MenuDispatcher($this->get('event_dispatcher'), $this->get('security.token_storage'), $this->get('security.authorization_checker'));\n }",
"public static function getEventDispatcher()\n {\n return static::$dispatcher;\n }",
"private function getEventDispatcherServiceId()\n {\n return 'event_dispatcher';\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"public static function getEventDispatcher()\n {\n }",
"protected function getVictoireCore_TemplateMenuListenerService()\n {\n return $this->services['victoire_core.template_menu_listener'] = new \\Victoire\\Bundle\\TemplateBundle\\Listener\\TemplateMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getHandlers() : array {\r\n return $this->handlers;\r\n }",
"protected function getEventLogger()\n {\n $event_manager = new EventsManager;\n\n $event_manager->attach($this->alias, function ($event, $conn) {\n if ($event->getType() == 'beforeQuery') {\n $logging_name = 'db';\n\n if (logging_extension()) {\n $logging_name = 'db-'.logging_extension();\n }\n\n $logger = new Logger('DB');\n $logger->pushHandler(\n new StreamHandler(\n storage_path('logs').'/'.$logging_name.'.log',\n Logger::INFO\n )\n );\n\n $variables = $conn->getSQLVariables();\n\n if ($variables) {\n $logger->info(\n $conn->getSQLStatement().\n ' ['.implode(',', $variables).']'\n );\n } else {\n $logger->info($conn->getSQLStatement());\n }\n }\n });\n\n return $event_manager;\n }",
"protected function getPhpbb_Report_HandlerFactoryService()\n {\n return $this->services['phpbb.report.handler_factory'] = new \\phpbb\\report\\handler_factory($this);\n }",
"protected function getMonolog_Handler_NullInternalService()\n {\n return $this->services['monolog.handler.null_internal'] = new \\Monolog\\Handler\\NullHandler();\n }",
"function get_handler() {\r\n }",
"function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"protected function getVictoireMedia_MediaHandlers_RemoteSlideService()\n {\n return $this->services['victoire_media.media_handlers.remote_slide'] = new \\Victoire\\Bundle\\MediaBundle\\Helper\\RemoteSlide\\RemoteSlideHandler();\n }",
"public function handler()\r\n\t{\r\n\t\treturn $this->handler;\r\n\t}",
"protected function getNotificationManagerService()\n {\n return $this->services['notification_manager'] = new \\phpbb\\notification\\manager(${($_ = isset($this->services['notification.type_collection']) ? $this->services['notification.type_collection'] : $this->getNotification_TypeCollectionService()) && false ?: '_'}, ${($_ = isset($this->services['notification.method_collection']) ? $this->services['notification.method_collection'] : $this->getNotification_MethodCollectionService()) && false ?: '_'}, $this, ${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, 'phpbb_notification_types', 'phpbb_user_notifications');\n }",
"public function getListeningToGlobalEvents()\n\t{\n\t\treturn $this->_listeningenabled;\n\t}",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getVictoireMedia_Listener_DoctrineService()\n {\n return $this->services['victoire_media.listener.doctrine'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\DoctrineMediaListener($this->get('victoire_media.media_manager'));\n }",
"public function get_handler()\n {\n }",
"protected function getEventDispatcher()\n {\n return $this->eventDispatcher;\n }",
"public function getSecHandler() {}",
"public function getApiHandler()\n {\n return $this->apiServer->getApiHandler('sling');\n }",
"protected function getJmsSerializer_ConstraintViolationHandlerService()\n {\n return $this->services['jms_serializer.constraint_violation_handler'] = new \\JMS\\Serializer\\Handler\\ConstraintViolationHandler();\n }",
"protected function getTemplate_Twig_Extensions_DebugService()\n {\n return $this->services['template.twig.extensions.debug'] = new \\Twig_Extension_Debug();\n }",
"public function getActualHandler();",
"protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }",
"static function getHandlerId ()\n {\n return 'internal';\n }",
"protected function getVictoireViewReference_ListenerService()\n {\n return $this->services['victoire_view_reference.listener'] = new \\Victoire\\Bundle\\ViewReferenceBundle\\Listener\\ViewReferenceListener($this->get('victoire_view_reference.builder'), $this->get('victoire_view_reference.manager'), $this->get('doctrine.orm.default_entity_manager'));\n }",
"public function getEventDispatcher()\n {\n if (!isset($this['pantono.event.dispatcher'])) {\n $this['pantono.event.dispatcher'] = new Dispatcher($this);\n }\n return $this['pantono.event.dispatcher'];\n }",
"public function getUrlDetectionHandler()\n {\n return $this->urlDetectionHandler;\n }",
"public function getUrlDetectionHandler()\n {\n return $this->urlDetectionHandler;\n }",
"public function getDetHandler()\n {\n return $this->detHandler;\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"function getHandlers()\n {\n eval(PUBSUB_MUTATE);\n return $this->_handlers;\n }",
"protected function getMonolog_Handler_NestedService()\n {\n $this->services['monolog.handler.nested'] = $instance = new \\Monolog\\Handler\\StreamHandler(($this->targetDirs[2].'/logs/prod.log'), 100, true, NULL);\n\n $instance->pushProcessor(${($_ = isset($this->services['monolog.processor.psr_log_message']) ? $this->services['monolog.processor.psr_log_message'] : $this->getMonolog_Processor_PsrLogMessageService()) && false ?: '_'});\n\n return $instance;\n }",
"protected function getVictoireBusinessPage_BusinessTemplateMenuListenerService()\n {\n return $this->services['victoire_business_page.business_template_menu_listener'] = new \\Victoire\\Bundle\\BusinessPageBundle\\Listener\\BusinessPageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getDispatcher(): EventDispatcherInterface;",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }",
"public function getEventDispatcher()\n {\n return $this->eventDispatcher;\n }",
"public function getDispatcher(): RequestHandlerInterface {\n return $this->dispatcher;\n }"
] | [
"0.8282563",
"0.6258716",
"0.62494403",
"0.61819434",
"0.6104834",
"0.61011034",
"0.59818786",
"0.59299964",
"0.5870668",
"0.5847579",
"0.5801385",
"0.5797447",
"0.5788257",
"0.5761843",
"0.57312024",
"0.57001466",
"0.56827587",
"0.56806254",
"0.56712466",
"0.5661961",
"0.5654134",
"0.56463605",
"0.5618169",
"0.5618169",
"0.56068575",
"0.55812097",
"0.5545088",
"0.55439276",
"0.54863846",
"0.54839885",
"0.54721266",
"0.5456698",
"0.54530126",
"0.5437662",
"0.5423035",
"0.541183",
"0.54092443",
"0.5394587",
"0.5370807",
"0.5370517",
"0.5367779",
"0.5367779",
"0.5364401",
"0.5345095",
"0.53365105",
"0.5322341",
"0.53213716",
"0.5293729",
"0.5287148",
"0.5279699",
"0.5279699",
"0.5270962",
"0.52566665",
"0.5256269",
"0.52519536",
"0.52490324",
"0.52470195",
"0.5236286",
"0.52322316",
"0.52322316",
"0.52300024",
"0.5223548",
"0.5222894",
"0.51814485",
"0.5173673",
"0.51423174",
"0.51350737",
"0.51350117",
"0.51336515",
"0.51074463",
"0.5097791",
"0.509631",
"0.5090137",
"0.50753516",
"0.50753516",
"0.5056998",
"0.5055359",
"0.50477",
"0.5046544",
"0.50402355",
"0.5032216",
"0.50318784",
"0.50226766",
"0.5015315",
"0.5013154",
"0.50110674",
"0.5010906",
"0.5006313",
"0.5006313",
"0.4991876",
"0.4986334",
"0.4984031",
"0.49823695",
"0.49687758",
"0.49589828",
"0.49583405",
"0.49583405",
"0.49556652",
"0.49497056",
"0.49436566"
] | 0.82447433 | 1 |
Gets the private 'doctrine.dbal.connection_factory' shared service. | protected function getDoctrine_Dbal_ConnectionFactoryService()
{
return $this->services['doctrine.dbal.connection_factory'] = new \Doctrine\Bundle\DoctrineBundle\ConnectionFactory(array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"protected function getDbal_ConnService()\n {\n return $this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this);\n }",
"public function getDoctrineConnection()\n {\n $driver = $this->getDoctrineDriver ();\n $data = array (\n 'pdo' => $this->pdo,\n 'dbname' => $this->getConfig ( 'database' )\n );\n return new \\Doctrine\\DBAL\\Connection ( $data, $driver );\n }",
"public function getDoctrineConnection()\n {\n if(self::$doctrine_connection === null) {\n \n $config = new \\Doctrine\\DBAL\\Configuration();\n \n $connectionParams = array(\n 'dbname' => $GLOBALS['DB_DBNAME'],\n 'user' => $GLOBALS['DB_USER'],\n 'password' => $GLOBALS['DB_PASSWD'],\n 'host' => 'localhost',\n 'driver' => 'pdo_mysql',\n );\n \n self::$doctrine_connection = \\Doctrine\\DBAL\\DriverManager::getConnection($connectionParams, $config);\n }\n \n return self::$doctrine_connection;\n \n }",
"protected function getConnection()\n {\n return $this->createDefaultDBConnection($this->createPdo(), static::NAME);\n }",
"protected function getConnection()\n {\n require_once __DIR__ . '/../../../doctrine/bootstrap_pdo.php';\n return getConnectionToTestDB();\n }",
"public static function getDoctrineConnection()\n {\n }",
"public function getDbalConnection();",
"public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }",
"static function getDbConnection() {\n\n if (empty(static::$db)) {\n $pdo = Service::get('pdo');\n static::$db = new \\PDO($pdo['dns'], $pdo['user'], $pdo['password']);\n }\n return static::$db;\n }",
"final protected function getConnection(): Connection\n {\n return $this->em->getConnection();\n }",
"public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }",
"public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }",
"protected function getConnection()\n {\n $pdo = new PDO(DB_DSN, DB_USER, DB_PASS);\n return new DefaultConnection($pdo, DB_NAME);\n }",
"protected static function getDatabaseConnection() {}",
"protected static function getDatabaseConnection() {}",
"protected static function getDatabaseConnection() {}",
"protected function getDatabaseConnection( )\n {\n if( sfConfig::get('sf_use_database') )\n {\n try\n {\n return Doctrine_Manager::connection();\n }\n catch( Doctrine_Connection_Exception $e )\n {\n new sfDatabaseManager(sfContext::getInstance()->getConfiguration());\n return Doctrine_Manager::connection();\n }\n }\n\n return null;\n }",
"public static function getConnection()\n {\n return static::getInstance();\n }",
"public function getConnection()\n {\n $this->connection = db($this->connectionName);\n\n return $this->connection;\n }",
"protected static function getConnection() {\n\n static $connection = null;\n\n if ($connection === null) {\n try {\n $dsn = 'mysql:host=' . Config::DB_HOST . ';dbname=' . Config::DB_NAME;\n $connection = new PDO($dsn, Config::DB_USER, Config::DB_PSWD);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch(PDOException $e) {\n throw new \\Exception('Error from: ' . get_class($this) . ' - Unable to connect to database ' . Config::DB_NAME);\n }\n }\n\n return $connection;\n\n }",
"protected function getDbal_Extractor_FactoryService()\n {\n return $this->services['dbal.extractor.factory'] = new \\phpbb\\db\\extractor\\factory(${($_ = isset($this->services['dbal.conn.driver']) ? $this->services['dbal.conn.driver'] : $this->get('dbal.conn.driver', 1)) && false ?: '_'}, $this);\n }",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getDatabaseConnection() {}",
"protected function getConnection()\n {\n return $this->pdo;\n }",
"protected static function getConnection()\n {\n static $connection;\n\n if ($connection === null) {\n $options = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n ];\n\n try {\n $connection = new PDO(\n sprintf(\"mysql:dbname=%s; host=%s; charset=utf8\", getenv('DB_NAME'), getenv('DB_HOST')),\n getenv('DB_USER'),\n getenv('DB_PASSWORD'),\n $options\n );\n } catch (\\PDOException $e) {\n echo $e->getMessage();\n die;\n }\n }\n\n return $connection;\n }",
"public static function getConnection()\n {\n return self::$pdo;\n }",
"function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}",
"protected function getConnection()\n\t{\n\t\treturn $this->createDefaultDBConnection(TEST_DB_PDO(), TEST_GET_DB_INFO()->ldb_name);\n\t}",
"public function getConnection()\n\t{\n\t\treturn empty($this->db_conn) ? Db::getConnection($this->getConnectionName()) : $this->db_conn;\n\t}",
"public function getConnection()\n {\n return Database::getConnection($this->connection);\n }",
"protected function getConnection()\n {\n $pdo = new PDO($GLOBALS['DB_DSN'],\n $GLOBALS['DB_USER'],\n $GLOBALS['DB_PASSWORD']);\n return $this->createDefaultDBConnection($pdo, $GLOBALS['DB_NAME']);\n }",
"protected static function resolve_connection() {\n global $DB;\n\n switch ($DB->get_dbfamily()) {\n case 'mysql':\n return new mysql_connection($DB);\n default:\n throw new \\Exception('Unsupported database family: ' . $DB->get_dbfamily());\n }\n }",
"protected function getConnection()\n {\n return $this->createDefaultDBConnection(\\DB::connection()->getPdo(), env('DB_DATABASE'));\n }",
"public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }",
"public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }",
"protected function _getConnection()\n {\n return $this->_pdo;\n }",
"public function getConnection()\n {\n return $this->resolver->connection();\n }",
"protected function getConnection()\n {\n return Model::getConnectionResolver()->connection();\n }",
"public static function GetConnection() : SELF\r\n {\r\n static $dbInstance = NULL;\r\n\r\n if($dbInstance === NULL)\r\n {\r\n $dbInstance = new static();\r\n }\r\n\r\n return($dbInstance);\r\n }",
"public function getConnection()\n {\n if (!self::$connection) {\n $connectionClass= $this->getConnectionClass();\n $auth = $this->getAuthentication();\n self::$connection = new $connectionClass($auth, $this->getServiceNet());\n }\n return self::$connection;\n }",
"public static function getConnection(): \\PDO {\r\n return self::getInstance()::$connection;\r\n }",
"public static function getConn() : \\PDO\n {\n return Db::getInstance();\n }",
"public static function conn()\n {\n return (static::inst())::$_db;\n }",
"public function createConnection()\n {\n $client = DatabaseDriver::create($this->getConfig());\n\n return $client;\n }",
"protected function getConnection()\n {\n require_once dirname(__FILE__) . '/bootstrap_pdo.php';\n return getConnectionToTestDB();\n }",
"public function getConnection() {\n return Database::instance();\n }",
"public function getConnection()\n {\n $eManager = $this->getServiceLocator();\n $entityManager = $eManager->get('doctObjMngr');\n return $entityManager;\n }",
"public function getDbConnection()\n\t{\n\t\treturn parent::getDbConnection();\n\t}",
"protected function getDbal_Tools_FactoryService()\n {\n return $this->services['dbal.tools.factory'] = new \\phpbb\\db\\tools\\factory();\n }",
"public static function getConnectionResolver();",
"public static function getConnection(){\n if (self::$_instance === null){\n self::$_instance = new DB();\n }\n return self::$_instance;\n }",
"final public function getConnection()\n {\n if ($this->conn === null) {\n if (self::$pdo == null) {\n \t$dsn = $this->CI->db->dbdriver.':dbname='.$this->CI->db->database.';host='.$this->CI->db->hostname;\n self::$pdo = new PDO($dsn,$this->CI->db->username, $this->CI->db->password);\n }\n $this->conn = $this->createDefaultDBConnection(self::$pdo, $this->CI->db->database);\n }\n\n return $this->conn;\n }",
"public static function getConnection(){\n return static::$db;\n }",
"protected function getConfigConnection(): Connection\n {\n return \\DB::connection('config_connection');\n }",
"protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }",
"protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }",
"public static function get_connection() {\n if (static::$instance === null) {\n static::$instance = new Database;\n }\n return static::$instance->db_handle;\n\t}",
"protected function _getConnection()\n {\n if (!self::$_dbConnection) {\n $config = app::getConfig('db');\n $mysqli = new mysqli($config['host'], $config['user'], $config['pass'], $config['db']);\n if ($mysqli->connect_errno) {\n self::$_dbConnection = FALSE;\n app::log($mysqli->errno . ' - ' . $mysqli->error, app::LOG_LEVEL_ERROR);\n } else {\n self::$_dbConnection = $mysqli;\n }\n }\n return self::$_dbConnection;\n }",
"public function getConnection()\n {\n return $this->db;\n }",
"public function getConnection()\n\t{\n\t\treturn static::$instances[$this->_instance];\n\t}",
"public final function getConnection() {\n\t\t// if the connection hasn't been established, create it\n\t\tif($this->connection === null) {\n\t\t\t// connect to mySQL and provide the interface to PHPUnit\n\n\n\t\t\t$secrets = new \\Secrets(\"/etc/apache2/capstone-mysql/busters.ini\");\n\t\t\t$pdo = $secrets->getPdoObject();\n\t\t\t$this->connection = $this->createDefaultDBConnection($pdo, $secrets->getDatabase());\n\t\t}\n\t\treturn($this->connection);\n\t}",
"public function getConnection(){\n return $this->dbConnection;\n }",
"private function getDbConnection()\n {\n $config = $this->config;\n $connectionParams = array(\n 'path' => $this->appRoot . '/vpu.db',\n 'driver' => $config['config']['database']['driver']\n );\n return DriverManager::getConnection($connectionParams, new Configuration());\n }",
"public function getConnection()\n {\n return parent::getConnection();\n }"
] | [
"0.7696066",
"0.7554053",
"0.7129665",
"0.68138146",
"0.6775207",
"0.6718847",
"0.6718172",
"0.6692915",
"0.6646955",
"0.6597594",
"0.65972865",
"0.6595268",
"0.6595268",
"0.65097743",
"0.6505646",
"0.65036124",
"0.65036124",
"0.6482762",
"0.6459367",
"0.6436997",
"0.64220536",
"0.6415463",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408783",
"0.6408768",
"0.6408768",
"0.6408768",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.640874",
"0.64078534",
"0.64078534",
"0.6402538",
"0.6386469",
"0.6382753",
"0.6380939",
"0.63644546",
"0.636117",
"0.6360872",
"0.6351033",
"0.63415056",
"0.6338319",
"0.63365895",
"0.63365895",
"0.63306457",
"0.632885",
"0.63286144",
"0.63122934",
"0.63056284",
"0.62919134",
"0.62895024",
"0.6285823",
"0.6278708",
"0.6263546",
"0.6244815",
"0.62442917",
"0.6240743",
"0.62398523",
"0.62388295",
"0.62380385",
"0.6225248",
"0.62129194",
"0.62056506",
"0.6204539",
"0.6204539",
"0.6199809",
"0.61835194",
"0.6175793",
"0.61745274",
"0.6172145",
"0.61697596",
"0.61667144",
"0.6165527"
] | 0.80488616 | 1 |
Gets the private 'doctrine.orm.default_entity_listener_resolver' shared service. | protected function getDoctrine_Orm_DefaultEntityListenerResolverService()
{
return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \Doctrine\Bundle\DoctrineBundle\Mapping\ContainerAwareEntityListenerResolver($this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Gedmo\\Tree\\TreeListener();\n $b->setAnnotationReader($a);\n\n $c = new \\Knp\\DoctrineBehaviors\\Reflection\\ClassAnalyzer();\n\n $d = new \\Gedmo\\Sluggable\\SluggableListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($b);\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sluggable\\SluggableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sluggable\\\\Sluggable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\TranslatableSubscriber($c, new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\CurrentLocaleCallable($this), new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\DefaultLocaleCallable('en'), 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translatable', 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translation', 'LAZY', 'LAZY'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggableSubscriber($c, true, new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggerCallable($this->get('logger'))));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Geocodable\\GeocodableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Geocodable\\\\Geocodable', NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sortable\\SortableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sortable\\\\Sortable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\BlameableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Blameable\\\\Blameable', new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\UserCallable($this), NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Tree\\TreeSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Tree\\\\Node'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Timestampable\\TimestampableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Timestampable\\\\Timestampable', 'datetime'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\SoftDeletable\\SoftDeletableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\SoftDeletable\\\\SoftDeletable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber($this->get('victoire_view_reference.event_subscriber'));\n $f->addEventSubscriber($this->get('victoire_core.widget_discriminator_map.subscriber'));\n $f->addEventSubscriber(new \\FOS\\UserBundle\\Doctrine\\UserListener(${($_ = isset($this->services['fos_user.util.password_updater']) ? $this->services['fos_user.util.password_updater'] : $this->getFosUser_Util_PasswordUpdaterService()) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.canonical_fields_updater']) ? $this->services['fos_user.util.canonical_fields_updater'] : $this->getFosUser_Util_CanonicalFieldsUpdaterService()) && false ?: '_'}));\n $f->addEventSubscriber($this->get('victoire_core.widget_subscriber'));\n $f->addEventSubscriber($this->get('victoire_business_entity.business_entity_subscriber'));\n $f->addEventSubscriber($this->get('victoire_analytics.browser_event.subscriber'));\n $f->addEventSubscriber($this->get('page.subscriber'));\n $f->addEventSubscriber($this->get('victoire_blog.article.subscriber'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('victoire_core.entity_proxy.subscriber'));\n $f->addEventListener(array(0 => 'prePersist', 1 => 'preUpdate', 2 => 'postPersist', 3 => 'postUpdate', 4 => 'preRemove'), $this->get('victoire_media.listener.doctrine'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.default_listeners.attach_entity_listeners'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'db', 'port' => NULL, 'dbname' => 'victoire', 'user' => 'victoire', 'password' => 'victoire', 'charset' => 'UTF8', 'driverOptions' => array(), 'defaultTableOptions' => array()), new \\Doctrine\\DBAL\\Configuration(), $f, array());\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getEntityResolver()\n {\n return \\Yii::createObject('app\\modules\\queue\\components\\interfaces\\EntityResolverInterface');\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }",
"protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public function resolver() {\n return $this->resolver;\n }",
"protected function getVictoire_WidgetFilter_Blog_Set_Default_Values_Form_ListenerService()\n {\n return $this->services['victoire.widget_filter.blog.set.default.values.form.listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleFilterDefaultValuesListener($this->get('doctrine.orm.default_entity_manager'));\n }",
"protected function getLiipImagine_Cache_Resolver_DefaultService()\n {\n return $this->services['liip_imagine.cache.resolver.default'] = new \\Liip\\ImagineBundle\\Imagine\\Cache\\Resolver\\WebPathResolver($this->get('filesystem'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ($this->targetDirs[3].'/app/../web'), 'media/cache');\n }",
"protected function getRouting_DelegatedLoaderService()\n {\n return $this->services['routing.delegated_loader'] = new \\Symfony\\Component\\Config\\Loader\\DelegatingLoader(${($_ = isset($this->services['routing.resolver']) ? $this->services['routing.resolver'] : $this->getRouting_ResolverService()) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"protected function getVictoireMedia_Listener_DoctrineService()\n {\n return $this->services['victoire_media.listener.doctrine'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\DoctrineMediaListener($this->get('victoire_media.media_manager'));\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsformsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translationsforms'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsFormsListener();\n }",
"public static function getDatasourceResolver()\n {\n return static::$resolver;\n }",
"protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }",
"private function getManagerServiceId()\n {\n return 'doctrine.orm.entity_manager';\n }",
"protected function getRouting_ResolverService()\n {\n return $this->services['routing.resolver'] = new \\phpbb\\routing\\loader_resolver(${($_ = isset($this->services['routing.loader.collection']) ? $this->services['routing.loader.collection'] : $this->getRouting_Loader_CollectionService()) && false ?: '_'});\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->services['translation.loader.csv'] = new \\Symfony\\Component\\Translation\\Loader\\CsvFileLoader()) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader()) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader()) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->services['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader()) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader()) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader()) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader()) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->services['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader()) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader()) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader()) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader()) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\Formatter\\MessageFormatter(new \\Symfony\\Component\\Translation\\MessageSelector()), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"public function getDefaultManagerName()\n {\n return $this->entityManager;\n }",
"public function getConfigListener()\n {\n if (!$this->configListener instanceof ConfigMerger) {\n $this->setConfigListener(new ConfigListener($this->getOptions()));\n }\n return $this->configListener;\n }",
"public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsListener($this->get('a2lix_translation_form.default.service.translation'));\n }",
"protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public function getResolver()\n {\n }",
"protected function getDoctrine_Orm_ValidatorInitializerService()\n {\n return $this->services['doctrine.orm.validator_initializer'] = new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer($this->get('doctrine'));\n }",
"public function getAggregateResolver()\n {\n return $this->aggregateResolver;\n }",
"public function getAggregateResolver()\n {\n return $this->aggregateResolver;\n }",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getEventManager()\n {\n Deprecation::triggerIfCalledFromOutside(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/issues/5784',\n '%s is deprecated.',\n __METHOD__,\n );\n\n return $this->_eventManager;\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"public static function getConnectionResolver()\n {\n return static::$resolver;\n }",
"public static function getConnectionResolver()\n {\n return static::$resolver;\n }",
"public function getEventsManager(): ?ManagerInterface;",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"public function createDefaultAnnotationManager()\n {\n $annotationManager = new AnnotationManager;\n $parser = new GenericAnnotationParser();\n $parser->registerAnnotation(new Annotation\\Inject());\n $annotationManager->attach($parser);\n\n return $annotationManager;\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}",
"private function getStockResolverService(): ?StockResolverInterface\n {\n try {\n $stockResolver = $this->objectManager->get(StockResolverInterface::class);\n } catch (Throwable $e) {\n $stockResolver = null;\n }\n return $stockResolver;\n }",
"protected function getResolveControllerNameSubscriberService()\n {\n return $this->services['resolve_controller_name_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'});\n }",
"public function getEntityManager()\n {\n if (null === $this->em) {\n $this->em = $this->getServiceLocator()\n ->get('doctrine.entitymanager.orm_default');\n }\n return $this->em;\n }",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"protected function getStofDoctrineExtensions_Uploadable_ManagerService()\n {\n $a = new \\Gedmo\\Uploadable\\UploadableListener(new \\Stof\\DoctrineExtensionsBundle\\Uploadable\\MimeTypeGuesserAdapter());\n $a->setAnnotationReader($this->get('annotation_reader'));\n $a->setDefaultFileInfoClass('Stof\\\\DoctrineExtensionsBundle\\\\Uploadable\\\\UploadedFileInfo');\n\n return $this->services['stof_doctrine_extensions.uploadable.manager'] = new \\Stof\\DoctrineExtensionsBundle\\Uploadable\\UploadableManager($a, 'Stof\\\\DoctrineExtensionsBundle\\\\Uploadable\\\\UploadedFileInfo');\n }",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }",
"public function getConnectionResolver()\n {\n return $this->resolver;\n }",
"public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function _getServTranslator()\n {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public function resolveTransportManager()\n {\n if ($this->app->has('mail.manager')) {\n return $this->app['mail.manager'];\n }\n\n return $this->app['swift.transport'];\n }",
"protected function getFosUser_Listener_AuthenticationService()\n {\n return $this->services['fos_user.listener.authentication'] = new \\FOS\\UserBundle\\EventListener\\AuthenticationListener($this->get('fos_user.security.login_manager'), 'main');\n }",
"protected function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"public function getServiceManager()\r\n\t{\r\n\t\treturn $this->serviceManager;\r\n\t}",
"public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}",
"public function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n if ($lazyLoad) {\n\n return $this->services['doctrine.orm.default_entity_manager'] = DoctrineORMEntityManager_00000000428690af0000000049de23ef3bf08b917554782eb259376febf5d820::staticProxyConstructor(\n function (&$wrappedInstance, \\ProxyManager\\Proxy\\LazyLoadingInterface $proxy) {\n $wrappedInstance = $this->getDoctrine_Orm_DefaultEntityManagerService(false);\n\n $proxy->setProxyInitializer(null);\n\n return true;\n }\n );\n }\n\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/AnalyticsBundle/Entity'), 1 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Entity'), 2 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Entity'), 3 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Entity'), 4 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Entity'), 5 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Entity'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Entity'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Entity'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Entity'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/QueryBundle/Entity'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Entity'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Entity'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle/Entity'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Entity'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Entity'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetMapBundle/Entity')));\n\n $c = new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/config/doctrine-mapping') => 'FOS\\\\UserBundle\\\\Model'), '.orm.xml')), 'FOS\\\\UserBundle\\\\Model');\n\n $d = new \\Doctrine\\ORM\\Configuration();\n $d->setEntityNamespaces(array('VictoireAnalyticsBundle' => 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity', 'VictoireBlogBundle' => 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity', 'VictoireBusinessEntityBundle' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity', 'VictoireBusinessPageBundle' => 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity', 'VictoireCoreBundle' => 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity', 'VictoireCriteriaBundle' => 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity', 'VictoireI18nBundle' => 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity', 'VictoireMediaBundle' => 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity', 'VictoirePageBundle' => 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity', 'VictoireQueryBundle' => 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity', 'VictoireSeoBundle' => 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity', 'VictoireTemplateBundle' => 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity', 'VictoireTwigBundle' => 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity', 'VictoireUserBundle' => 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity', 'VictoireWidgetBundle' => 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity', 'VictoireWidgetMapBundle' => 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity'));\n $d->setMetadataCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_metadata_cache'));\n $d->setQueryCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_query_cache'));\n $d->setResultCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_result_cache'));\n $d->setMetadataDriverImpl($c);\n $d->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $d->setProxyNamespace('Proxies');\n $d->setAutoGenerateProxyClasses(false);\n $d->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $d->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $d->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy());\n $d->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $d->setEntityListenerResolver($this->get('doctrine.orm.default_entity_listener_resolver'));\n\n $instance = \\Doctrine\\ORM\\EntityManager::create($this->get('doctrine.dbal.default_connection'), $d);\n\n $this->get('doctrine.orm.default_manager_configurator')->configure($instance);\n\n return $instance;\n }",
"protected function getConfigResolver()\n {\n if (is_null($this->configResolver) === false) {\n return $this->configResolver;\n }\n\n $resolver = new AttributesResolver();\n $resolver->setDefault('host', '0.0.0.0', 'string', true)\n ->setDefault('port', 4000, 'integer', true)\n ->setValidator('port', function ($value) {\n return $value >= 0;\n })\n ->setDefault('server_watch_ext', ['html'], 'array', true)\n ->setDefault('parsedown_activated', false, 'bool', true);\n\n $this->configResolver = $resolver;\n\n return $this->configResolver;\n }",
"private function getEventManager()\n {\n return $this->container->get('event_manager');\n }",
"public function getManager() {\n return $this->em;\n }",
"final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}",
"public function getEventsManager()\n {\n return $this->eventsManager;\n }",
"protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}",
"public final function getModuleDoctrineService(): DoctrineService\n {\n return $this->moduleDoctrineService;\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => false, 'resource_files' => array('sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sr_Latn.yml')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pl.yml')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.he.yml')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ro.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ro.yml')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.et.yml')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fa.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fa.yml')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ar.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ar.yml')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.th.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.th.yml')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ru.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ru.yml')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sv.yml')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.da.yml')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fi.yml')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lb.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.zh_CN.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.zh_CN.yml')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.nl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nl.yml')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.fr.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fr.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fr.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.fr.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.fr.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.fr.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.fr.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.fr.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.fr.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.fr.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.fr.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.fr.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.fr.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.fr.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/messages.fr.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.fr.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.fr.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.fr.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.fr.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/messages.fr.xlf'), 23 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.fr.xliff'), 24 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.fr.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf')), 'af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.af.yml')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hr.yml')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.tr.yml')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.en.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.en.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.en.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.en.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.en.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.en.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.en.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.en.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.en.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.en.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.en.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.en.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.en.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.en.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.en.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.en.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.en.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.en.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.en.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.en.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lv.yml')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf'), 2 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pt.xliff'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt.yml')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ca.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ca.yml')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lt.yml')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.id.yml')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eu.yml')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bg.yml')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ja.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ja.yml')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sl.yml')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.uk.yml')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.cs.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.cs.yml')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.el.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.el.yml')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.vi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.vi.yml')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.de.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.de.yml')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.it.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.it.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.it.yml')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sk.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sk.yml')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hu.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hu.yml')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.es.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.es.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.es.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.es.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.es.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.es.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.es.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.es.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.es.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.es.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.es.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.es.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.es.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.es.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.es.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.es.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.es.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.es.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.es.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.es.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt_BR.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt_BR.yml')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf')), 'ky' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ky.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ky.yml')), 'eo' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eo.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eo.yml')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nb.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nb.yml')))), array());\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }",
"public function getLoader()\n {\n if ('file' === $this->source) {\n return new DefinitionManagerFileLoader($this->container, $this->definitionFile);\n } else {\n return new DefinitionManagerDoctrineLoader($this->container, $this->emName);\n }\n }"
] | [
"0.6966117",
"0.6966117",
"0.6498643",
"0.63196063",
"0.62522846",
"0.61482424",
"0.60225236",
"0.59778345",
"0.5947468",
"0.5942576",
"0.5942576",
"0.5940109",
"0.57047516",
"0.5683288",
"0.5628644",
"0.56167156",
"0.55560815",
"0.5549502",
"0.55389035",
"0.55319613",
"0.55266184",
"0.55062425",
"0.5471043",
"0.5469063",
"0.5461043",
"0.5441814",
"0.5426334",
"0.53974545",
"0.53880525",
"0.5386834",
"0.538169",
"0.53622735",
"0.53557336",
"0.5347704",
"0.5336865",
"0.5334159",
"0.53141654",
"0.53076136",
"0.52930796",
"0.5251341",
"0.52511424",
"0.52331597",
"0.52331597",
"0.52207345",
"0.5192515",
"0.51861066",
"0.51763666",
"0.51763666",
"0.51664317",
"0.51664317",
"0.5158522",
"0.5146464",
"0.51418364",
"0.5141229",
"0.5135523",
"0.513434",
"0.51329106",
"0.5117466",
"0.5099043",
"0.5095638",
"0.50951684",
"0.5093768",
"0.5091197",
"0.5071386",
"0.50665927",
"0.5064548",
"0.50613874",
"0.5060011",
"0.5060011",
"0.5060011",
"0.5060011",
"0.5060011",
"0.5060011",
"0.5060011",
"0.5058543",
"0.5057455",
"0.505669",
"0.5046075",
"0.5043244",
"0.504245",
"0.5040376",
"0.5040376",
"0.503702",
"0.50359046",
"0.5030842",
"0.5018876",
"0.50106",
"0.5007783",
"0.49953622",
"0.49877656",
"0.49803254",
"0.49802503",
"0.49786654",
"0.49732322",
"0.49652818",
"0.496295",
"0.49621224",
"0.49570972",
"0.4954641"
] | 0.85726523 | 1 |
Gets the private 'doctrine.orm.default_listeners.attach_entity_listeners' shared service. | protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()
{
return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \Doctrine\ORM\Tools\AttachEntityListenersListener();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Gedmo\\Tree\\TreeListener();\n $b->setAnnotationReader($a);\n\n $c = new \\Knp\\DoctrineBehaviors\\Reflection\\ClassAnalyzer();\n\n $d = new \\Gedmo\\Sluggable\\SluggableListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($b);\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sluggable\\SluggableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sluggable\\\\Sluggable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\TranslatableSubscriber($c, new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\CurrentLocaleCallable($this), new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\DefaultLocaleCallable('en'), 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translatable', 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translation', 'LAZY', 'LAZY'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggableSubscriber($c, true, new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggerCallable($this->get('logger'))));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Geocodable\\GeocodableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Geocodable\\\\Geocodable', NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sortable\\SortableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sortable\\\\Sortable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\BlameableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Blameable\\\\Blameable', new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\UserCallable($this), NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Tree\\TreeSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Tree\\\\Node'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Timestampable\\TimestampableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Timestampable\\\\Timestampable', 'datetime'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\SoftDeletable\\SoftDeletableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\SoftDeletable\\\\SoftDeletable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber($this->get('victoire_view_reference.event_subscriber'));\n $f->addEventSubscriber($this->get('victoire_core.widget_discriminator_map.subscriber'));\n $f->addEventSubscriber(new \\FOS\\UserBundle\\Doctrine\\UserListener(${($_ = isset($this->services['fos_user.util.password_updater']) ? $this->services['fos_user.util.password_updater'] : $this->getFosUser_Util_PasswordUpdaterService()) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.canonical_fields_updater']) ? $this->services['fos_user.util.canonical_fields_updater'] : $this->getFosUser_Util_CanonicalFieldsUpdaterService()) && false ?: '_'}));\n $f->addEventSubscriber($this->get('victoire_core.widget_subscriber'));\n $f->addEventSubscriber($this->get('victoire_business_entity.business_entity_subscriber'));\n $f->addEventSubscriber($this->get('victoire_analytics.browser_event.subscriber'));\n $f->addEventSubscriber($this->get('page.subscriber'));\n $f->addEventSubscriber($this->get('victoire_blog.article.subscriber'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('victoire_core.entity_proxy.subscriber'));\n $f->addEventListener(array(0 => 'prePersist', 1 => 'preUpdate', 2 => 'postPersist', 3 => 'postUpdate', 4 => 'preRemove'), $this->get('victoire_media.listener.doctrine'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.default_listeners.attach_entity_listeners'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'db', 'port' => NULL, 'dbname' => 'victoire', 'user' => 'victoire', 'password' => 'victoire', 'charset' => 'UTF8', 'driverOptions' => array(), 'defaultTableOptions' => array()), new \\Doctrine\\DBAL\\Configuration(), $f, array());\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"public function getEventsManager()\n {\n return $this->eventsManager;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getVictoire_WidgetFilter_Blog_Set_Default_Values_Form_ListenerService()\n {\n return $this->services['victoire.widget_filter.blog.set.default.values.form.listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\ArticleFilterDefaultValuesListener($this->get('doctrine.orm.default_entity_manager'));\n }",
"public function getConfigListener()\n {\n if (!$this->configListener instanceof ConfigMerger) {\n $this->setConfigListener(new ConfigListener($this->getOptions()));\n }\n return $this->configListener;\n }",
"protected function getVictoireMedia_Listener_DoctrineService()\n {\n return $this->services['victoire_media.listener.doctrine'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\DoctrineMediaListener($this->get('victoire_media.media_manager'));\n }",
"public function attach(EventManagerInterface $eventManager, $priority = 100)\n {\n $shared = $eventManager->getSharedManager();\n $this->listeners[] = '???';\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function getListeners() : array\n {\n return Event::$listeners;\n }",
"public function attachDefaultListeners()\n {\n parent::attachDefaultListeners();\n\n $serviceLocator = $this->serviceLocator;\n $defaultServices = $serviceLocator->get('DefaultListeners');\n $events = $this->getEventManager();\n $events->attach($defaultServices);\n\n return $this;\n }",
"public function getListeners()\n {\n return $this->listeners;\n }",
"public function getListeners()\n {\n return $this->listeners;\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}",
"public function getSubscribedEvents(): array\n {\n return [\n DoctrineEvents::prePersist\n ];\n }",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"public function getListenersConfig()\n {\n return $this->listenersConfig;\n }",
"protected function getEventsManager() {}",
"public function getEventManager()\n {\n Deprecation::triggerIfCalledFromOutside(\n 'doctrine/dbal',\n 'https://github.com/doctrine/dbal/issues/5784',\n '%s is deprecated.',\n __METHOD__,\n );\n\n return $this->_eventManager;\n }",
"function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function getStofDoctrineExtensions_Uploadable_ManagerService()\n {\n $a = new \\Gedmo\\Uploadable\\UploadableListener(new \\Stof\\DoctrineExtensionsBundle\\Uploadable\\MimeTypeGuesserAdapter());\n $a->setAnnotationReader($this->get('annotation_reader'));\n $a->setDefaultFileInfoClass('Stof\\\\DoctrineExtensionsBundle\\\\Uploadable\\\\UploadedFileInfo');\n\n return $this->services['stof_doctrine_extensions.uploadable.manager'] = new \\Stof\\DoctrineExtensionsBundle\\Uploadable\\UploadableManager($a, 'Stof\\\\DoctrineExtensionsBundle\\\\Uploadable\\\\UploadedFileInfo');\n }",
"private function getApplicationLoadListeners()\n {\n return $this->applicationLoaderListeners;\n }",
"protected function getSwiftmailer_Mailer_Default_Transport_EventdispatcherService()\n {\n return $this->services['swiftmailer.mailer.default.transport.eventdispatcher'] = new \\Swift_Events_SimpleEventDispatcher();\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"public function hookManager()\n {\n return $this->hookManager;\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"public function getEventsManager(): ?ManagerInterface;",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getListeners(): array;",
"public function getEventsManager() : ManagerInterface;",
"protected function getEventLogger()\n {\n $event_manager = new EventsManager;\n\n $event_manager->attach($this->alias, function ($event, $conn) {\n if ($event->getType() == 'beforeQuery') {\n $logging_name = 'db';\n\n if (logging_extension()) {\n $logging_name = 'db-'.logging_extension();\n }\n\n $logger = new Logger('DB');\n $logger->pushHandler(\n new StreamHandler(\n storage_path('logs').'/'.$logging_name.'.log',\n Logger::INFO\n )\n );\n\n $variables = $conn->getSQLVariables();\n\n if ($variables) {\n $logger->info(\n $conn->getSQLStatement().\n ' ['.implode(',', $variables).']'\n );\n } else {\n $logger->info($conn->getSQLStatement());\n }\n }\n });\n\n return $event_manager;\n }",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function attachListeners($services, $eventManager, $listeners)\n {\n $lazyListeners = [];\n\n foreach ($listeners as $name => $options) {\n $options = $this->normalizeListenerOptions($name, $options);\n\n if ($options['lazy'] && null !== $options['attach']) {\n foreach ($options['attach'] as $spec) {\n $lazyListeners[] = [\n 'service' => $options['service'],\n 'event' => $spec['event'],\n 'method' => $spec['method'],\n 'priority' => $spec['priority'],\n ];\n }\n continue;\n }\n\n if ($services->has($options['service'])) {\n $listener = $services->get($options['service']);\n } elseif (class_exists($options['service'], true)) {\n $listener = new $options['service']();\n } else {\n throw new \\UnexpectedValueException(sprintf(\n 'Class or service %s does not exists. Cannot create listener instance.',\n $options['service']\n ));\n }\n\n if ($listener instanceof ListenerAggregateInterface) {\n $listener->attach($eventManager, $options['priority']);\n continue;\n }\n\n foreach ($options['attach'] as $spec) {\n $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener;\n $eventManager->attach($spec['event'], $callback, $spec['priority']);\n }\n }\n\n if (!empty($lazyListeners)) {\n /* @var \\Core\\Listener\\DeferredListenerAggregate $aggregate */\n $aggregate = $services->get('Core/Listener/DeferredListenerAggregate');\n $aggregate->setListeners($lazyListeners)\n ->attach($eventManager);\n }\n }",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getSubscribedEvents()\n {\n return array(\n 'postPersist',\n \t'postFlush',\n 'onFlush'\n );\n }",
"public function getEventListeners()\n {\n return $this->eventListeners;\n }",
"public function getSubscribedEvents()\n {\n return array(self::prePersist);\n }",
"public function getManager() {\n return $this->em;\n }",
"private function getEventManager()\n {\n return $this->container->get('event_manager');\n }",
"public function getEventManager()\n {\n return $this->eventManager;\n }",
"public function getEventManager()\n {\n return $this->eventManager;\n }",
"public function attach(EventManagerInterface $events)\n {\n $this->listeners[] = $events->attach('get.pre', array($this, 'load'), 100);\n $this->listeners[] = $events->attach('get.post', array($this, 'save'), -100);\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getFosUser_Security_InteractiveLoginListenerService()\n {\n return $this->services['fos_user.security.interactive_login_listener'] = new \\FOS\\UserBundle\\EventListener\\LastLoginListener($this->get('fos_user.user_manager'));\n }",
"private function getManagerServiceId()\n {\n return 'doctrine.orm.entity_manager';\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function getEntityManager()\n {\n return $this['orm.em'];\n }",
"protected function getExt_ManagerService()\n {\n return $this->services['ext.manager'] = new \\phpbb\\extension\\manager($this, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, 'phpbb_ext', './../', 'php', ${($_ = isset($this->services['cache']) ? $this->services['cache'] : $this->getCacheService()) && false ?: '_'});\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"public function getEntityManager()\n {\n if (null === $this->em) {\n $this->em = $this->getServiceLocator()\n ->get('doctrine.entitymanager.orm_default');\n }\n return $this->em;\n }",
"protected function getVictoireBlog_BlogMenuListenerService()\n {\n return $this->services['victoire_blog.blog_menu_listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\BlogMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getEntityManager()\n {\n return $this->em;\n }",
"public function getEventManager()\n {\n if (is_null($this->_events)) {\n $container = ContainerBuilder::buildContainer(\n [\n 'DefaultEventManager' => Definition::object(\n 'Zend\\EventManager\\SharedEventManager'\n )\n ]\n );\n $sharedEvents = $container->get('DefaultEventManager');\n $events = new EventManager();\n $events->setSharedManager($sharedEvents);\n $this->setEventManager($events);\n }\n return $this->_events;\n }",
"public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}",
"protected function getEntityManager()\n {\n return $this->em;\n }",
"public static function getApplicableListener(): array;",
"protected function getEM() {\n return $this->getDoctrine()->getEntityManager();\n }",
"public function getEntityManager()\r\n {\r\n if (null === $this->em) {\r\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager') ;\r\n }\r\n return $this->em;\r\n }",
"public function getSubscribedEvents()\n {\n return array(\n 'prePersist',\n 'preUpdate',\n 'loadClassMetadata'\n );\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"protected function getTwig_ExceptionListenerService()\n {\n return $this->services['twig.exception_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener('twig.controller.exception:showAction', $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}",
"protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine.orm.entity_manager');\n }",
"public function getEvents()\n {\n return $this->eventListeners;\n }",
"public function getSubscribedEvents()\n {\n return [\n 'onFlush',\n 'postPersist',\n ];\n }",
"public function attach(EventManagerInterface $events)\n {\n $this->listeners[] = $events->attach('blog.model.post.save', array($this, 'onPostSave'));\n $this->listeners[] = $events->attach('blog.model.post.create', array($this, 'onPostSave'));\n }",
"public function getDirectValueAnnotationsManager(): Annotations\\IDirectValueAnnotationsManager\n {\n return $this->annotationsManager;\n }",
"public function getEventManager()\n {\n return $this->events;\n }",
"public function getEntityManager(){\n return $this->entityManager;\n }",
"protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine')->getManager();\n }",
"public function getEntityManager()\n\t{\n\t\treturn $this->em;\n\t}",
"public function onEntityAttach(IEntity $entity): void;",
"protected function attachDefaultListeners()\r\n {\r\n $events = $this->events();\r\n $events->attach('restrictAccess', array($this, '_restrictAccess'));\r\n }",
"public function getEvent()\n {\n return $this->getServiceLocator()->get('Application')->getEventManager();\n }",
"protected function getEntityManager()\n {\n return $this->entityManager;\n }",
"public function getSubscribedEvents(): array\n {\n return [\n Events::prePersist,\n ];\n }",
"public function getEntityManager()\n {\n return $this->entityManager;\n }",
"public function getEntityManager()\n {\n return $this->entityManager;\n }",
"public function attach(EventManagerInterface $events)\n {\n $sm = $this->getServiceManager();\n $em = $this->getEventManager();\n $shared = $em->getSharedManager();\n \n $this->listeners = array(\n $shared->attach(\n 'Zend\\Mvc\\Application', \n MvcEvent::EVENT_BOOTSTRAP, \n array($this, 'logout'), \n 1000002\n ),\n $shared->attach(\n 'Zend\\Mvc\\Application', \n MvcEvent::EVENT_BOOTSTRAP, \n array($this, 'authenticateRequest'), \n 1000001\n ),\n $shared->attach(\n 'Zend\\Mvc\\Application', \n MvcEvent::EVENT_BOOTSTRAP, \n array($this, 'prepareAuthorise'), \n 1000000\n ),\n $shared->attach(\n 'Zend\\Mvc\\Application', \n MvcEvent::EVENT_ROUTE, \n array($this, 'authoriseRoute')\n ),\n $shared->attach(\n 'Zend\\Mvc\\Application', \n MvcEvent::EVENT_DISPATCH,\n array($this, 'authoriseModule'),\n 10\n ),\n $shared->attach(\n 'Zend\\View\\View', \n ViewEvent::EVENT_RENDERER, \n array($this, 'updateView')\n ),\n $shared->attach(\n 'ZucchiSecurity',\n SecurityEvent::EVENT_AUTHENTICATE, \n array($this, 'doLocalAuthentication')\n ),\n $shared->attach(\n 'ZucchiSecurity',\n SecurityEvent::EVENT_LOGIN_FORM_BUILD, \n array('ZucchiSecurity\\Authentication\\Plugin\\Local', 'extendLoginForm')\n ),\n $shared->attach(\n 'ZucchiSecurity',\n SecurityEvent::EVENT_LOGOUT_FORM_BUILD, \n array('ZucchiSecurity\\Authentication\\Plugin\\Local', 'extendLogoutForm')\n ),\n $shared->attach(\n 'ZucchiSecurity',\n SecurityEvent::EVENT_LOGIN_FORM_BUILD, \n array('ZucchiSecurity\\Authentication\\Plugin\\Captcha', 'extendLoginForm')\n ),\n );\n }",
"protected function getJmsSerializer_DoctrineProxySubscriberService()\n {\n return $this->services['jms_serializer.doctrine_proxy_subscriber'] = new \\JMS\\Serializer\\EventDispatcher\\Subscriber\\DoctrineProxySubscriber(false, true);\n }",
"public function getEntityManager()\n {\n if (null === $this->em)\n {\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n return $this->em;\n }",
"protected static function fencesTagManager() {\n return \\Drupal::service('fences.tag_manager');\n }",
"public function getSubscribedEvents()\n {\n return array(\n 'prePersist',\n 'preUpdate'\n );\n }"
] | [
"0.64334244",
"0.64334244",
"0.5869672",
"0.57529545",
"0.57149476",
"0.5712496",
"0.557874",
"0.55479974",
"0.5502006",
"0.549932",
"0.5481192",
"0.5437904",
"0.54050857",
"0.5402216",
"0.5402216",
"0.53823227",
"0.5362008",
"0.53454226",
"0.53084135",
"0.53084135",
"0.5254958",
"0.52536047",
"0.52525914",
"0.5251699",
"0.5228801",
"0.52105266",
"0.5209467",
"0.5203635",
"0.5197158",
"0.51825964",
"0.51803297",
"0.51686585",
"0.5156068",
"0.5138741",
"0.51372737",
"0.5120174",
"0.51134586",
"0.51113665",
"0.5108739",
"0.5104067",
"0.50946385",
"0.5080752",
"0.50777453",
"0.50711817",
"0.5067929",
"0.5067929",
"0.50678957",
"0.50604707",
"0.5056015",
"0.5037502",
"0.50303054",
"0.5027574",
"0.5024004",
"0.50214845",
"0.50214845",
"0.50153",
"0.50125813",
"0.50071025",
"0.5005647",
"0.50042313",
"0.49856585",
"0.4972294",
"0.49550608",
"0.49482977",
"0.49359798",
"0.49318397",
"0.49265438",
"0.49085465",
"0.49044845",
"0.49042094",
"0.49005815",
"0.48946512",
"0.488749",
"0.48862052",
"0.48803282",
"0.48697323",
"0.48439527",
"0.48427746",
"0.48419595",
"0.48316842",
"0.48308584",
"0.4825305",
"0.48241156",
"0.48126727",
"0.48063263",
"0.48054087",
"0.48024532",
"0.4797576",
"0.47897434",
"0.47843593",
"0.4782952",
"0.47828007",
"0.47795057",
"0.47795057",
"0.47789922",
"0.47765067",
"0.47743618",
"0.47698107",
"0.47691664"
] | 0.839687 | 1 |
Gets the private 'doctrine.orm.default_manager_configurator' shared service. | protected function getDoctrine_Orm_DefaultManagerConfiguratorService()
{
return $this->services['doctrine.orm.default_manager_configurator'] = new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator(array(), array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static protected function getConfigurationManager()\n\t{\n\t\tif (!is_null(static::$configurationManager)) {\n\t\t\treturn static::$configurationManager;\n\t\t}\n\t\t$objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n\t\t$configurationManager = $objectManager->get(ConfigurationManagerInterface::class);\n\t\tstatic::$configurationManager = $configurationManager;\n\t\treturn $configurationManager;\n\t}",
"public function getServiceConfiguration()\n {\n return array(\n 'aliases' => array(\n 'Doctrine\\ORM\\EntityManager' => 'doctrine.entitymanager.orm_default',\n ),\n 'factories' => array(\n 'DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder' => function($sm) {\n return new \\DoctrineORMModule\\Form\\Annotation\\AnnotationBuilder(\n $sm->get('doctrine.entitymanager.orm_default')\n );\n },\n 'doctrine.connection.orm_default' => new CommonService\\ConnectionFactory('orm_default'),\n 'doctrine.configuration.orm_default' => new ORMService\\ConfigurationFactory('orm_default'),\n 'doctrine.driver.orm_default' => new CommonService\\DriverFactory('orm_default'),\n 'doctrine.entitymanager.orm_default' => new ORMService\\EntityManagerFactory('orm_default'),\n 'doctrine.eventmanager.orm_default' => new CommonService\\EventManagerFactory('orm_default'),\n )\n );\n }",
"protected static function getConfigurationManager() {}",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }",
"public function getDefaultManagerName()\n {\n return $this->entityManager;\n }",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }",
"public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }",
"protected function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\r\n\t{\r\n\t\treturn $this->serviceManager;\r\n\t}",
"public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}",
"public function getServiceManager()\n {\n return $this->serviceManager->getServiceLocator();\n }",
"public function getConfigurator()\n {\n if ( ! $this->getContainer()->has(ConfiguratorInterface::class) ) {\n $this->getContainer()->share(ConfiguratorInterface::class, \\ArrayObject::class);\n }\n\n return $this->getContainer()->get(ConfiguratorInterface::class);\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }",
"public function getManager() {\n return $this->manager;\n }",
"public function getConfigurator();",
"private function getManagerServiceId()\n {\n return 'doctrine.orm.entity_manager';\n }",
"public function getManager()\n {\n return $this->manager;\n }",
"public function getManager()\n {\n return $this->manager;\n }",
"public function getManager()\n {\n return $this->manager;\n }",
"public function getServiceManager()\n {\n return $this->sm;\n }",
"protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }",
"protected function getManager()\n {\n return $this->manager;\n }",
"protected function getSecurity_Authentication_ManagerService()\n {\n $this->services['security.authentication.manager'] = $instance = new \\Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationProviderManager(array(0 => new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider(${($_ = isset($this->services['fos_user.user_provider.username']) ? $this->services['fos_user.user_provider.username'] : $this->getFosUser_UserProvider_UsernameService()) && false ?: '_'}, ${($_ = isset($this->services['security.user_checker']) ? $this->services['security.user_checker'] : $this->getSecurity_UserCheckerService()) && false ?: '_'}, 'main', $this->get('security.encoder_factory'), true), 1 => new \\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\AnonymousAuthenticationProvider('594831ac756863.97507592')), true);\n\n $instance->setEventDispatcher($this->get('event_dispatcher'));\n\n return $instance;\n }",
"function getConfiguredDefaultManager(&$input)\n {\n $defaultModule = SGL_Config::get('site.defaultModule');\n $defaultMgr = SGL_Config::get('site.defaultManager');\n\n // load default module's config if not present\n $c = &SGL_Config::singleton();\n $conf = $c->ensureModuleConfigLoaded($defaultModule);\n\n if (PEAR::isError($conf)) {\n SGL::raiseError('could not locate module\\'s config file',\n SGL_ERROR_NOFILE);\n return false;\n }\n\n $mgrName = SGL_Inflector::caseFix(\n SGL_Inflector::getManagerNameFromSimplifiedName($defaultMgr));\n $path = SGL_MOD_DIR .'/'.$defaultModule.'/classes/'.$mgrName.'.php';\n if (!is_file($path)) {\n SGL::raiseError('could not locate default manager, '.$path,\n SGL_ERROR_NOFILE);\n return false;\n }\n require_once $path;\n if (!class_exists($mgrName)) {\n SGL::raiseError('invalid class name for default manager',\n SGL_ERROR_NOCLASS);\n return false;\n }\n $mgr = new $mgrName();\n $input->moduleName = $defaultModule;\n $input->set('manager', $mgr);\n $req = $input->getRequest();\n $req->set('moduleName', $defaultModule);\n $req->set('managerName', $defaultMgr);\n\n if (SGL_Config::get('site.defaultParams')) {\n $aParams = SGL_Url::querystringArrayToHash(\n explode('/', SGL_Config::get('site.defaultParams')));\n $req->add($aParams);\n }\n $input->setRequest($req); // this ought to take care of itself\n return true;\n }",
"public function getDBManagerHandler(): DatabaseManager\n {\n if (empty($this->dbManager)) {\n $this->dbManager = new DatabaseManager(Config::get('database'), new ConnectionFactory());\n }\n return $this->dbManager;\n }",
"public static function getDefaultConfig() {\n return static::$defaultConfig;\n }",
"public function getOptionManager()\n {\n return $this->optionManager;\n }",
"protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }",
"public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }",
"public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }",
"public static function configurator(): ConfiguratorInterface\n {\n //====================================================================//\n // Configuration Array Already Exists\n //====================================================================//\n if (isset(self::core()->configurator)) {\n return self::core()->configurator;\n }\n\n //====================================================================//\n // Load Configurator Class Name from Configuration\n $className = self::configuration()->Configurator;\n //====================================================================//\n // No Configurator Defined\n if (!is_string($className) || empty($className)) {\n return new NullConfigurator();\n }\n //====================================================================//\n // Validate Configurator Class Name\n if (false == self::validate()->isValidConfigurator($className)) {\n return new NullConfigurator();\n }\n if (!class_exists($className) || !is_subclass_of($className, ConfiguratorInterface::class)) {\n return new NullConfigurator();\n }\n //====================================================================//\n // Initialize Configurator\n self::core()->configurator = new $className();\n\n return self::core()->configurator;\n }",
"public function getDoctrineConfig(): array\n {\n return [\n 'cache' => $this->getDoctrineCacheConfig(),\n\n //These authentication settings are a hack to tide things over until version 1.0\n //Normall doctrineModule should have no mention of odm or orm\n 'authentication' => [\n //default authentication options should be set in either the odm or orm modules\n 'odm_default' => [],\n 'orm_default' => [],\n ],\n 'authenticationadapter' => [\n 'odm_default' => true,\n 'orm_default' => true,\n ],\n 'authenticationstorage' => [\n 'odm_default' => true,\n 'orm_default' => true,\n ],\n 'authenticationservice' => [\n 'odm_default' => true,\n 'orm_default' => true,\n ],\n ];\n }",
"public static function getDefaultConfiguration()\n {\n if (is_null(self::$defaultConfiguration)) {\n self::$defaultConfiguration = new self();\n }\n return self::$defaultConfiguration;\n }",
"public function getDefaultConfiguration()\n {\n return $this->getProperty('default_configuration');\n }",
"public function createDefaultAnnotationManager()\n {\n $annotationManager = new AnnotationManager;\n $parser = new GenericAnnotationParser();\n $parser->registerAnnotation(new Annotation\\Inject());\n $annotationManager->attach($parser);\n\n return $annotationManager;\n }",
"protected function getMigrator_Tool_ConfigService()\n {\n return $this->services['migrator.tool.config'] = new \\phpbb\\db\\migration\\tool\\config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n }",
"public function getDatabaseManager(): DatabaseManager\n {\n return $this->manager;\n }",
"public function getDBManagerHandler()\n {\n\t\tif (empty($this->dbManager)) {\n\t\t\t$this->dbManager = new DatabaseManager($this->config['database'], new ConnectionFactory());\n\t\t}\n\t\treturn $this->dbManager;\n\t}",
"public final function getModuleDoctrineService(): DoctrineService\n {\n return $this->moduleDoctrineService;\n }",
"protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }",
"protected function getObjectManagerFromConfig(ServiceLocatorInterface $serviceManager)\n {\n if ($serviceManager->has('Matryoshka\\Model\\Object\\ObjectManager')) {\n return $serviceManager->get('Matryoshka\\Model\\Object\\ObjectManager');\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to obtain instance of \"%s\"',\n 'Matryoshka\\Model\\Object\\ObjectManager'\n )\n );\n }",
"public function getObjectManager(): mixed\n {\n return $this->objectManager;\n }",
"public static function getConfigInstance()\n {\n if (!static::$config) {\n static::$config = new Config\\NativeConfig;\n }\n\n return static::$config;\n }",
"protected function getDoctrine_Orm_DefaultEntityManager_PropertyInfoExtractorService()\n {\n return $this->services['doctrine.orm.default_entity_manager.property_info_extractor'] = new \\Symfony\\Bridge\\Doctrine\\PropertyInfo\\DoctrineExtractor($this->get('doctrine.orm.default_entity_manager')->getMetadataFactory());\n }",
"protected function getConfigService()\n {\n return $this->services['config'] = new \\phpbb\\config\\db(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, 'phpbb_config');\n }",
"protected function getManagerFactory()\n {\n return $this->container->get(ThuataControllerInterface::MANAGER_FACTORY_ID);\n }",
"public function getServiceLocator()\n {\n if (empty($this->serviceLocator)) {\n $class = $this->defaultServiceLocator;\n $this->serviceLocator = new $class();\n }\n\n return $this->serviceLocator;\n }",
"public function getDefaultManagerName()\n {\n // TODO: Implement getDefaultManagerName() method.\n }",
"public function getManager() {\n return $this->em;\n }",
"protected function getEntityManagerConfig()\n {\n $config = new \\Doctrine\\ORM\\Configuration();\n\n $config->setProxyDir(TESTS_TEMP_DIR . '/proxy');\n $config->setProxyNamespace('Proxy');\n $config->setAutoGenerateProxyClasses(true);\n $config->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');\n $config->setMetadataDriverImpl(new AnnotationDriver($_ENV['annotation_reader']));\n $config->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');\n $config->setQuoteStrategy(new DefaultQuoteStrategy());\n $config->setRepositoryFactory(new DefaultRepositoryFactory());\n\n return $config;\n }",
"protected function getIntentionManager()\n {\n return $this->get('intention.execution_manager');\n }",
"public function getConfigSys()\n {\n return $this->__config__;\n }",
"function analogue()\n {\n return Manager::getInstance();\n }",
"protected function getConfig()\n {\n\n return $this->app['config']['manticore'];\n }",
"protected function getConfigHelper()\n {\n return $this->_configHelper;\n }",
"public function getManagerNames()\n {\n return ['default'];\n }",
"public function getLibraryConfigurationManager()\r\n {\r\n return $this->libraryConfigurationManager;\r\n }",
"public function getDefaultConfigLoader(): ?ConfigLoader;",
"public function getConnectorManager()\n {\n if (empty($this->connectorManger)) {\n $this->connectorManager = new ConnectorManager();\n }\n return $this->connectorManager;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58872f3015986f6eba7d71c052f');\n\n return $instance;\n }",
"protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }",
"protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Gedmo\\Tree\\TreeListener();\n $b->setAnnotationReader($a);\n\n $c = new \\Knp\\DoctrineBehaviors\\Reflection\\ClassAnalyzer();\n\n $d = new \\Gedmo\\Sluggable\\SluggableListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($b);\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sluggable\\SluggableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sluggable\\\\Sluggable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\TranslatableSubscriber($c, new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\CurrentLocaleCallable($this), new \\Knp\\DoctrineBehaviors\\ORM\\Translatable\\DefaultLocaleCallable('en'), 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translatable', 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Translatable\\\\Translation', 'LAZY', 'LAZY'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggableSubscriber($c, true, new \\Knp\\DoctrineBehaviors\\ORM\\Loggable\\LoggerCallable($this->get('logger'))));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Geocodable\\GeocodableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Geocodable\\\\Geocodable', NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Sortable\\SortableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Sortable\\\\Sortable'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\BlameableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Blameable\\\\Blameable', new \\Knp\\DoctrineBehaviors\\ORM\\Blameable\\UserCallable($this), NULL));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Tree\\TreeSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Tree\\\\Node'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\Timestampable\\TimestampableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\Timestampable\\\\Timestampable', 'datetime'));\n $f->addEventSubscriber(new \\Knp\\DoctrineBehaviors\\ORM\\SoftDeletable\\SoftDeletableSubscriber($c, true, 'Knp\\\\DoctrineBehaviors\\\\Model\\\\SoftDeletable\\\\SoftDeletable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber($this->get('victoire_view_reference.event_subscriber'));\n $f->addEventSubscriber($this->get('victoire_core.widget_discriminator_map.subscriber'));\n $f->addEventSubscriber(new \\FOS\\UserBundle\\Doctrine\\UserListener(${($_ = isset($this->services['fos_user.util.password_updater']) ? $this->services['fos_user.util.password_updater'] : $this->getFosUser_Util_PasswordUpdaterService()) && false ?: '_'}, ${($_ = isset($this->services['fos_user.util.canonical_fields_updater']) ? $this->services['fos_user.util.canonical_fields_updater'] : $this->getFosUser_Util_CanonicalFieldsUpdaterService()) && false ?: '_'}));\n $f->addEventSubscriber($this->get('victoire_core.widget_subscriber'));\n $f->addEventSubscriber($this->get('victoire_business_entity.business_entity_subscriber'));\n $f->addEventSubscriber($this->get('victoire_analytics.browser_event.subscriber'));\n $f->addEventSubscriber($this->get('page.subscriber'));\n $f->addEventSubscriber($this->get('victoire_blog.article.subscriber'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('victoire_core.entity_proxy.subscriber'));\n $f->addEventListener(array(0 => 'prePersist', 1 => 'preUpdate', 2 => 'postPersist', 3 => 'postUpdate', 4 => 'preRemove'), $this->get('victoire_media.listener.doctrine'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.default_listeners.attach_entity_listeners'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'db', 'port' => NULL, 'dbname' => 'victoire', 'user' => 'victoire', 'password' => 'victoire', 'charset' => 'UTF8', 'driverOptions' => array(), 'defaultTableOptions' => array()), new \\Doctrine\\DBAL\\Configuration(), $f, array());\n }",
"protected function getConfig(ServiceLocatorInterface $serviceLocator)\n {\n if ($this->config !== null) {\n return $this->config;\n }\n\n if (!$serviceLocator->has('Config')) {\n $this->config = [];\n return $this->config;\n }\n\n $config = $serviceLocator->get('Config');\n if (!isset($config[$this->moduleConfigKey])\n || !isset($config[$this->moduleConfigKey][$this->configKey])\n || !is_array($config[$this->moduleConfigKey][$this->configKey])\n ) {\n $this->config = [];\n return $this->config;\n }\n\n $this->config = $config[$this->moduleConfigKey][$this->configKey];\n\n return $this->config;\n }",
"public function getLogManager(): LogManager\n {\n return $this->logManager;\n }",
"public function getConfig($key = null, $default = null)\n {\n\n $configurator = $this->getConfigurator();\n if ( $key === null ) {\n return $configurator;\n }\n\n $this->validateConfigKey($key);\n\n return $this->hasConfig($key) ? $configurator[$key] : $default;\n }",
"public function getDocumentManager()\n {\n return $this->documentManager;\n }",
"public function getEntityManager()\n {\n if (null === $this->em) {\n $this->em = $this->getServiceLocator()\n ->get('doctrine.entitymanager.orm_default');\n }\n return $this->em;\n }",
"public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}",
"public function getDocumentManager()\n {\n return $this->getObjectManager();\n }",
"protected function getConfig(ServiceLocatorInterface $serviceLocator)\n {\n if ($this->config !== null) {\n return $this->config;\n }\n\n if (!$serviceLocator->has('Config')) {\n $this->config = [];\n return $this->config;\n }\n\n $config = $serviceLocator->get('Config');\n if (!isset($config[$this->configKey]) || !is_array($config[$this->configKey])) {\n $this->config = [];\n return $this->config;\n }\n\n $this->config = $config[$this->configKey];\n return $this->config;\n }",
"protected function getConfig(ServiceLocatorInterface $serviceLocator)\n {\n if ($this->config !== null) {\n return $this->config;\n }\n\n if (!$serviceLocator->has('Config')) {\n $this->config = [];\n return $this->config;\n }\n\n $config = $serviceLocator->get('Config');\n if (!isset($config[$this->configKey]) || !is_array($config[$this->configKey])) {\n $this->config = [];\n return $this->config;\n }\n\n $this->config = $config[$this->configKey];\n return $this->config;\n }",
"public static function getDefaultConfiguration()\n {\n if (self::$defaultConfiguration == null) {\n self::$defaultConfiguration = new Configuration();\n }\n\n return self::$defaultConfiguration;\n }",
"protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}",
"public static function getInstance()\n {\n if (null === self::$instance) {\n self::$instance = Reflector::propertySetter('config', [])(new self());\n }\n\n return self::$instance;\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }",
"protected function getObjectManager()\n {\n return $this->_objectManager;\n }",
"public static function getDefaultConfiguration()\n {\n if (self::$defaultConfiguration === null) {\n self::$defaultConfiguration = new Configuration();\n }\n\n return self::$defaultConfiguration;\n }",
"public static function getDefaultConfiguration()\n {\n if (self::$defaultConfiguration === null) {\n self::$defaultConfiguration = new Configuration();\n }\n\n return self::$defaultConfiguration;\n }",
"protected function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\r\n {\r\n return $this->objectManager;\r\n }",
"protected static function defaultInjector() {\n\t\t// static storage\n\t\tstatic $injector;\n\n\t\t// init if first time\n\t\tif ( is_null( $injector ) ) {\n\t\t\t$injector\t=\tnew Injector( array() );\n\t\t}\n\n\t\treturn $injector;\n\t}",
"public function getDefaultConfiguration() {}",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"public function getObjectManager()\n {\n return $this->objectManager;\n }",
"protected function getLogManager()\n {\n return \\DMK\\Mkpostman\\Factory::getLogManager();\n }",
"protected function _getInjector()\n {\n if ($this->_defaultInjector === null) {\n // The XML holds an option which one of the injectors is the default one\n $injectorName = $this->_reader->getOption('injector', 'Sweetie\\Injector\\Magic');\n\n // @todo check type\n $this->_defaultInjector = new $injectorName($this);\n }\n\n return $this->_defaultInjector;\n }",
"public function getManager(): Gutenberg\n {\n return $this->manager;\n }",
"abstract protected function getDoctrine(): ManagerRegistry;"
] | [
"0.7327674",
"0.6912394",
"0.67747617",
"0.6763204",
"0.65604854",
"0.6474837",
"0.6451315",
"0.64095104",
"0.6408204",
"0.6408204",
"0.6408204",
"0.6408204",
"0.6408204",
"0.6408204",
"0.6408204",
"0.6386998",
"0.635874",
"0.63547593",
"0.6352963",
"0.6260632",
"0.6260632",
"0.6243638",
"0.6241229",
"0.623326",
"0.6232691",
"0.6232691",
"0.6232691",
"0.6228398",
"0.6215174",
"0.6178612",
"0.6146796",
"0.6062249",
"0.6061562",
"0.6048103",
"0.60233915",
"0.602291",
"0.6022371",
"0.6022371",
"0.60033154",
"0.5983576",
"0.59182405",
"0.59047467",
"0.5900116",
"0.58940464",
"0.58890635",
"0.58761746",
"0.58682424",
"0.5852507",
"0.5841667",
"0.5834052",
"0.5833701",
"0.58281964",
"0.5821095",
"0.5820766",
"0.5809802",
"0.57821345",
"0.57695436",
"0.57673424",
"0.57461447",
"0.5745885",
"0.5711853",
"0.57049817",
"0.57034165",
"0.570335",
"0.5691427",
"0.568572",
"0.567901",
"0.5674695",
"0.5673899",
"0.5673052",
"0.56698483",
"0.5659129",
"0.56585276",
"0.56547034",
"0.56498456",
"0.5615562",
"0.5610886",
"0.5608671",
"0.5608671",
"0.5603307",
"0.5601787",
"0.5572204",
"0.5566826",
"0.5566826",
"0.5566172",
"0.5561628",
"0.5561628",
"0.5559567",
"0.55550104",
"0.55522287",
"0.5531303",
"0.5517196",
"0.5517196",
"0.5517196",
"0.5517196",
"0.5508341",
"0.55078",
"0.5507473",
"0.5497413"
] | 0.88063693 | 1 |
Gets the private 'locale_listener' shared service. | protected function getLocaleListenerService()
{
return $this->services['locale_listener'] = new \Symfony\Component\HttpKernel\EventListener\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"public function getLocaleService()\n {\n if (null === $this->localeService) {\n $this->localeService = $this->getServiceManager()->get('playgroundcore_locale_service');\n }\n\n return $this->localeService;\n }",
"protected static function getLanguageService() {}",
"public function getLocaleManager();",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getLanguageService() {}",
"protected function getVictoireI18n_Kernelrequest_ListenerService()\n {\n return $this->services['victoire_i18n.kernelrequest.listener'] = new \\Victoire\\Bundle\\I18nBundle\\Listener\\KernelRequestListener($this->get('twig'), array(0 => 'fr', 1 => 'en'));\n }",
"static function getLocale() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_LOCALE);\n\t}",
"protected function getVictoireI18n_LocaleSubscriberService()\n {\n return $this->services['victoire_i18n.locale_subscriber'] = new \\Victoire\\Bundle\\I18nBundle\\Subscriber\\LocaleSubscriber('en', $this->get('victoire_i18n.locale_resolver'));\n }",
"protected function getLanguageService()\n {\n return $this->services['language'] = new \\phpbb\\language\\language(${($_ = isset($this->services['language.loader']) ? $this->services['language.loader'] : $this->getLanguage_LoaderService()) && false ?: '_'});\n }",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public function _getServTranslator()\n {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"protected function _getTranslator() {\n \tif(null == $this->translator) {\n \t\t$sm = $this->getServiceLocator();\n \t\t$this->translator = \\Application\\Util\\ServicesUtil::getTranslatorService($sm);\n \t}\n \treturn $this->translator;\n }",
"protected function getForm_Type_LocaleService()\n {\n @trigger_error('The \"form.type.locale\" service is deprecated since Symfony 3.1 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['form.type.locale'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType();\n }",
"protected static function getFacadeAccessor() { return Locale::class; }",
"public static function config() {\n return \\Drupal::service('locale.config_manager');\n }",
"protected function getI18nService()\n {\n $class = $this->getParameter('i18n.class');\n $instance = new $class($this->getParameter('i18n.path'));\n\n return $instance;\n }",
"function getLocale()\n {\n if (defined('JENERATOR_LOCALE')) {\n return JENERATOR_LOCALE;\n }\n\n // Use the system's LANG variable, which usually is something like en_US.UTF-8\n $lang = getenv('LANG');\n return substr($lang, 0, strpos($lang, '.'));\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsListener($this->get('a2lix_translation_form.default.service.translation'));\n }",
"public function getLocale() {}",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getTwig_Extension_IntlService()\n {\n return $this->services['twig.extension.intl'] = new \\Twig_Extensions_Extension_Intl();\n }",
"public static function get()\n {\n return new TranslationsService();\n }",
"public function getLocale()\n {\n return $this['config']->get('app.locale');\n }",
"public function getLocale()\n {\n return $this['config']->get('app.locale');\n }",
"protected function getVictoireI18n_TranslatorService()\n {\n return $this->services['victoire_i18n.translator'] = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array(), array('cache_dir' => (__DIR__.'/translations%'), 'debug' => false));\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getLocale()\n {\n @session_start();\n return isset($_SESSION['varaa_locale'])\n ? $_SESSION['varaa_locale']\n : $this->config('app.locale');\n }",
"protected function getA2lixTranslationForm_Default_Listener_TranslationsformsService()\n {\n return $this->services['a2lix_translation_form.default.listener.translationsforms'] = new \\A2lix\\TranslationFormBundle\\Form\\EventListener\\TranslationsFormsListener();\n }",
"protected function getLanguage_LoaderService()\n {\n $this->services['language.loader'] = $instance = new \\phpbb\\language\\language_file_loader('./../', 'php');\n\n $instance->set_extension_manager(${($_ = isset($this->services['ext.manager']) ? $this->services['ext.manager'] : $this->getExt_ManagerService()) && false ?: '_'});\n\n return $instance;\n }",
"protected function getTranslation_LoaderService()\n {\n $a = $this->get('translation.loader.xliff');\n\n $this->services['translation.loader'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\TranslationLoader();\n\n $instance->addLoader('php', $this->get('translation.loader.php'));\n $instance->addLoader('yml', $this->get('translation.loader.yml'));\n $instance->addLoader('xlf', $a);\n $instance->addLoader('xliff', $a);\n $instance->addLoader('po', $this->get('translation.loader.po'));\n $instance->addLoader('mo', $this->get('translation.loader.mo'));\n $instance->addLoader('ts', $this->get('translation.loader.qt'));\n $instance->addLoader('csv', $this->get('translation.loader.csv'));\n $instance->addLoader('res', $this->get('translation.loader.res'));\n $instance->addLoader('dat', $this->get('translation.loader.dat'));\n $instance->addLoader('ini', $this->get('translation.loader.ini'));\n $instance->addLoader('json', $this->get('translation.loader.json'));\n\n return $instance;\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"public function getLocale();",
"public function getLocale();",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"public function getInterfaceLocale();",
"private function getTranslator()\n {\n if (!$this->app->translator instanceof Translator) {\n $this->app->translator = new Translator($this->locale, new MessageSelector());\n $this->app->translator->addLoader('array', new ArrayLoader());\n $this->app->translator->addLoader('xliff', new XliffFileLoader());\n }\n\n return $this->app->translator;\n }",
"public function getI18n() {\n return $this->dependencyInjector->get('ride\\\\library\\\\i18n\\\\I18n');\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"public static function getLocaleSource()\r\n {\r\n\tif ( empty(self::$localeSource) )\r\n\t{\r\n\t self::$localeSource = new LocaleSource();\r\n\t}\r\n\r\n\treturn self::$localeSource;\r\n }",
"protected function getMonolog_Logger_TranslationService()\n {\n $this->services['monolog.logger.translation'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('translation');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getConsole_ExceptionSubscriberService()\n {\n return $this->services['console.exception_subscriber'] = new \\phpbb\\console\\exception_subscriber(${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'});\n }",
"function getLocale() {\n\t\treturn $this->getData('locale');\n\t}",
"function i18n(): I18n\n\t{\n\t\tstatic $i18n;\n\n\t\tif($i18n === null)\n\t\t{\n\t\t\t$i18n = Application::instance()->getContainer()->get(I18n::class);\n\t\t}\n\n\t\treturn $i18n;\n\t}",
"function getLocale() {\n\t\t\t$ret = $this->locale;\n\t\t\treturn $ret;\n\t\t}",
"protected function getTranslation_Loader_IniService()\n {\n return $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader();\n }",
"public function getTranslationManager()\n {\n return $this->getKernel()->getContainer()->get('worldia.textmaster.manager.translation');\n }",
"public function getLocale() {\n\t\treturn $this->getParameter('app_locale');\n\t}",
"public function init()\n {\n if (null === $this->_locale) {\n// \tZend_Session::start();\n $this->getBootstrap()->bootstrap('Session');\n $bisObj = new WDS\\Model\\Business\\Locale();\n $localeCode = $bisObj->initLocale();\n Zend_Registry::set('Zend_Locale', $localeCode);\n $this->_locale = $localeCode;\n }\n return $this->_locale;\n }",
"public function getLocale(): Locale\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('locale');\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->services['translation.loader.csv'] = new \\Symfony\\Component\\Translation\\Loader\\CsvFileLoader()) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->services['translation.loader.dat'] = new \\Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader()) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->services['translation.loader.ini'] = new \\Symfony\\Component\\Translation\\Loader\\IniFileLoader()) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->services['translation.loader.json'] = new \\Symfony\\Component\\Translation\\Loader\\JsonFileLoader()) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->services['translation.loader.mo'] = new \\Symfony\\Component\\Translation\\Loader\\MoFileLoader()) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader()) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader()) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->services['translation.loader.qt'] = new \\Symfony\\Component\\Translation\\Loader\\QtFileLoader()) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader()) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader()) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader()) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\Formatter\\MessageFormatter(new \\Symfony\\Component\\Translation\\MessageSelector()), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yaml', 1 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => ($this->targetDirs[0].'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ar.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.bg.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ca.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.cs.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.da.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.de.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.el.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.en.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.es.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fa.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.fr.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.gl.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.he.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hr.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.hu.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.id.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.it.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ja.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lb.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lt.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.lv.xlf')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nb.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.no.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pl.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_BR.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ro.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ru.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sk.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sr_Latn.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.sv.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.th.xlf')), 'tl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.tl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tl.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.tr.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.vi.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.zh_CN.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/security/Core/Resources/translations/security.ua.xlf')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"protected function getVictoireI18n_RoutingLoaderService()\n {\n return $this->services['victoire_i18n.routing_loader'] = new \\Victoire\\Bundle\\I18nBundle\\Route\\I18nRouteLoader(array(), $this->get('victoire_i18n.locale_resolver'));\n }",
"protected function getTranslator_SelectorService()\n {\n return $this->services['translator.selector'] = new \\Symfony\\Component\\Translation\\MessageSelector();\n }",
"protected function get_locale() {\n\t\t\tif(!is_null($this->i18n_locale)) {\n\t\t\t\treturn $this->i18n_locale;\n\t\t\t} elseif($locale = Registry()->locale) {\n\t\t\t\treturn $this->set_locale($locale);\n\t\t\t} else {\n\t\t\t\treturn $this->set_locale(Config()->DEFAULT_LOCALE);\n\t\t\t}\n\t\t}",
"function yourls_get_locale() {\n\tglobal $yourls_locale;\n\n\tif ( !isset( $yourls_locale ) ) {\n\t\t// YOURLS_LANG is defined in config.\n\t\tif ( defined( 'YOURLS_LANG' ) )\n\t\t\t$yourls_locale = YOURLS_LANG;\n\t}\n\n if ( !$yourls_locale )\n $yourls_locale = '';\n\n\treturn yourls_apply_filter( 'get_locale', $yourls_locale );\n}",
"protected function getTranslation_Loader_ResService()\n {\n return $this->services['translation.loader.res'] = new \\Symfony\\Component\\Translation\\Loader\\IcuResFileLoader();\n }",
"protected function getVictoireI18n_LocaleResolverService()\n {\n return $this->services['victoire_i18n.locale_resolver'] = new \\Victoire\\Bundle\\I18nBundle\\Resolver\\LocaleResolver('parameter', array(), 'en', array(0 => 'fr', 1 => 'en'));\n }",
"static public function getLocalesList()\r\n {\r\n /**\r\n * TODO It need to remove hard-coded language params and place them to config file for different implementations because\r\n * each implamentation can have different language settings\r\n */\r\n return Zend_Registry::get('cfg_translate_locales_xml');\r\n }",
"function getLocale();",
"public function getLocale()\n {\n return $this['settings']->get('app::locale', 'en');\n }",
"public function getTranslator() \n {\n if (!$this->translator) {\n //$this->setTranslator($this->getServiceLocator()->get('translator'));\n $this->setTranslator(\\Application\\Module::getService('translator'));\n }\n return $this->translator;\n }",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getLocale() {\n return Mage::app()->getLocale();\n }",
"public function getLocale(): string;",
"public function getLocale(): string;",
"public function getLocale(): string;",
"public function get_switched_locale()\n {\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getTranslation_Loader_XliffService()\n {\n return $this->services['translation.loader.xliff'] = new \\Symfony\\Component\\Translation\\Loader\\XliffFileLoader();\n }"
] | [
"0.82841414",
"0.72171485",
"0.72171485",
"0.72171485",
"0.716531",
"0.7074446",
"0.7026078",
"0.69089997",
"0.6866057",
"0.6721692",
"0.6721692",
"0.6721692",
"0.6721692",
"0.6721692",
"0.6721692",
"0.6721692",
"0.6720305",
"0.6720305",
"0.67196417",
"0.67196417",
"0.67196417",
"0.67196417",
"0.67196417",
"0.67196417",
"0.67196417",
"0.67196417",
"0.67196417",
"0.6481071",
"0.6435785",
"0.6397187",
"0.63721216",
"0.63639325",
"0.63412404",
"0.62461865",
"0.6131019",
"0.6124651",
"0.61161864",
"0.6025847",
"0.60185754",
"0.59343636",
"0.59343636",
"0.5933188",
"0.5930479",
"0.5928008",
"0.5925761",
"0.5904964",
"0.5883704",
"0.58726966",
"0.58726966",
"0.58637124",
"0.585317",
"0.5848803",
"0.57997483",
"0.57896876",
"0.57688785",
"0.57624775",
"0.575516",
"0.575516",
"0.57536864",
"0.575308",
"0.5742995",
"0.5733378",
"0.5695386",
"0.5685754",
"0.56849116",
"0.56711847",
"0.5644968",
"0.5644269",
"0.5641712",
"0.56396854",
"0.562671",
"0.56259406",
"0.56186074",
"0.56036747",
"0.55933017",
"0.559178",
"0.55904824",
"0.55796874",
"0.5562269",
"0.5544547",
"0.5537713",
"0.5527483",
"0.5522349",
"0.551864",
"0.55152214",
"0.55141973",
"0.5511133",
"0.550606",
"0.5504652",
"0.5500808",
"0.5500537",
"0.5497288",
"0.5495865",
"0.5478607",
"0.54692274",
"0.54692274",
"0.54692274",
"0.5466513",
"0.544914",
"0.5438831"
] | 0.8450227 | 0 |
Gets the private 'logger' shared service. | protected function getLoggerService()
{
return $this->services['logger'] = new \Symfony\Component\HttpKernel\Log\Logger();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLogger()\n {\n if (!$this->logger)\n {\n $this->logger = $this->getDi()->getShared('logger');\n }\n return $this->logger;\n }",
"public function getLogger()\n {\n return $this->getService('logger');\n }",
"private function getLogger()\n {\n return $this->logger;\n }",
"protected function getLogger()\n {\n return $this->_logger;\n }",
"protected function getLogger()\n {\n return $this->_logger;\n }",
"protected function getLogger()\n {\n return $this->_logger;\n }",
"function get_logger() {\n return $this->logger;\n }",
"public static function getInstance()\r\n \t{\r\n \t\t$logger = ConfService::getLogDriverImpl();\r\n \t\treturn $logger;\r\n \t}",
"static private function getLogger(){\n \n if (!isset(self::$loggerM)){\n self::$loggerM = LoggerMgr::Instance()->getLogger(__CLASS__);\n }\n return self::$loggerM;\n }",
"public function getLogger(){ return $this->_logger; }",
"protected function getLogService() {\n return $this->_logService ?\n $this->_logService :\n $this->_logService = $this->getServiceLocator()->get('LogService');\n }",
"private function getLogger()\r\n {\r\n if ($this->logger === null) {\r\n $this->logger = $this->create();\r\n }\r\n\r\n return $this->logger;\r\n }",
"public function getLogger()\n {\n return $this->_logger;\n }",
"public function getLogger()\n {\n return $this->_logger;\n }",
"public function getLogger()\n {\n return $this->_logger;\n }",
"public function getLogger() {\n return $this->logger ?: \\Drupal::service('logger.factory')->get('search_api');\n }",
"public function getLogger()\n {\n return $this->logger;\n }",
"public function getLogger()\n {\n return $this->logger;\n }",
"public static function get() {\n return self::$logger;\n }",
"protected function getLogService()\n {\n return $this->services['log'] = new \\phpbb\\log\\log(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, './../', 'adm/', 'php', 'phpbb_log');\n }",
"protected function getLoggerService()\n {\n $this->services['logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->useMicrosecondTimestamps(true);\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function getLoggerInstance()\n {\n return $this->logInstance;\n\n }",
"public static function getInstance()\r\n {\r\n if (!sfLogger::$logger)\r\n {\r\n // the class exists\r\n $class = __CLASS__;\r\n sfLogger::$logger = new $class();\r\n sfLogger::$logger->initialize();\r\n }\r\n\r\n return sfLogger::$logger;\r\n }",
"protected function log_manager() {\n\t\treturn tribe( 'logger' );\n\t}",
"protected function getServiceName()\n {\n return 'logger';\n }",
"public static function getInstance()\n {\n // the class exists\n $class = __CLASS__;\n sfFlexibleLogger::$logger = new $class();\n sfFlexibleLogger::$logger->initialize();\n\n return sfFlexibleLogger::$logger;\n }",
"protected function getLogger()\n {\n if (null === $this->logger) {\n $this->logger = new NullLogger();\n }\n\n return $this->logger;\n }",
"public function getLogger() : Logger\n {\n return $this->logger;\n \n }",
"public function getLogger(): Logger\n {\n return API::ffi()->ts_parser_logger($this->data);\n }",
"public function logger()\n {\n return $this->logger;\n }",
"public function logger()\n {\n return $this->logger;\n }",
"public final function getLogger ()\n {\n return $this->context->getLogger();\n }",
"public function getLogger()\n {\n return $this->log;\n }",
"public function getLogger()\n {\n if ($this->logger === null) {\n $this->logger = new NullLogger();\n }\n\n return $this->logger;\n }",
"protected function current_logger() {\n\t\treturn tribe( 'logger' )->get_current_logger();\n\t}",
"public function getLogger()\n {\n if (null === $this->logger) {\n $this->logger = new NullLogger();\n }\n\n return $this->logger;\n }",
"public function getLogger() : Logger {\n return $this->context->getLogger();\n }",
"protected function logger() {\n if (!$this->logger)\n $this->logger = Support_Resources::logger('Routing');\n return $this->logger;\n }",
"static public function getLogger()\n\t{\n\t\tif (! self::$instance) {\n\t\t\tself::configureInstance();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"function logger() {\n\t\t/** @var \\Phanda\\Logging\\Manager $loggingManager */\n\t\t$loggingManager = phanda()->create(\\Phanda\\Logging\\Manager::class);\n\n\t\treturn $loggingManager->getLogger();\n\t}",
"public function getAppLogger()\n {\n return $this->oLogger;\n }",
"public function getLogger() {\n\t\tif (is_object($this->logger)) {\n\t\t\treturn $this->logger;\n\t\t}\n\t\tif (property_exists($this,'application') && is_object($this->application)) {\n\t\t\treturn $this->application->getLogger();\n\t\t}\n\t\treturn null;\n\t}",
"public function getLogger()\n {\n $log_name = 'importer';\n $logger = CustomLog::create( $this->getLog(), $log_name );\n return $logger;\n }",
"public static function get()\n {\n if (self::$logger === null) {\n self::$logger = self::getBoolIni(\"datadog.trace.debug\")\n ? new ErrorLogLogger(LogLevel::DEBUG)\n : new NullLogger(LogLevel::EMERGENCY);\n }\n return self::$logger;\n }",
"public function getLogger(): LoggerInterface\n {\n return $this->logger;\n }",
"public function getLogger(): LoggerInterface\n {\n return $this->logger;\n }",
"private static function loggerInterface(): LoggerInterface {\n\n if (self::$loggerInterface == null) {\n self::$loggerInterface = LoggerFactory::create();\n }\n return self::$loggerInterface;\n }",
"public function getLogger(): LoggerInterface\n\t{\n\t\treturn $this->logger;\n\t}",
"protected function getLogger() {\n if (is_null($this->logger)) {\n $this->logger = Logger::getLogger('report.sqldatagenerator');\n }\n\n return($this->logger);\n }",
"public function getAccessLogger()\n {\n return $this->accessLogger;\n }",
"public static function getLogger();",
"public function getMessageLogger()\n {\n if (null === self::$_messageLogger) {\n self::$_messageLogger = Mage::getSingleton('tmcore/module_messageLogger');\n }\n return self::$_messageLogger;\n }",
"public function getLogger();",
"public function getLogger();",
"public function getLogger(): LogManager\n {\n return $this->logger;\n }",
"public function getLogger(\n \t$logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n \treturn $this->getContainer()->getLogger();\n }",
"public function getLogger(\n \t$logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n \treturn $this->getContainer()->getLogger();\n }",
"abstract protected function getLogger(): Logger;",
"public function getLogger(): Logger\n {\n if(empty($this->logger)) {\n $path = C::Storage()->getLogPath() . DS . date(\"Y-m-d\") . '-' . $this->channel . '.log';\n $logger = new Logger('Task');\n $loglevel = Logger::toMonologLevel(C::Config()->get('main:logging.logoutput.level', 'info'));\n $permissions = C::Config()->get('main:logging.file_permission', 0664);\n $logger->pushHandler(new StreamHandler($path, $loglevel, true, $permissions));\n\n $this->logger = $logger;\n }\n\n return $this->logger;\n }",
"public function getLogger(): ?LoggerInterface\n {\n return $this->logger;\n }",
"public static function getLoggerInst(){\n if(!isset(self::$_instance) || empty(self::$_instance)){\n self::$_instance = new LoggersPlugin();\n }\n return self::$_instance;\n }",
"public static function _getLogger()\n {\n return TechDivision_Logger_Logger::forClass(\n __CLASS__,\n 'TDProject/META-INF/log4php.properties'\n );\n }",
"public function getLogger(): LoggerInterface\n {\n if ($this->logger === null) {\n $this->logger = new NullLogger();\n }\n\n return $this->logger;\n }",
"public function getLoggerAware()\n {\n $aware = new LoggerAware();\n return $aware;\n }",
"private static function getInstance()\n {\n if (empty(static::$instance)) {\n static::$instance = new WC_Logger(self::$additionalHandlers);\n }\n\n return static::$instance;\n }",
"protected function getMonolog_Logger_SecurityService()\n {\n $this->services['monolog.logger.security'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('security');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function getLogger()\n {\n return $this->logger = Zend_Registry::get('logDb');\n }",
"public function getLogger() : LoggerInterface\n {\n if (null === $this->logger) {\n $this->logger = new NullLogger();\n }\n\n return $this->logger;\n }",
"protected function getSncRedis_LoggerService()\n {\n return $this->services['snc_redis.logger'] = new \\Snc\\RedisBundle\\Logger\\RedisLogger($this->get('monolog.logger.snc_redis', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"static function getSSOLogger(){\n return parent::getLogger('SSO');\n }",
"public function getLogging()\n {\n return isset($this->logging) ? $this->logging : null;\n }",
"private function logger()\n {\n $msgLog = new Logger('RequestResponseLogs');\n $msgLog->pushHandler(new StreamHandler(storage_path('logs/amadeus.log'), Logger::INFO));\n return $msgLog;\n }",
"public function getLoger(){\n\t\treturn $this->_loger;\n\t}",
"protected function _getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n \treturn $this->getLogger();\n }",
"protected function _getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n \treturn $this->getLogger();\n }",
"public function getObject() {\n return Log::getInstance();\n }",
"protected function getLogManager()\n {\n return \\DMK\\Mkpostman\\Factory::getLogManager();\n }",
"protected function getMonolog_Logger_PhpService()\n {\n $this->services['monolog.logger.php'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('php');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function getLogger(): ?LoggerInterface\n {\n return $this->make(LoggerInterface::class) ?? null;\n }",
"protected function getMonolog_Logger_CacheService()\n {\n $this->services['monolog.logger.cache'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('cache');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"static public function get_instance( )\n\t{\n\t\tif (is_null(self::$_instance)) {\n\t\t\tself::$_instance = new Log( );\n\t\t}\n\n\t\treturn self::$_instance;\n\t}",
"static public function get(string $loggerName = 'app')\n {\n return self::set($loggerName);\n }",
"private static function _getInstance($name, $redirect = NULL) {\r\n\t\tif(!array_key_exists($name, $redirect)) {\r\n\t\t\tself::$_loggers[$name] = new Logger($name, $redirect);\r\n\t\t}\r\n\t\treturn self::$_loggers[$name];\r\n\t}",
"public static function getMonolog(){\n\t\treturn \\Illuminate\\Log\\Writer::getMonolog();\n\t}",
"abstract public function load_logger();",
"protected function _getLogger()\n {\n if ($this->_logger === null) {\n $this->_logger = new Zend_Log();\n $writer = new Zend_Log_Writer_Stream(STDOUT, 'a');\n $formatter = new Zend_Log_Formatter_Simple('%priorityName%: %message%' . PHP_EOL);\n $writer->setFormatter($formatter);\n if (!$this->getArg('debug')) {\n $writer->addFilter(Zend_Log::INFO);\n } else {\n $writer->addFilter(Zend_Log::DEBUG);\n }\n $this->_logger->addWriter(\n $writer\n );\n }\n\n return $this->_logger;\n }",
"public function getLogger($loggerType = self::DEFAULT_LOGGER_TYPE);",
"public function init()\n {\n return $this->getLogger();\n }",
"public function getLoggerCallable()\n {\n return $this->loggerCallable;\n }",
"public function getLoggerCallable()\n {\n return $this->loggerCallable;\n }",
"public function getLog()\n {\n return $this->get('log');\n }",
"public function getLog()\n {\n return $this->get('log');\n }",
"public function getLogger($name)\n {\n /* @var $slf4pLogger Logger */\n\t\t/* @var $newInstance Logger */\n\t\t/* @var $oldInstance Logger */\n\t\t/* #var $phpLogger \\KM\\Util\\Logging\\Logger */\n\t\t$name = (string) $name;\n \n // The root logger in KM\\Util\\Logging is \"\"\n if (strtolower($name) === strtolower(Logger::ROOT_LOGGER_NAME)) {\n $name = '';\n }\n \n $slf4pLogger = $this->loggerMap->get($name);\n if ($slf4pLogger != null) {\n return $slf4pLogger;\n } else {\n $phpLogger = \\KM\\Util\\Logging\\Logger::getLogger($name);\n $newInstance = new PDKLoggerAdapter($phpLogger);\n $oldInstance = $this->loggerMap->putIfAbsent($name, $newInstance);\n return ($oldInstance == null) ? $newInstance : $oldInstance;\n }\n }",
"public function getLoggers()\n {\n return $this->_loggers;\n }",
"public function getLoggers()\n {\n return $this->_loggers;\n }",
"function app_log(): Logger\n{\n return app(\"app_logger\");\n}",
"private function getDebugLogger()\n {\n foreach ($this->handlers as $handler) {\n if ($handler instanceof Ecocode_Profiler_Model_Logger_DebugHandlerInterface) {\n return $handler;\n }\n }\n }",
"public function getLoggers()\n {\n return $this->loggers;\n }",
"static public function logs() {\r\n\t\treturn self::$logs;\r\n\t}",
"public static function getInstance()\n {\n \t\n \t\n \t\n if (!self::$instance)\n {\n \t\n \t$error_log_file = SYS_PATH.E_LOG;\n \t\n \ttry {\n \t\t\n \t\tif(!file_exists($error_log_file))\n \t\t\t$file = fopen($error_log_file, \"w\");\n \t\t \t\t \n \t\tif(!is_writeable($error_log_file))\n \t\t\tthrow new Exception($this->logFile .\" is not a writeable file\");\n \t\t\n \t} catch (Exception $e) {\n \t\tthrow new Exception($this->logFile .\" is not a writeable file\");\n \t}\n \t\n \t\n self::$instance = new Logger();\n \n self::$logFile = $error_log_file;\n \n }\n return self::$instance;\n }"
] | [
"0.78902847",
"0.77114844",
"0.7637587",
"0.7612341",
"0.7612341",
"0.7612341",
"0.7590496",
"0.7582935",
"0.7576",
"0.75731695",
"0.7532807",
"0.7498358",
"0.748957",
"0.748957",
"0.748957",
"0.7403776",
"0.73789334",
"0.73789334",
"0.7314383",
"0.73050183",
"0.72859967",
"0.7245853",
"0.7225924",
"0.7201929",
"0.7190389",
"0.7185278",
"0.7160401",
"0.7157306",
"0.7110293",
"0.70777947",
"0.70777947",
"0.705229",
"0.7052041",
"0.70411664",
"0.70399797",
"0.70364565",
"0.69674337",
"0.695706",
"0.6943477",
"0.69237447",
"0.6913729",
"0.6905902",
"0.68954486",
"0.6893028",
"0.6874046",
"0.6874046",
"0.6864622",
"0.6851963",
"0.6813246",
"0.6792411",
"0.67737764",
"0.6753873",
"0.67234087",
"0.67234087",
"0.6687304",
"0.65634465",
"0.65634465",
"0.6507207",
"0.6492785",
"0.64707077",
"0.64675784",
"0.64556426",
"0.64527476",
"0.6450191",
"0.64363265",
"0.64356357",
"0.642255",
"0.64061415",
"0.6375105",
"0.6344157",
"0.6338994",
"0.63341635",
"0.63250315",
"0.6318423",
"0.6318423",
"0.624962",
"0.62352353",
"0.6230735",
"0.621785",
"0.61540526",
"0.6117979",
"0.6116817",
"0.6105147",
"0.609036",
"0.60870785",
"0.608387",
"0.6041236",
"0.6027412",
"0.5972189",
"0.5972189",
"0.5961652",
"0.5961652",
"0.59435904",
"0.59364384",
"0.59364384",
"0.5933356",
"0.5903167",
"0.5872635",
"0.58720756",
"0.58693206"
] | 0.77782667 | 1 |
Gets the private 'resolve_controller_name_subscriber' shared service. | protected function getResolveControllerNameSubscriberService()
{
return $this->services['resolve_controller_name_subscriber'] = new \Symfony\Bundle\FrameworkBundle\EventListener\ResolveControllerNameSubscriber(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->services['controller_name_converter'] = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'})) && false ?: '_'});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'});\n }",
"protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser($this->get('kernel'));\n }",
"public function getControllerName() {}",
"protected function getController_ResolverService()\n {\n return $this->services['controller.resolver'] = new \\phpbb\\controller\\resolver($this, './../', ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"public function getControllerObjectName() {}",
"public function getControllerObjectName() {}",
"public function getBaseControllerName(): string;",
"function getControllerObjectName() ;",
"public function getControllerName() {\n\n\t\treturn $this->_controller;\n\t}",
"public function getControllerName() {\n\t\treturn $this->controller;\n\t}",
"public function getControllerName()\n {\n return $this->_controller;\n }",
"public function getControllername()\r\n {\r\n return $this->controllername;\r\n }",
"public function getControllerName()\n {\n if (is_null($this->_controllerName)) {\n $this->getController();\n }\n return $this->_controllerName;\n }",
"public function getControllerName()\n {\n return $this->controller;\n }",
"public function getControllerName() {\n return $this->controllerName;\n }",
"public function getControllerExtensionName() {}",
"public function getControllerExtensionName() {}",
"public function getControllerName()\n {\n return Inflector::id2camel($this->getControllerId(),'-');\n }",
"protected function getModuleFromControllerName() \r\n {\r\n $controller_name = get_class($this);\r\n return strtolower(preg_replace('/_(.*?)$/i', '', $controller_name));\r\n }",
"public function getController(): string\n {\n return $this->controller;\n }",
"public function getController(): string\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->str_controller;\n }",
"public static function getControllerName()\r\n\t{\r\n\t\treturn TRequest::getCmd('controller');\r\n\t}",
"public function getControllerName()\n {\n return preg_replace(\"/(.*)[\\\\\\\\](.*)(Controller)/\", '$2', get_class($this));\n }",
"public function controllerAlias()\n {\n return $this->controllerAlias;\n }",
"private function getControllerName() {\n if(isset($_GET['c']) && !empty($_GET['c'])) {\n return $_GET['c'];\n }\n return Config::getDefaultController();\n }",
"public function getId()\n {\n return strtolower(strstr($this->getShortName(), 'Controller', true));\n }",
"public function getControllerName(){\n\t\t$className = get_class($this);\n\t\tif(isset(self::$_controllerName[$className])){\n\t\t\treturn self::$_controllerName[$className];\n\t\t} else {\n\t\t\treturn $className;\n\t\t}\n\t}",
"public function getUniqueControllerPrefix()\n {\n return self::PREFIX;\n }",
"public function getController()\n {\n return $this->sController;\n }",
"public function getControllerSimpleName()\n {\n return end(explode('\\\\', $this->controllerName));\n }",
"protected function getCurrentCallingControllerName()\n {\n if (is_null($this->currentCallingControllerName)) {\n $namespace = explode('\\\\', get_class($this));\n $this->currentCallingControllerName = strtolower(str_replace('Controller', '', end($namespace)));\n }\n\n return $this->currentCallingControllerName;\n }",
"public function getControllerActionName() {}",
"public function getErrorControllerName()\n {/*{{{*/\n return $this->get(self::KEY_ERROR_CONTROLLER_NAME);\n }",
"protected function getVictoireCore_Listener_ControllerListenerService()\n {\n return $this->services['victoire_core.listener.controller_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\ControllerListener($this->get('event_dispatcher'));\n }",
"public function & GetController ();",
"protected function _controller() {\n\t\treturn $this->_container->controller;\n\t}",
"public function getController()\n\t{\t\n\n\t\t$parsed = $this->getAsArray();\n\t\t\n\t\tif( ! empty($parsed) )\n\t\t{\n\t\t\tif( $this->getPrefix() )\n\t\t\t{\n\t\t\t\tarray_shift($parsed);\n\t\t\t}\n\t\t\tif( ! empty($parsed) )\n\t\t\t{\n\t\t\t\treturn $parsed[0];\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"protected function _getController()\n\t{\n\t\treturn $this->_registry->getController();\n\t}",
"public static function getController()\n {\n return self::getInstance()->urlParams[self::PARAM_CONTROLLER];\n }",
"public function getController() : string\n {\n return substr($this->uri, 0, -strlen($this->match)) .\n $this->replacement;\n }",
"public function getController()\n {\n return ucfirst($this->controller).'Controller';\n }",
"public function getController()\n {\n return $this->__get($this->getControllerKey());\n }",
"public function getController() {\n \t\n \t// Return our controller\n \treturn $this->sController;\n }",
"public static function name()\n {\n $path = explode('\\\\', get_called_class());\n $controller_name = array_pop($path);\n return trim(str_replace(\"Controller\", \"\", $controller_name));\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getController() : string\n {\n return preg_replace($this->match, $this->replacement, $this->uri);\n }",
"public function getCustomController()\n {\n $controllerName = ucfirst(str_replace('post_', '', $this->slug));\n return $controllerName.'Controller';\n }",
"public function getShortName() {\n return lcfirst(str_replace('Controller', '', get_class($this)));\n }",
"protected function getFrontendController() {}",
"static public function controller() {\n\t\treturn self::$controller;\n\t}",
"abstract public function getServiceName();",
"public function getControllerName()\n {\n $current = static::class;\n $ancestry = ClassInfo::ancestry($current);\n $controller = null;\n while ($class = array_pop($ancestry)) {\n if ($class === self::class) {\n break;\n }\n if (class_exists($candidate = sprintf('%sController', $class))) {\n $controller = $candidate;\n break;\n }\n $candidate = sprintf('%sController', str_replace('\\\\Model\\\\', '\\\\Control\\\\', $class));\n if (class_exists($candidate)) {\n $controller = $candidate;\n break;\n }\n }\n if ($controller) {\n return $controller;\n }\n return PageController::class;\n }",
"public function getController($ucfirst=true){\r\n\t\tif(is_array($this->matchedRoute) && isset($this->matchedRoute['controller_regex'])){\r\n\t\t\tif($this->matchedRoute['controller_regex'] == true){\r\n\t\t\t\t$this->controller = 'Reg'.sha1($this->matchedRoute['controller']);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif($ucfirst){\r\n\t\t\t$o = ucfirst($this->controller);\r\n\t\t} else {\r\n\t\t\t$o = strtolower($this->controller);\r\n\t\t}\r\n\t\treturn $o;\r\n\t}",
"public function getController( );",
"public function getControllerName()\n\t{\n\t\t$explodedArray = explode('/', $_SERVER['REQUEST_URI']);\n\t\tif (array_key_exists(1, $explodedArray) && !empty($explodedArray[1]) && !strstr($explodedArray[1], '?')) {\n\t\t\t$this->controllerName = $explodedArray[1];\n\t\t}else\n\t\t\t$this->controllerName = 'main';\n\t}",
"public function getController()\n\t{\n\t\t$className = strtolower(get_class($this));\n\t\t$className = preg_replace('/_controller$/', '', $className);\n\n\t\treturn $className;\n\t}",
"public function resolveName();",
"function _getPluginControllerNames() {\n\t\tApp::import('Core', 'File', 'Folder');\n\t\t$paths = Configure::getInstance();\n\t\t$folder =& new Folder();\n\t\t$folder->cd(APP . 'plugins');\n\t\t// Get the list of plugins\n\t\t$Plugins = $folder->read();\n\t\t$Plugins = $Plugins[0];\n\t\t$arr = array();\n\t\t// Loop through the plugins\n\t\tforeach($Plugins as $pluginName) {\n\t\t\t// Change directory to the plugin\n\t\t\t$didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');\n\t\t\t// Get a list of the files that have a file name that ends\n\t\t\t// with controller.php\n\t\t\t$files = $folder->findRecursive('.*_controller\\.php');\n\t\t\t// Loop through the controllers we found in the plugins directory\n\t\t\tforeach($files as $fileName) {\n\t\t\t\t// Get the base file name\n\t\t\t\t$file = basename($fileName);\n\t\t\t\t// Get the controller name\n\t\t\t\t$file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));\n\t\t\t\tif (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {\n\t\t\t\t\tif (!App::import('Controller', $pluginName.'.'.$file)) {\n\t\t\t\t\t\tdebug('Error importing '.$file.' for plugin '.$pluginName);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/// Now prepend the Plugin name ...\n\t\t\t\t\t\t// This is required to allow us to fetch the method names.\n\t\t\t\t\t\t$arr[] = Inflector::humanize($pluginName) . \"/\" . $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}",
"function _getPluginControllerNames() {\n \t\tApp::import('Core', 'File', 'Folder');\n \t\t$paths = Configure::getInstance();\n \t\t$folder =& new Folder();\n \t\t$folder->cd(APP . 'plugins');\n\n \t\t// Get the list of plugins\n \t\t$Plugins = $folder->read();\n \t\t$Plugins = $Plugins[0];\n \t\t$arr = array();\n\n \t\t// Loop through the plugins\n \t\tforeach($Plugins as $pluginName) {\n \t\t\t// Change directory to the plugin\n \t\t\t$didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');\n \t\t\t// Get a list of the files that have a file name that ends\n \t\t\t// with controller.php\n \t\t\t$files = $folder->findRecursive('.*_controller\\.php');\n\n \t\t\t// Loop through the controllers we found in the plugins directory\n \t\t\tforeach($files as $fileName) {\n \t\t\t\t// Get the base file name\n \t\t\t\t$file = basename($fileName);\n\n \t\t\t\t// Get the controller name\n \t\t\t\t$file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));\n \t\t\t\tif (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {\n \t\t\t\t\tif (!App::import('Controller', $pluginName.'.'.$file)) {\n \t\t\t\t\t\tdebug('Error importing '.$file.' for plugin '.$pluginName);\n \t\t\t\t\t} else {\n \t\t\t\t\t\t/// Now prepend the Plugin name ...\n \t\t\t\t\t\t// This is required to allow us to fetch the method names.\n \t\t\t\t\t\t$arr[] = Inflector::humanize($pluginName) . \"/\" . $file;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn $arr;\n \t}",
"public function getControllerKey()\n {\n return $this->controllerKey;\n }",
"public function getController();",
"public function getController();",
"public function getController();",
"protected function getSensioFrameworkExtra_Controller_ListenerService()\n {\n return $this->services['sensio_framework_extra.controller.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener($this->get('annotation_reader'));\n }",
"public function getController() {\n \n return $this->controller;\n \n }",
"public function getServiceName()\n {\n if (array_key_exists(\"serviceName\", $this->_propDict)) {\n return $this->_propDict[\"serviceName\"];\n } else {\n return null;\n }\n }",
"public function getController() {\n\t\tif (isset($_GET[$this->config->get('controllerParam')]))\n\t\t\t$controller = clearPath(urldecode($_GET[$this->config->get('controllerParam')]));\n\t\telse\n\t\t\t$controller = clearPath($this->config->get('defaultController'));\n\t\t\n\t\treturn strtolower($controller);\n\t}",
"public function getController() {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->_controller;\n }",
"public function getController()\n {\n return $this->_controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function getController()\n {\n return $this->controller;\n }",
"public function get_rest_controller( string $controller_name ) {\n\t\treturn $this->rest_controllers[ $controller_name ];\n\t}",
"public function getDefaultControllerName()\n {\n return $this->_defaultController;\n }",
"public static function getControllerName()\r\n {\r\n $page = request::get('page', 'homepage'); \r\n\r\n // if a controller file exists with this name\r\n $file_name = $page . '.controller.php';\r\n $file_path = CONTROLLERS_DIR . '/' . $file_name;\r\n if(file_exists($file_path))\r\n {\r\n // return the path to that file\r\n return $page;\r\n }\r\n else\r\n {\r\n // return the path to the error 404 file\r\n return 'error404';\r\n }\r\n }",
"protected static function getControllerName()\n {\n //控制器cname对应的中文名称\n $cnames['UsersController'] = '用户管理';\n $cnames['CatesController'] = '栏目管理';\n $cnames['AdminuserController'] = '管理员管理';\n $cnames['RoleController'] = '岗位管理';\n $cnames['NodeController'] = '权限管理';\n $cnames['BannersController'] = '轮播图管理';\n $cnames['LinksController'] = '链接管理';\n $cnames['NewsController'] = '新闻管理';\n $cnames['AddressController'] = '收货地址管理';\n $cnames['BrandsController'] = '品牌管理';\n $cnames['SpecificController'] = '商品规格管理';\n $cnames['GoodsController'] = '商品管理';\n $cnames['BlogController'] = '商城头条管理';\n $cnames['RecommendController'] = '今日推荐管理';\n $cnames['SeckillController'] = '秒杀管理';\n\n return $cnames;\n }",
"public function get_controller()\n {\n return $this->_controller;\n }",
"public function GetController () {\n\t\treturn $this->controller;\n\t}",
"function get_controller() {\n\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 2) {\n return $parts[2];\n }\n return null;\n }",
"public function getController()\n {\n $class = $this->parseControllerCallback()[0];\n\n if (! $this->controller) {\n $this->controller = $this->container->make(\"App\\\\Controllers\\\\\".$class);\n }\n\n return $this->controller;\n }",
"function getController() {\n\t\treturn $this->Controller;\n\t}",
"public function getController()\n {\n if (is_null($this->_controller)) {\n $controller = $this->getConfiguration()\n ->get('router.controller', 'pages');\n if (isset($this->_params['controller'])) {\n $controller = $this->_params['controller'];\n }\n $this->_controllerName = $controller;\n $this->_controller = trim(\n \"{$this->namespace}\\\\\". ucfirst($controller),\n '\\\\'\n );\n }\n return $this->_controller;\n }",
"public function CompleteControllerName ($controllerNamePascalCase);",
"function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}",
"public function getController()\n {\n if (!empty($this->_registry)) {\n return $this->_registry->getController();\n }\n\n return $this->_Controller;\n }",
"public static function getControllerName()\n {\n //get the name of the page from URL \n $page_name = request::get('page', 'home');\n //$page_uri = $_SERVER['REQUEST_URI'];//get the uri of the current page\n //$url_parts = explode('/',$page_uri);//break it into parts\n //$page_name = array_pop($url_parts);//gets the last part (contact from www.site.com/contact)\n //get the path to the proper controller file based on the page name\n\n //if(trim($page_name)=='') $page_name = 'home';//if none was specified, make ot home\n\n $controller_file = static::getControllerFile($page_name);\n //if such a controller exists\n if(file_exists($controller_file))\n {\n //return the name of the page \n return $page_name;\n }\n else\n {\n //otherwise throw a nice error!\n return 'error404';\n }\n }",
"public function get_controller() {\r\n\t\treturn $this->controller;\r\n\t}",
"public function get_controller() {\n\t\treturn $this->controller;\n\t}",
"public static function qualifyController($name)\n {\n $shellClass = self::qualifyShell($name);\n\n if ((new $shellClass())->isInternal()) {\n return config('beluga.internal_controller_namespace').'\\\\'.class_basename($name).'Controller';\n }\n\n $class = config('beluga.controller_namespace').'\\\\'.$name.'Controller';\n\n if (class_exists($class)) {\n return $class;\n }\n\n return $name;\n }",
"public function getActionName()\n {\n return isset($this->action['controller']) ? $this->action['controller'] : 'Closure';\n }"
] | [
"0.73876977",
"0.7332215",
"0.68224996",
"0.66770595",
"0.6594536",
"0.6594536",
"0.64360017",
"0.63503516",
"0.62597805",
"0.61912596",
"0.61863446",
"0.6181331",
"0.61558515",
"0.61314017",
"0.6104685",
"0.61045015",
"0.61045015",
"0.6005062",
"0.597336",
"0.5938183",
"0.5938183",
"0.58632284",
"0.585026",
"0.5838156",
"0.57969064",
"0.57779604",
"0.57669765",
"0.57473624",
"0.5747141",
"0.57267845",
"0.5695007",
"0.56638",
"0.56626767",
"0.56539756",
"0.5647814",
"0.5629393",
"0.5626805",
"0.56136894",
"0.56077784",
"0.56072044",
"0.55875707",
"0.55854815",
"0.55824775",
"0.555289",
"0.5550664",
"0.5530936",
"0.5530936",
"0.5529726",
"0.54915786",
"0.5476831",
"0.54619676",
"0.5456161",
"0.5445001",
"0.5435433",
"0.5434666",
"0.54307956",
"0.54280424",
"0.54218894",
"0.5417327",
"0.541704",
"0.54161423",
"0.5408067",
"0.5408067",
"0.5408067",
"0.540432",
"0.54012805",
"0.53934395",
"0.5393205",
"0.5391997",
"0.53829014",
"0.53829014",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5382701",
"0.5373058",
"0.53708935",
"0.53639245",
"0.5363007",
"0.53542703",
"0.53404844",
"0.5339558",
"0.5338441",
"0.5329583",
"0.5328371",
"0.5327466",
"0.53253996",
"0.532509",
"0.53150266",
"0.53069276",
"0.5302893",
"0.5292702",
"0.5292092"
] | 0.8670332 | 0 |
Gets the private 'response_listener' shared service. | protected function getResponseListenerService()
{
return $this->services['response_listener'] = new \Symfony\Component\HttpKernel\EventListener\ResponseListener('UTF-8');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }",
"protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"function responseManager()\n {\n /** @var \\Phanda\\Contracts\\Http\\ResponseManager $responseManager */\n $responseManager = phanda()->create(\\Phanda\\Contracts\\Http\\ResponseManager::class);\n return $responseManager;\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, $this->targetDirs[3], true);\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function response(): ResponseInterface\n {\n return Context::get(ResponseInterface::class);\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public function &getResponse() : ResponseInterface\n {\n return $this->response;\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public function & GetResponse ();",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"function get_response() {\n return $this->response;\n }",
"public function getService()\n\t{\n\t\treturn $this->_service;\n\t}",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"protected abstract function service(Response $response);",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"protected function getTroopersAlertifybundle_EventListenerService()\n {\n return $this->services['troopers_alertifybundle.event_listener'] = new \\Troopers\\AlertifyBundle\\EventListener\\AlertifyListener($this->get('session'), $this->get('troopers_alertifybundle.session_handler'));\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"function getService() {\n return $this->service;\n }",
"public static function service() {\n return self::$app->serviceContainer;\n }",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->service;\n }",
"protected function getVictoireCore_PageMenuListenerService()\n {\n return $this->services['victoire_core.page_menu_listener'] = new \\Victoire\\Bundle\\PageBundle\\Listener\\PageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getService()\n\t{\n\t\treturn $this->service;\n\t}",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getService() {\n return $this->service;\n }",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}",
"public function _getServTranslator()\n {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"public function getResponse()\n {\n return $this->getService('response');\n }",
"public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function getListeningToGlobalEvents()\n\t{\n\t\treturn $this->_listeningenabled;\n\t}",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"protected function getSession_SaveListenerService()\n {\n return $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener();\n }",
"public function hookManager()\n {\n return $this->hookManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager()\r\n\t{\r\n\t\treturn $this->serviceManager;\r\n\t}",
"protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener($this->get('sensio_framework_extra.converter.manager'), true);\n }",
"public function getService()\n {\n return null;\n }",
"public function getResponse(): ResponseInterface\n {\n return $this->response;\n }",
"public function get_response()\n {\n return $this->response; \n }",
"public function listen($listener);",
"protected function getVictoireI18n_Kernelrequest_ListenerService()\n {\n return $this->services['victoire_i18n.kernelrequest.listener'] = new \\Victoire\\Bundle\\I18nBundle\\Listener\\KernelRequestListener($this->get('twig'), array(0 => 'fr', 1 => 'en'));\n }",
"public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::RESPONSE => array('onResponse', 200)\n );\n }",
"public function service()\n {\n return $this->service;\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"public function service() {\n return $this->service;\n }",
"protected function getKernelTerminateSubscriberService()\n {\n return $this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber();\n }",
"public function get_response()\n\t{\n\t\treturn $this->response;\n\t}",
"public function get_response()\n\t{\n\t\treturn $this->response;\n\t}",
"protected function getTranslation_Loader_PhpService()\n {\n return $this->services['translation.loader.php'] = new \\Symfony\\Component\\Translation\\Loader\\PhpFileLoader();\n }",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"static function instance() {\n if (!self::$instance) {\n self::$instance = new ApiResponseManager(new DefaultResponseModel());\n }\n return self::$instance;\n }",
"public function sharedInstance() {\n\t\tif (!self::$popServerInstance) {\n\t\t\tself::$popServerInstance = new PopServer();\n\t\t}\n\t\treturn self::$popServerInstance;\n\t}",
"public static function getCurrentResponse() {\r\n if (self::$response == NULL) {\r\n self::$response = new self();\r\n }\r\n return self::$response;\r\n }"
] | [
"0.6912883",
"0.6912883",
"0.67666113",
"0.65895987",
"0.65895987",
"0.6515243",
"0.6493368",
"0.64684206",
"0.63182724",
"0.614903",
"0.6133055",
"0.6073726",
"0.6070657",
"0.6015426",
"0.5980343",
"0.5924861",
"0.5920159",
"0.5861435",
"0.5733203",
"0.57256013",
"0.57254016",
"0.56571555",
"0.56104136",
"0.5566819",
"0.5547108",
"0.55413365",
"0.5521586",
"0.5521586",
"0.5517802",
"0.5513914",
"0.55091494",
"0.54390156",
"0.54227537",
"0.5420661",
"0.5417726",
"0.54172254",
"0.5398085",
"0.5368595",
"0.53614193",
"0.5357517",
"0.5349515",
"0.53368676",
"0.53181297",
"0.5316981",
"0.52971715",
"0.5296953",
"0.5286186",
"0.5279814",
"0.52785325",
"0.52627474",
"0.52627474",
"0.52627474",
"0.52627474",
"0.52627474",
"0.52627474",
"0.52627474",
"0.5262555",
"0.526114",
"0.52543646",
"0.52543646",
"0.5235249",
"0.5226165",
"0.5223481",
"0.5218828",
"0.5209773",
"0.52015054",
"0.52013457",
"0.5200893",
"0.51821",
"0.51796156",
"0.5174326",
"0.5174326",
"0.51731455",
"0.51694",
"0.51694",
"0.51694",
"0.51694",
"0.51694",
"0.51694",
"0.51694",
"0.5168332",
"0.51683193",
"0.5162789",
"0.5158347",
"0.5156083",
"0.51554865",
"0.5154553",
"0.5139456",
"0.5139157",
"0.5138755",
"0.5136261",
"0.51249033",
"0.51248705",
"0.51248705",
"0.5093887",
"0.50797796",
"0.5079482",
"0.50772876",
"0.50673586"
] | 0.72640127 | 1 |
Gets the private 'router.request_context' shared service. | protected function getRouter_RequestContextService()
{
return $this->services['router.request_context'] = new \Symfony\Component\Routing\RequestContext('', 'GET', 'localhost', 'http', 80, 443);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getContext()\n {\n if ($this->context === null) {\n $this->context = $this->container->get('security.context');\n }\n return $this->context;\n }",
"private function getContext()\n {\n $context = $this->request->getData('context');\n\n return Context::isValidOrFail($context) ? $context : null;\n }",
"public function getContext()\n {\n return self::$context;\n }",
"public function getRequest() {\r\n\t\treturn $this->context->getState('request');\r\n\t}",
"protected function getContext()\n {\n return $this->_context;\n }",
"protected function getContext()\n {\n return $this->_context;\n }",
"private function getRequest()\n {\n if ($this->request === null) {\n $this->request = $this->container->get('request_stack')->getCurrentRequest();\n }\n return $this->request;\n }",
"protected function getContext() {}",
"public function getCurrentRequest()\n {\n return $this->container['request'];\n }",
"protected function getContext() {\n\t\treturn $this->context;\n\t}",
"public static function context() {\n\t\treturn self::get_context();\n\t}",
"protected function getContext()\n\t{\n\t\treturn $this->context;\n\t}",
"protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }",
"protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }",
"protected function getRequestStackService()\n {\n return $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack();\n }",
"public function getRequest()\r\n {\r\n return Mage::registry('current_request');\r\n }",
"public function getRequest()\n {\n return static::app()->request;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getContext()\n {\n return $this->context;\n }",
"public function getRequest(): Request|\\Symfony\\Component\\HttpFoundation\\Request\n {\n return $this->request ?: Request::createFromGlobals();\n }",
"public function request()\n {\n return $this->context->getRequest();\n }",
"public static function context()\n {\n return self::$_context;\n }",
"public function getContext() {\n\t\treturn $this->getPrivateSetting('context');\n\t}",
"public function getContext() {\n\t\treturn $this->context;\n\t}",
"public function getContext()\r\n {\r\n return $this->context;\r\n }",
"public function getContext() {\n return $this->context;\n }",
"private function _request()\n {\n if ($this->_request) {\n return $this->_request;\n }\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n return $this->_request;\n }",
"protected function _request() {\n\t\treturn $this->_container->request;\n\t}",
"public function getContext() {\n return $this->context;\n }",
"public function getContext() {\n return $this->context;\n }",
"protected function getRequest()\n {\n return app(Request::class);\n }",
"public function getContext() {\r\n\t\treturn $this->context;\r\n\t}",
"protected function _get_page_context() {\n $context = $this->get_context();\n return (!empty($context)) ? $context : context_system::instance();\n }",
"public function getRequest()\n {\n return $this->getService('request');\n }",
"public function getContext()\n\t{\n\t\treturn $this->context;\n\t}",
"public final function getContext ()\n {\n return $this->context;\n }",
"public final function getContext ()\n {\n return $this->context;\n }",
"public function getContext()\r\n\t{\r\n\t\treturn $this->context;\r\n\t}",
"public function getContext(): mixed;",
"protected function getContext($request)\r\n {\r\n return stream_context_create(\r\n array(\r\n 'http' => array(\r\n 'method' => \"POST\",\r\n 'header' => \"Content-Type: text/xml; charset=UTF-8\\r\\n\" .\r\n \"User-Agent: Yii livejournal extension\\r\\n\",\r\n 'content' => $request\r\n )\r\n )\r\n );\r\n }",
"public function createContextFromRequest(\n RequestInterface $request\n ): RequestContext {\n return new RequestContext($this, $request);\n }",
"public function getRequest()\n {\n if (! $this->request) {\n $this->request = \\Zend_Controller_Front::getInstance()->getRequest();\n }\n return $this->request;\n }",
"public final function getContext ()\n {\n\n return $this->context;\n\n }",
"public function getContext ()\n {\n return $this->context;\n }",
"public function getContext(): Context\n {\n return $this->context;\n }",
"public static function getContext()\n {\n if (isset(self::$context) == false) {\n self::$context = new Context();\n }\n\n return self::$context;\n }",
"function &getContext() {\n\t\treturn $this->_context;\n\t}",
"public function getContext()\n\t\t{\n\t\t\treturn $this->context;\n\t\t}",
"public function getContext();",
"public function getContext();",
"public function getContext();",
"public function getContext();",
"public function getContext();",
"function getRequest()\n {\n return $this->current_request;\n }",
"protected function getRequest() {\n\t\treturn $this->request;\n\t}",
"public function getRequest()\n {\n return $this->requestFactory->getRequest();\n }",
"public function getControllerContext() {}",
"public function getcontext()\n {\n return $this->context;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest() {\n return $this->request;\n }",
"private function getRequest()\n {\n $controller = $this->getController();\n return $controller->getRequest();\n }",
"public function getRequest()\r\n {\r\n return $this->_controller->getApplication()->getRequest();\r\n }",
"abstract public function get_context();",
"public function getRequest(): Request\n {\n return $this->request;\n }",
"public function getRequest(): Request\n {\n return $this->request;\n }",
"function request(): Request\n\t{\n\t\tstatic $request;\n\n\t\tif($request === null)\n\t\t{\n\t\t\t$request = Application::instance()->getContainer()->get(Request::class);\n\t\t}\n\n\t\treturn $request;\n\t}",
"public function getContext() : Context {\n return $this->context;\n }",
"public function getRequestInstance(){\n\t\treturn ControllerRequest::getInstance();\n\t}",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"function getControllerContext() ;",
"public function getContext(): Context\n\t{\n\t\treturn $this->context;\n\t}",
"protected function obtainRequest() {\n return Request::createFromGlobals();\n }",
"public function getHandlerContext()\n {\n return $this->getHandlerConfig()->getHandlerContext();\n }",
"public function getRequest()\n {\n return isset($this->request) ? $this->request : null;\n }",
"public function request() {\n return $this->requestStack->getCurrentRequest();\n }",
"public function getRequest() {\n\t\treturn $this->getFrontcontroller()->getRequest();\n\t}",
"public function getRequest()\n {\n return $this->_request;\n }",
"public function getRequest()\n {\n return $this->_request;\n }",
"public function getRequest() {\n return $this->_request;\n }",
"public function getCurrentRequest()\n\t\t{\n\t\t\treturn $this->currentRequest;\n\t\t}",
"public function getRequest()\n\t{\n\t\treturn $this->compose('Request', 'Http\\Requests');\n\t}",
"public function get_ctx() \n {\n return $this->ctx;\n }",
"public function getContext(): ContextInterface;",
"public function getRequest() {\n\t\treturn $this->request;\n\t}",
"public function getRequest()\n {\n return $this->request;\n }"
] | [
"0.69826",
"0.6805456",
"0.66820264",
"0.6676382",
"0.66699517",
"0.66699517",
"0.6661133",
"0.6650406",
"0.6615614",
"0.6587547",
"0.65424395",
"0.6526213",
"0.6516481",
"0.6516481",
"0.6516481",
"0.64759976",
"0.6470407",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6438179",
"0.6435923",
"0.64333487",
"0.6427703",
"0.6425277",
"0.640385",
"0.64003736",
"0.6399066",
"0.63890934",
"0.6387942",
"0.63781893",
"0.63781893",
"0.6371857",
"0.6368001",
"0.63657606",
"0.63376117",
"0.6326151",
"0.6325803",
"0.6325803",
"0.6322792",
"0.6319324",
"0.6305272",
"0.6300124",
"0.62958735",
"0.62916976",
"0.62796015",
"0.6278631",
"0.6275157",
"0.62734663",
"0.6271343",
"0.6267545",
"0.6267545",
"0.6267545",
"0.6267545",
"0.6267545",
"0.6248844",
"0.6231621",
"0.6230635",
"0.6230282",
"0.62179697",
"0.6206045",
"0.6206045",
"0.6206045",
"0.62059414",
"0.6195575",
"0.6173288",
"0.6162986",
"0.61555576",
"0.61555576",
"0.61479205",
"0.61374867",
"0.6135249",
"0.61095303",
"0.61095303",
"0.61095303",
"0.61095303",
"0.6105743",
"0.6104256",
"0.61013734",
"0.60746574",
"0.6072798",
"0.6069071",
"0.6063984",
"0.60631585",
"0.60631585",
"0.6060953",
"0.6050956",
"0.60492873",
"0.6040174",
"0.60356146",
"0.60325164",
"0.6031657"
] | 0.7954178 | 1 |
Gets the private 'router_listener' shared service. | protected function getRouterListenerService()
{
return $this->services['router_listener'] = new \Symfony\Component\HttpKernel\EventListener\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \Symfony\Component\HttpKernel\Log\Logger()) && false ?: '_'}, $this->targetDirs[3], true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())) && false ?: '_'});\n }",
"protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('request_stack'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getRouterService()\n {\n return $this->services['router'] = new \\phpbb\\routing\\router($this, ${($_ = isset($this->services['routing.chained_resources_locator']) ? $this->services['routing.chained_resources_locator'] : $this->getRouting_ChainedResourcesLocatorService()) && false ?: '_'}, ${($_ = isset($this->services['routing.delegated_loader']) ? $this->services['routing.delegated_loader'] : $this->getRouting_DelegatedLoaderService()) && false ?: '_'}, 'php', './../cache/production/');\n }",
"public function getRouterService() {\n return $this->routerService;\n }",
"protected function getDispatcherListener()\n {\n return $this->di->getShared('dispatcherListener');\n }",
"private function get_router()\n\t{\n\t\treturn $this->m_router;\n\t}",
"public function getListener(/* ... */)\n {\n return $this->_listener;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, 'kernel:loadRoutes', array('cache_dir' => $this->targetDirs[0], 'debug' => true, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'srcDevDebugProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'srcDevDebugProjectContainerUrlMatcher', 'strict_requirements' => true, 'resource_type' => 'service'), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'});\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->getConfigCacheFactoryService()) && false ?: '_'});\n\n return $instance;\n }",
"protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addListener('core.viewtopic_post_row_after', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.listener']) ? $this->services['phpbb.viglink.listener'] : $this->getPhpbb_Viglink_ListenerService()) && false ?: '_'};\n }, 1 => 'display_viglink'], 0);\n $instance->addListener('core.acp_main_notice', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'set_viglink_services'], 0);\n $instance->addListener('core.acp_help_phpbb_submit_before', [0 => function () {\n return ${($_ = isset($this->services['phpbb.viglink.acp_listener']) ? $this->services['phpbb.viglink.acp_listener'] : $this->getPhpbb_Viglink_AcpListenerService()) && false ?: '_'};\n }, 1 => 'update_viglink_settings'], 0);\n $instance->addListener('console.exception', [0 => function () {\n return ${($_ = isset($this->services['console.exception_subscriber']) ? $this->services['console.exception_subscriber'] : $this->getConsole_ExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['cron.event_listener']) ? $this->services['cron.event_listener'] : $this->getCron_EventListenerService()) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['kernel_exception_subscriber']) ? $this->services['kernel_exception_subscriber'] : $this->getKernelExceptionSubscriberService()) && false ?: '_'};\n }, 1 => 'on_kernel_exception'], 0);\n $instance->addListener('kernel.terminate', [0 => function () {\n return ${($_ = isset($this->services['kernel_terminate_subscriber']) ? $this->services['kernel_terminate_subscriber'] : ($this->services['kernel_terminate_subscriber'] = new \\phpbb\\event\\kernel_terminate_subscriber())) && false ?: '_'};\n }, 1 => 'on_kernel_terminate'], -9223372036854775807-1);\n $instance->addListener('kernel.response', [0 => function () {\n return ${($_ = isset($this->services['symfony_response_listener']) ? $this->services['symfony_response_listener'] : ($this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8'))) && false ?: '_'};\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ${($_ = isset($this->services['router.listener']) ? $this->services['router.listener'] : $this->getRouter_ListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'], -64);\n\n return $instance;\n }",
"protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getRouterService()\n {\n $this->services['router'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\Router($this, ($this->targetDirs[3].'/app/config/routing.yml'), array('cache_dir' => __DIR__, 'debug' => false, 'generator_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_base_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\UrlGenerator', 'generator_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Generator\\\\Dumper\\\\PhpGeneratorDumper', 'generator_cache_class' => 'appProdProjectContainerUrlGenerator', 'matcher_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_base_class' => 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\Routing\\\\RedirectableUrlMatcher', 'matcher_dumper_class' => 'Symfony\\\\Component\\\\Routing\\\\Matcher\\\\Dumper\\\\PhpMatcherDumper', 'matcher_cache_class' => 'appProdProjectContainerUrlMatcher', 'strict_requirements' => NULL), ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, $this->get('monolog.logger.router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n\n return $instance;\n }",
"public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}",
"protected function getKnpMenu_Voter_RouterService()\n {\n return $this->services['knp_menu.voter.router'] = new \\Knp\\Menu\\Matcher\\Voter\\RouteVoter();\n }",
"public function router()\n {\n return $this->_router;\n }",
"protected function getMonolog_Logger_RouterService()\n {\n $this->services['monolog.logger.router'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('router');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener($this->get('request_stack'), 'en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function getInstance() {\n\n if (self::$instance == NULL) {\n self::$instance = new router();\n }\n return self::$instance;\n\n }",
"protected function getVictoireSitemap_SitemapMenuListenerService()\n {\n return $this->services['victoire_sitemap.sitemap_menu_listener'] = new \\Victoire\\Bundle\\SitemapBundle\\Listener\\SiteMapMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function get_router();",
"public function & GetRouter () {\n\t\treturn $this->router;\n\t}",
"public function router() \n\t{\n\t\treturn $this->router;\n\t}",
"public function getRouter()\n\t{\n\t\treturn self::$router;\n\t}",
"protected function getRouter()\n {\n return $this->app['router'];\n }",
"protected function getRouter()\n {\n return $this->app['router'];\n }",
"protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }",
"protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }",
"protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"public static function getRouter() {\n\t\tif (is_null(static::$router)) {\n\t\t\tstatic::createRouter();\n\t\t}\n\n\t\treturn static::$router;\n\t}",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->load('getSessionService.php')) && false ?: '_'};\n })));\n }",
"public function getRouter()\n {\n return $this->router;\n }",
"public function getRouter()\n {\n return $this->router;\n }",
"public function menu_get_router()\n {\n return menu_get_router();\n }",
"public static function router() {\n\t\tif (!isset(self::$_router)) {\n\t\t\tself::$_router=new \\GO\\Base\\Router();\n\t\t}\n\t\treturn self::$_router;\n\t}",
"protected function _getRouter() {\n\t\treturn new Router;\n\t}",
"protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener($this->get('uri_signer'), '/_fragment');\n }",
"protected function getRouting_ResolverService()\n {\n return $this->services['routing.resolver'] = new \\phpbb\\routing\\loader_resolver(${($_ = isset($this->services['routing.loader.collection']) ? $this->services['routing.loader.collection'] : $this->getRouting_Loader_CollectionService()) && false ?: '_'});\n }",
"public static function getInstance() {\n if (Router::$instance === null) {\n Router::$instance = new Router();\n }\n return Router::$instance;\n }",
"public function & GetRouter ();",
"public function getRouter(){\n return $this->router;\n }",
"private static function getService()\n {\n return self::$app->get(static::SERVICE_NAME);\n }",
"public static function getInstance(){\n\t\tif (!is_object(self::$instance))\n\t\t\tself::$instance=new TSMSRouter();\n\t\treturn self::$instance;\n\t\t}",
"protected function getRouting_DelegatedLoaderService()\n {\n return $this->services['routing.delegated_loader'] = new \\Symfony\\Component\\Config\\Loader\\DelegatingLoader(${($_ = isset($this->services['routing.resolver']) ? $this->services['routing.resolver'] : $this->getRouting_ResolverService()) && false ?: '_'});\n }",
"protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener($this);\n }",
"protected function resolveListener(string $listener)\n {\n return Container::getInstance()->make($listener);\n }",
"protected function getTemplate_Twig_Extensions_RoutingService()\n {\n return $this->services['template.twig.extensions.routing'] = new \\phpbb\\template\\twig\\extension\\routing(${($_ = isset($this->services['routing.helper']) ? $this->services['routing.helper'] : $this->getRouting_HelperService()) && false ?: '_'});\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, -1, -1, true, new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL), true);\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 0);\n $instance->addListener('kernel.controller', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelController'), 0);\n $instance->addListener('kernel.view', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelView'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['App\\EventSubscriber\\RestSubscriber']) ? $this->services['App\\EventSubscriber\\RestSubscriber'] : $this->getRestSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelException'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['response_listener']) ? $this->services['response_listener'] : $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['streamed_response_listener']) ? $this->services['streamed_response_listener'] : $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1024);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 16);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['locale_listener']) ? $this->services['locale_listener'] : $this->getLocaleListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['validate_request_listener']) ? $this->services['validate_request_listener'] : $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 256);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['resolve_controller_name_subscriber']) ? $this->services['resolve_controller_name_subscriber'] : $this->getResolveControllerNameSubscriberService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 24);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleError'), -128);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['console.error_listener']) ? $this->services['console.error_listener'] : $this->load('getConsole_ErrorListenerService.php')) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), -128);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 128);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['session_listener']) ? $this->services['session_listener'] : $this->getSessionListenerService()) && false ?: '_'};\n }, 1 => 'onFinishRequest'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['session.save_listener']) ? $this->services['session.save_listener'] : $this->services['session.save_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SaveSessionListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), -1000);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 10);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['translator_listener']) ? $this->services['translator_listener'] : $this->getTranslatorListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['debug.debug_handlers_listener']) ? $this->services['debug.debug_handlers_listener'] : $this->getDebug_DebugHandlersListenerService()) && false ?: '_'};\n }, 1 => 'configure'), 2048);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 32);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n $instance->addListener('kernel.exception', array(0 => function () {\n return ${($_ = isset($this->services['router_listener']) ? $this->services['router_listener'] : $this->getRouterListenerService()) && false ?: '_'};\n }, 1 => 'onKernelException'), -64);\n $instance->addListener('console.error', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleError'), 0);\n $instance->addListener('console.terminate', array(0 => function () {\n return ${($_ = isset($this->services['maker.console_error_listener']) ? $this->services['maker.console_error_listener'] : $this->services['maker.console_error_listener'] = new \\Symfony\\Bundle\\MakerBundle\\Event\\ConsoleErrorSubscriber()) && false ?: '_'};\n }, 1 => 'onConsoleTerminate'), 0);\n $instance->addListener('kernel.response', array(0 => function () {\n return ${($_ = isset($this->services['security.rememberme.response_listener']) ? $this->services['security.rememberme.response_listener'] : $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()) && false ?: '_'};\n }, 1 => 'onKernelResponse'), 0);\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelRequest'), 8);\n $instance->addListener('kernel.finish_request', array(0 => function () {\n return ${($_ = isset($this->services['security.firewall']) ? $this->services['security.firewall'] : $this->getSecurity_FirewallService()) && false ?: '_'};\n }, 1 => 'onKernelFinishRequest'), 0);\n\n return $instance;\n }",
"protected function getVictoireCore_TemplateMenuListenerService()\n {\n return $this->services['victoire_core.template_menu_listener'] = new \\Victoire\\Bundle\\TemplateBundle\\Listener\\TemplateMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getRouting_HelperService()\n {\n return $this->services['routing.helper'] = new \\phpbb\\routing\\helper(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['symfony_request']) ? $this->services['symfony_request'] : $this->getSymfonyRequestService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, './../', 'php');\n }",
"protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ = isset($this->services['debug.file_link_formatter']) ? $this->services['debug.file_link_formatter'] : $this->getDebug_FileLinkFormatterService()) && false ?: '_'}, false);\n }",
"protected function getVictoireCore_RoutingLoaderService()\n {\n return $this->services['victoire_core.routing_loader'] = new \\Victoire\\Bundle\\CoreBundle\\Route\\RouteLoader(array());\n }",
"function &singleton()\n {\n if (!isset($GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'])) {\n $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'] = &new PHP_Parser_MsgServer;\n }\n return $GLOBALS['_PHP_PARSER_MSGSERVER_INSTANCE'];\n }",
"protected function getEventDispatcherService()\n {\n if (isset($this->shared['event_dispatcher'])) return $this->shared['event_dispatcher'];\n\n $class = $this->getParameter('event_dispatcher.class');\n $instance = new $class($this);\n $this->shared['event_dispatcher'] = $instance;\n\n return $instance;\n }",
"public function getRouter()\n {\n if (is_null($this->_router)) {\n $this->_router = new Router(['request' => $this->getRequest()]);\n }\n return $this->_router;\n }",
"private function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"protected function get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e(): \\Viserio\\Component\\Routing\\Router\n {\n $this->services[\\Viserio\\Contract\\Routing\\Router::class] = $instance = new \\Viserio\\Component\\Routing\\Router(($this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] ?? $this->get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c()));\n\n $instance->setContainer($this);\n\n return $instance;\n }",
"protected function get410eb27931e780eeccc23e52a6c17e0e6e2e1827d28f90c4254c8f4111788d4e(): \\Viserio\\Component\\Routing\\Router\n {\n $this->services[\\Viserio\\Contract\\Routing\\Router::class] = $instance = new \\Viserio\\Component\\Routing\\Router(($this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] ?? $this->get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c()));\n\n $instance->setContainer($this);\n\n return $instance;\n }",
"function &getRouter()\n\t{\n\t\t$router =& parent::getRouter('administrator');\n\t\treturn $router;\n\t}",
"protected function getVictoireCore_PageMenuListenerService()\n {\n return $this->services['victoire_core.page_menu_listener'] = new \\Victoire\\Bundle\\PageBundle\\Listener\\PageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getVictoireCore_BackendMenuListenerService()\n {\n return $this->services['victoire_core.backend_menu_listener'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\BackendMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getRouter();",
"protected function getVictoireCore_MediaMenuListenerService()\n {\n return $this->services['victoire_core.media_menu_listener'] = new \\Victoire\\Bundle\\MediaBundle\\EventListener\\MediaMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"public function getRouter() {\n\n // Return our router\n return $this->sRouter;\n }",
"public function getServiceLocator()\n {\n \treturn $this->serviceLocator;\n }",
"protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE));\n }",
"protected function getRouting_Loader_CollectionService()\n {\n $this->services['routing.loader.collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('routing.loader.yaml');\n\n return $instance;\n }",
"public function getRouter(): ?RouterInterface\n {\n return $this->router;\n }",
"protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListenerService('kernel.request', array(0 => 'knp_menu.listener.voters', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_blog.blog_menu_listener', 1 => 'addGlobal'), 90);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.article_menu.contextual', array(0 => 'victoire_blog.article_settings_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_menu.contextual', 1 => 'addBlogContextual'), 0);\n $instance->addListenerService('victoire_core.article_template_menu.contextual', array(0 => 'victoire_blog.article_template_menu.menu_listener.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.blog_menu.contextual', array(0 => 'victoire_blog.blog_page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire.widget_filter.form.pre_set_data', array(0 => 'victoire.widget_filter.form.listener.presetdata', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.pre_submit', array(0 => 'victoire.widget_filter.form.listener.presubmit', 1 => 'manageExtraFiltersFields'), 1);\n $instance->addListenerService('victoire.widget_filter.form.date.set_default_value', array(0 => 'victoire.widget_filter.blog.set.default.values.form.listener', 1 => 'setDefaultDateValue'), 1);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_business_page.business_template_menu_listener', 1 => 'addGlobal'), 50);\n $instance->addListenerService('victoire_core.business_template_menu.contextual', array(0 => 'victoire_core.business_template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_core.menu_dispatcher', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.backend_menu.global', array(0 => 'victoire_core.backend_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('kernel.controller', array(0 => 'victoire_core.listener.controller_listener', 1 => 'preExecuteAutorun'), 0);\n $instance->addListenerService('victoire.on_render_page', array(0 => 'victoire_core.view_css_listener', 1 => 'onRenderPage'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_i18n.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.media_menu_listener', 1 => 'addGlobal'), 60);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.page_menu_listener', 1 => 'addGlobal'), 100);\n $instance->addListenerService('victoire_core.page_menu.contextual', array(0 => 'victoire_core.page_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_sitemap.sitemap_menu_listener', 1 => 'addGlobal'), 70);\n $instance->addListenerService('victoire_core.build_menu', array(0 => 'victoire_core.template_menu_listener', 1 => 'addGlobal'), 80);\n $instance->addListenerService('victoire_core.template_menu.contextual', array(0 => 'victoire_core.template_menu.contextual', 1 => 'addContextual'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_twig.kernelrequest.listener', 1 => 'onKernelRequest'), 0);\n $instance->addListenerService('kernel.request', array(0 => 'victoire_view_reference.cache_warmer', 1 => 'warmUp'), 0);\n $instance->addSubscriberService('response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('streamed_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\StreamedResponseListener');\n $instance->addSubscriberService('locale_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\LocaleListener');\n $instance->addSubscriberService('validate_request_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ValidateRequestListener');\n $instance->addSubscriberService('translator_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\TranslatorListener');\n $instance->addSubscriberService('session_listener', 'Symfony\\\\Bundle\\\\FrameworkBundle\\\\EventListener\\\\SessionListener');\n $instance->addSubscriberService('session.save_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\SaveSessionListener');\n $instance->addSubscriberService('fragment.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\FragmentListener');\n $instance->addSubscriberService('debug.debug_handlers_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\DebugHandlersListener');\n $instance->addSubscriberService('router_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('security.firewall', 'Symfony\\\\Component\\\\Security\\\\Http\\\\Firewall');\n $instance->addSubscriberService('security.rememberme.response_listener', 'Symfony\\\\Component\\\\Security\\\\Http\\\\RememberMe\\\\ResponseListener');\n $instance->addSubscriberService('twig.exception_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ExceptionListener');\n $instance->addSubscriberService('monolog.handler.console', 'Symfony\\\\Bridge\\\\Monolog\\\\Handler\\\\ConsoleHandler');\n $instance->addSubscriberService('swiftmailer.email_sender.listener', 'Symfony\\\\Bundle\\\\SwiftmailerBundle\\\\EventListener\\\\EmailSenderListener');\n $instance->addSubscriberService('sensio_framework_extra.controller.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ControllerListener');\n $instance->addSubscriberService('sensio_framework_extra.converter.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\ParamConverterListener');\n $instance->addSubscriberService('sensio_framework_extra.view.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\TemplateListener');\n $instance->addSubscriberService('sensio_framework_extra.cache.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\HttpCacheListener');\n $instance->addSubscriberService('sensio_framework_extra.security.listener', 'Sensio\\\\Bundle\\\\FrameworkExtraBundle\\\\EventListener\\\\SecurityListener');\n $instance->addSubscriberService('troopers_alertifybundle.event_listener', 'Troopers\\\\AlertifyBundle\\\\EventListener\\\\AlertifyListener');\n $instance->addSubscriberService('fos_user.security.interactive_login_listener', 'FOS\\\\UserBundle\\\\EventListener\\\\LastLoginListener');\n $instance->addSubscriberService('fos_user.listener.authentication', 'FOS\\\\UserBundle\\\\EventListener\\\\AuthenticationListener');\n $instance->addSubscriberService('fos_user.listener.flash', 'FOS\\\\UserBundle\\\\EventListener\\\\FlashListener');\n $instance->addSubscriberService('fos_user.listener.resetting', 'FOS\\\\UserBundle\\\\EventListener\\\\ResettingListener');\n $instance->addSubscriberService('victoire_core.cache_subscriber', 'Victoire\\\\Bundle\\\\CoreBundle\\\\EventSubscriber\\\\CacheSubscriber');\n $instance->addSubscriberService('victoire_i18n.locale_subscriber', 'Victoire\\\\Bundle\\\\I18nBundle\\\\Subscriber\\\\LocaleSubscriber');\n $instance->addSubscriberService('victoire_view_reference.listener', 'Victoire\\\\Bundle\\\\ViewReferenceBundle\\\\Listener\\\\ViewReferenceListener');\n\n return $instance;\n }",
"public function getServiceLocator()\r\n {\r\n return $this->serviceLocator;\r\n }",
"public function getServiceLocator ()\n {\n return $this->serviceLocator;\n }",
"protected function getVictoireCore_MenuDispatcherService()\n {\n return $this->services['victoire_core.menu_dispatcher'] = new \\Victoire\\Bundle\\CoreBundle\\Listener\\MenuDispatcher($this->get('event_dispatcher'), $this->get('security.token_storage'), $this->get('security.authorization_checker'));\n }",
"public function getServiceLocator() \r\n { \r\n return $this->serviceLocator; \r\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }",
"public function GetRouterClass ();",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"public function getServiceLocator()\n {\n return $this->serviceLocator;\n }",
"protected function getRouting_LoaderService()\n {\n $a = $this->get('file_locator');\n $b = $this->get('annotation_reader');\n\n $c = new \\Sensio\\Bundle\\FrameworkExtraBundle\\Routing\\AnnotatedRouteControllerLoader($b);\n\n $d = new \\Symfony\\Component\\Config\\Loader\\LoaderResolver();\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\XmlFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\PhpFileLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\DirectoryLoader($a));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\DependencyInjection\\ServiceRouterLoader($this));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\AnnotationDirectoryLoader($a, $c));\n $d->addLoader(new \\Symfony\\Component\\Routing\\Loader\\AnnotationFileLoader($a, $c));\n $d->addLoader($c);\n $d->addLoader($this->get('victoire_core.routing_loader'));\n $d->addLoader($this->get('victoire_i18n.routing_loader'));\n\n return $this->services['routing.loader'] = new \\Symfony\\Bundle\\FrameworkBundle\\Routing\\DelegatingLoader(${($_ = isset($this->services['controller_name_converter']) ? $this->services['controller_name_converter'] : $this->getControllerNameConverterService()) && false ?: '_'}, $d);\n }",
"public function GetRouter ();",
"public function getServiceManager()\n {\n return $this->sm;\n }",
"public function getRouter()\n {\n return isset($this->router) ? $this->router : '';\n }",
"public function listener($name) {\n\t\treturn $this->_loadListener($name);\n\t}",
"private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }",
"protected function getVictoireBlog_BlogMenuListenerService()\n {\n return $this->services['victoire_blog.blog_menu_listener'] = new \\Victoire\\Bundle\\BlogBundle\\Listener\\BlogMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getRestSubscriberService()\n {\n return $this->services['App\\EventSubscriber\\RestSubscriber'] = new \\App\\EventSubscriber\\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = isset($this->services['doctrine.orm.default_entity_manager']) ? $this->services['doctrine.orm.default_entity_manager'] : $this->getDoctrine_Orm_DefaultEntityManagerService()) && false ?: '_'});\n }",
"protected function getDispatcher()\n {\n return $this->di->getShared('dispatcher');\n }",
"final public function getServiceLocator()\n\t{\n\t\tif ($this->serviceLocator === NULL) {\n\t\t\t$this->serviceLocator = $this->parent === NULL\n\t\t\t\t? Environment::getServiceLocator()\n\t\t\t\t: $this->parent->getServiceLocator();\n\t\t}\n\n\t\treturn $this->serviceLocator;\n\t}",
"protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"public function getServiceLocator() \n { \n return $this->serviceLocator; \n }",
"protected function getPhpbb_Viglink_AcpListenerService()\n {\n return $this->services['phpbb.viglink.acp_listener'] = new \\phpbb\\viglink\\event\\acp_listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['phpbb.viglink.helper']) ? $this->services['phpbb.viglink.helper'] : $this->getPhpbb_Viglink_HelperService()) && false ?: '_'}, './../', 'php');\n }",
"protected function getVictoireBusinessPage_BusinessTemplateMenuListenerService()\n {\n return $this->services['victoire_business_page.business_template_menu_listener'] = new \\Victoire\\Bundle\\BusinessPageBundle\\Listener\\BusinessPageMenuListener($this->get('victoire_core.admin_menu_builder'));\n }",
"protected function getServiceManager()\n {\n return $this->serviceManager;\n }",
"public function getServiceManager ()\n {\n return $this->serviceManager;\n }"
] | [
"0.8276841",
"0.8165629",
"0.7084269",
"0.7073615",
"0.690444",
"0.6756071",
"0.6664331",
"0.66598713",
"0.6636435",
"0.65806144",
"0.65275",
"0.6508153",
"0.64837",
"0.63579327",
"0.63359207",
"0.6311225",
"0.62716293",
"0.6208841",
"0.62075686",
"0.61822754",
"0.617295",
"0.61554354",
"0.6128597",
"0.6114949",
"0.6100045",
"0.6100045",
"0.6097998",
"0.60610366",
"0.60514957",
"0.604455",
"0.6042003",
"0.60286355",
"0.60286355",
"0.60258526",
"0.60225034",
"0.5971916",
"0.5943939",
"0.5939573",
"0.5933536",
"0.5910989",
"0.5889659",
"0.587498",
"0.58656096",
"0.5856229",
"0.5825349",
"0.5815019",
"0.57927734",
"0.5786497",
"0.574704",
"0.5741219",
"0.57405216",
"0.5739639",
"0.5736898",
"0.5723729",
"0.57201487",
"0.56949174",
"0.5691708",
"0.5688986",
"0.5688986",
"0.5686316",
"0.56553215",
"0.5652476",
"0.5641335",
"0.5619657",
"0.5600748",
"0.556803",
"0.55606514",
"0.55419844",
"0.5538317",
"0.5529057",
"0.55219346",
"0.5502303",
"0.548717",
"0.5461686",
"0.5446274",
"0.5446274",
"0.5441606",
"0.5430029",
"0.5430029",
"0.5430029",
"0.5430029",
"0.5430029",
"0.5430029",
"0.5423236",
"0.54169154",
"0.5413909",
"0.5408502",
"0.54031134",
"0.5401331",
"0.54002815",
"0.5397791",
"0.5378648",
"0.53783417",
"0.53706104",
"0.5358883",
"0.5358883",
"0.5350723",
"0.5335568",
"0.53349197",
"0.533419"
] | 0.813125 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.